It would be cool if it would be possible to post links to identi.ca for example too.

This patch creates a hook so that other modules can define "tweet services".

The code is not tested well, as well as it misses the identi.ca extra module.

CommentFileSizeAuthor
tweet-identica.patch4.95 KBdawehner

Comments

icecreamyou’s picture

Thanks for the patch, I'll review it as soon as I get a chance.

dawehner’s picture

Status: Needs work » Needs review

Patch works fine for me, so update status.

icecreamyou’s picture

Status: Needs review » Needs work

Generally, the patch looks good, and I appreciate the work you've done on this. In terms of the actual code I just have one minor gripe:

+    drupal_alter('tweet_services');

That needs to have $services passed in as a parameter so modules that implement this have something to alter.

I think, though, that your approach requires a little too much work on the part of modules implementing the hook. I want the hook to return only keywords, not code -- that is, I don't want the client module to have to figure out where the icons are, or that theme('image') exists, etc. I'd like to see the "Text of link" function change to use a %service token have have the client hook just provide the name of the service instead of the full link text, for example.

I will think about this a little more and try to massage your patch tonight.

icecreamyou’s picture

Version: 6.x-3.x-dev » 6.x-4.x-dev
Status: Needs work » Needs review

I created a new 4.x branch for these changes because they require changing the API. I would appreciate if you could try it out and see if it works for you.

icecreamyou’s picture

Status: Needs review » Fixed

I'm going to go ahead and mark this fixed. If any problems are found with the 4.x branch, or if anyone has a new service to contribute, please open a new issue.

Status: Fixed » Closed (fixed)

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