Closed (fixed)
Project:
Service links
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2008 at 22:22 UTC
Updated:
21 Aug 2009 at 17:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
buddaYahoo Buzz is now open to all so would be good to see this feature added ASAP.
See http://buzz.yahoo.com/buttons
Comment #2
eyecon-1 commentedBuzzUp would be a big plus. Subscribing
Comment #3
vkr11 commented+ 1 for Buzz
Comment #4
apb1991 commentedAdd buzz please :)
Comment #5
carusen commentedA vote for both.
Comment #6
webchickLooking at this.
Comment #7
webchickIf someone cares about Mixx, let's deal with that in a separate ticket. There seems to be reasonable demand for this service, and not worth bogging down this issue with something unrelated.
Comment #8
webchickHm. This is a pain. :P
So the code to display the links looks like this:
Problem is, Yahoo! Buzz doesn't give one of those nice URL_TO_SERVICE URLs. Instead, it has JavaScript like so:
badge2.js is of course one long line of obfuscated JS, deliberately written to make it difficult to discern what the "root" URL is. I ran it through http://www.prettyprinter.de/, which helped some, but it's still going to take some time and effort to reverse-engineer it properly.
An alternative is to make a special theme function just for Yahoo! Buzz that starts as basically a copy/paste of theme_service_links_build_link but outputting Yahoo!'s JS rather than the default stuff. It wouldn't be as powerful, since you can't do things like open it in a new window and such, and it introduces something unstandard from everything else in the module.
Comment #9
webchickOk, here's an initial stab at this using the same URL type construct as the rest around it.
I think this /should/ work, but I'm having a hard time getting the widget on its own, regardless of Drupal, to actually do anything. It alternates between "Hm. For some reason that's not in our system. We'll get to the bottom of it soon." and "There was an error processing your vote."
Comment #10
webchickLet's try this...
Comment #11
webchickOk. I think I see. Yahoo! must have some security-checking code that prevents you from submitting a vote on a URL from anywhere but the URL. When I copy/paste that same widget above, it fails for me on localhost.
I guess I'm installing this module on webchick.net then. :P
It'd be really awesome if I'm having trouble getting the Yahoo! Buzz botton [sic] to work on my site. Why? was far less useless.
Comment #12
webchickNate/quicksketch did some digging with Firebug and Tamper Data... turns out that JS is submitting a POST request, and must be checking server-side for the protocol, thus making it impossible to vote without JS. So... we're into special casing this. Bleh.
Comment #13
quicksketchOkay, here's some more information that I've been able to dig up:
- Buzz actually uses POST request when submitting articles, so a simple link is not possible as far as their API reveals
- Using the TamperData Firefox plugin, we can emulate the POST request by building a similar form
Here's code that almost makes this work, for this particular issue:
Or rendered out:
We potentially make this an image button, then put a text link next to it that submits the form (this is essentially what that Yahoo JS file does).
Comment #14
webchickTrying the fancy widget that lets you pass in parameters...
Comment #15
webchickOk, sounds like the way to fix this is add a new theme function specifically for Yahoo! Buzz, and base it off of what Fivestar does to show pretty stars instead of ugly radio buttons. Will probably need to duplicate a ton of logic from theme_service_links_build_link(). Meh. But, at least we could make this icon behave consistently with the others (for example, none of Yahoo! Buzz's widgets are "Text only" or "Icon with 'Yahoo! Buzz' next to it").
Comment #16
quicksketchNote: I actually submitted this issue as a Buzz article so that we can test our makeshift implementation against existing stories.
Comment #17
quicksketchSorry I keep crossposting :P
Here's a patch that should work fully. Unfortunately Buzz just has an unbelievably crappy API and everything has to be submitted via a POST request. This patch makes a few necessary changes to add a class to Buzz links and adds a buzz.js file that handles the submission of Buzz links.
Comment #18
webchickThis looks good. The only thing I'd recommend is naming the JS something more generic like "service_links.js" because chances are this isn't the first service that's going to need this kind of goofy workaround.
Comment #19
webchickHere we go.
Comment #20
Anonymous (not verified) commentedWhat about for version 5.x-1.0?
Comment #21
Anonymous (not verified) commentedComment #22
xjessie007 commentedI do not know how much useful this page is, but I found one page that talks about Yahoo Buzz related to Drupal, so I am posting it here:
http://drupal.org/files/issues/service_links-yahoo-buzz-265391-19.patch
They say a form is needed in the service_links module.
----
Your resource for finance and IT!
Central European Center for Finance and Management
Comment #23
Anonymous (not verified) commentedThat is the same patch listed in comment #19.. When I apply the patch to Drupal 5 it #2 (at line 329) and #3(at line 343).. I'm assuming this is because its new code since introduced for drupal 6. Is there any way I can get this working with version 5?
Comment #24
Fayna commentedSubscribing so I can try out the patch when I get home!
Comment #25
jwilson3patch in #19 worked for me on 6.x-1.0, Thanks!
Comment #26
robloachI'd rather not use the JavaScript and just instead use the straight link tag. Here's the patch for both Drupal 5 and 6 branches, and the required images/buzz.png.
Comment #27
TheCrow commentedRob patch added in 5.x and 6.x dev. version,
thank you alls for this interesting issue!
Comment #29
tagorder commentedHi, I just got a note from the folks at Yahoo Buzz! noting that the correct way to implement the non-JS version of the Buzz button is as follows:
http://buzz.yahoo.com/buzz?publisherurn=PUBLISHER_URN&targetUrl=TARGET_U...
PUBLISHER_URN is for those who have a publisher relationship with Yahoo Buzz
TARGET_URL, HEADLINE and SUMMARY are self-explanatory
I'd recommend this generic change to the current service_links module, starting line 391:
To be more complete (and this is what I have implemented on fastcompany.com, for now) perhaps the Yahoo Buzz! publisherurn could be added as an admin setting too, starting line 137:
and then:
Or is this 'overkill' ? Perhaps better addressed in the v2 release ? I'll create a patch if there's interest in this approach.
Comment #30
TheCrow commentedHello kiwinyc, i guess this publisherurn must be a nickname... what about if someone doesn't have it? The param must be passed empty or is better leave it?
For 1.x branch it can be added soon, in 2.x at this point i'm thinking to provide some more hook for expand the tags
Thank you! :))
Comment #31
robloachHere it is for the 6.x-2.x-dev version. This doesn't include publisherrun because I think we should add service-specific settings in the hook itself.... Maybe something like:
Out of scope for this issue though. We should open a new issue for service-specific settings and then stick publisherrun in there. Thanks for noticing that, Jason!
Comment #32
robloachWhoops, it's targetUrl.
Comment #33
robloachIt's already in there, but it's broken. This patch fixes it.
Comment #34
robloachhttp://drupal.org/cvs?commit=247994