Would be great there were a place (forums, or a code snippets page in the handbook) where people can list their home-grown add-ons for service links. For lack of a link to this in the readme or on the project description page, I'll start right here with mine for the time being...

A user of one of my client's sites requested the ability to post on MySpace. Being that it is somewhat ubiquitous now, I decided to implement it and found it quite easy with the recently created MySpace API; here's the snippet:

$links['service_links_myspace'] = theme('service_links_build_link', t('MySpace'), "http://www.myspace.com/index.cfm?fuseaction=postto&u=$url&t=$title&l=1&c=", t("Post to MySpace!"), 'myspace.gif', $nodelink);

Note:
Add this line at the end of function service_links_render() in service_links.module.
Download attached image myspace.gif and place in service_links folder.

CommentFileSizeAuthor
myspace.gif910 bytesjwilson3

Comments

TheCrow’s picture

Version: 5.x-1.1 » 6.x-2.x-dev
Status: Active » Needs work

i provided a space for that here: http://servicelinks.altervista.org/?q=service with some more service.

This is just the start and the work is not yet completed :)

midmood’s picture

Hi, i want to add the friendfeed snippet you posted on your site, but don't know how to do.
Can't find
service_links_render()

Maybe the post above is a bit outdated for drupal 7.

Can you help?

thank you
Simone

TheCrow’s picture

Yes the example made by jwilson is for 5.x-1.1 but i relaunched the idea for the new x.x-2.x, the things are differents, now you can build a custom module which implement the hook_service_links()

Here the guide http://drupal.org/node/949406#customizations

You can find examples reading services/general_services.module either any other file .module in the same folder.

midmood’s picture

Worked perfectly... thank you.
Yesterday I was a bit tired, this is maybe why i didn't think to dig into the other modules folders... sorry for bothering

*** typo edited

TheCrow’s picture

Status: Needs work » Fixed

Added on http://servicelinks.altervista.org/?q=service a system that generate automatically the code also for moultiple services, javascript enabled needed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.