Hook to define service links

bdragon - October 22, 2007 - 20:04
Project:Service links
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I was tinkering around with service_links and came up with this. It would allow defining service links from a customization module, instead of having to modify service_links.module directly. Thoughts?

AttachmentSize
service_links_centralize.patch17.17 KB

#1

greenSkin - December 19, 2007 - 21:00

+1 to adding this to service_links or some variation there of.

#2

liquidcms - February 11, 2008 - 01:01

i added a service link hook patch a few months ago: http://drupal.org/node/189264

is this the same thing?

#3

dww - May 11, 2008 - 22:13

I marked #189264: should have a hook to add links duplicate with this, but there's another (much smaller) patch there that could be considered as an alternative to this:
http://drupal.org/files/issues/add_hook_01.patch

#4

wayland76 - May 11, 2008 - 22:46

It might be an idea to have Service Links depend on WIJI: http://drupal.org/project/wiji (which would allow the addition of extra service links). There'll be a dev version out of wiji at the next packaging script run.

#5

dww - May 11, 2008 - 22:57

@wayland76: I think optional integration with wiji might be nice, but a full-blown dependency is not a good idea. Service links is a (relatively) simple module that does what it needs to without too much hassle. Requiring everyone who wants this functionality to define a wiji page for their site and enable yet-another-module sounds like an unnecessary complication and barrier for users who just want to add a few service links to the well-known bookmarking sites to their pages.

#6

wayland76 - May 11, 2008 - 23:41

Hmm. Well, maybe wiji hasn't been explained properly (but you're probably right about optional integration). Installing wiji would, admittedly, be necessary, but the WIJI definitions should (hopefully) be made by the service-linked websites (ie. Google, Facebook, Reddit, etc), rather than the individual users. If the search engine added a WIJI page, then it would be possible to just go into WIJI, enter the search engine's front-page URL, and then everything would work.

So, for ordinary users, it would look like this:
1. Install wiji
2. Install Service Links
3. Enter URL of any wiji-enabled site into WIJI module
4. Everything works

And, as the WIJI page mentions, the site wiji.jdarx.info will contain information for any major sites that don't implement WIJI. This happens to include the complete list of sites that the Service Links module currently supports.

#7

joachim - January 11, 2009 - 15:52

+1 for bdragon's patch.
Centralizing the links means fewer rows in the variables table, makes this module's code a LOT simpler in two places, makes it easier to update the details for sites in future should URLs change.

We should leave discussion about WIJI aside for now, or take it to another issue.

#8

jrguitar21 - January 14, 2009 - 04:35

+1 for bdragon's patch.

I've been thinking about how cool it would be to have a module that handles on-the-fly (but cached of course) css sprite generation for the service link images. Setting up a hook_service_links opens the door to lots of cool implementations of service_links like this.

#9

TheCrow - July 29, 2009 - 16:51
Version:HEAD» 6.x-2.x-dev
Assigned to:bdragon» Anonymous
Status:needs review» fixed

A modified version of this patch is included into the 2.x branch

#10

System Message - August 12, 2009 - 17:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.