We've built this simple "I like this" module for one of our projects, and I'd like the maintainers of Plus1 to evaluate if this code could be added/integrated to Plus1 as an option in order to provide the "I like this" feature (as seen on Facebook).
I personally consider this "I like this" would be a nice addition to Plus1, and I don't think it should be _another_ module on d.o.
Attached you'll find the module, for you to review and for anyone who may be needing such a feature quick ;-)
Thanks in advance, I'll be looking forward to your comments.
Comments
Comment #1
voxpelli commentedWhat is it that this add to Plus 1 that isn't already in Plus 1? Is it only the text that has changed or is it more? Can you provide screenshots or other more detailed description?
Comment #2
mariano.barcia commentedWell, there is the text, and the text placed in the links area, with the proper links structure. See attached sshot.
PS: The previous zip was not working. Please try with this one, should fix the problem. Thanks.
Comment #3
mariano.barcia commentedbad sshot filename, renaming...
Comment #4
voxpelli commentedWhat has been changed in the link structure?
I feel that what this feature request is ultimately about is to be able to specify custom texts for the different states of the Plus 1 link - preferably token-enabled texts. I don't remember if and how we currently do that in Plus1 though.
Perhaps we could take some inspiration from how the Flag module does this?
Comment #5
mariano.barcia commentedThe "I like this" module makes use of the hook_link to position the link (that's the "links structure" I was referring to). It resembles the same functionality in Facebook. Fivestar does something similar, just that it places the 5-star widget there.
IMHO, is more natural to most people to express "I like it" than to express "vote" or "subscribe". Both ways end up casting a vote in the voting API, but they are 2 different ways of approaching the end user.
I didn't provide a patch to Plus1 because it was quicker to assemble a separate module.
Based upon this module, I can suggest guidelines for a patch to Plus1 that would add value to the module:
In the settings, add
- Choose the style
1. Plus1
2. I like this
Then,
- test in hook_nodeapi for the style selection, only show Plus1
- test in hook_link for the style selection, only show "I like this"
- modify the JS file to accomodate both cases, with a big IF or modifying the find() to work with both markup structures.
What do you think?
HTH, cheers
Comment #6
madjr commentedwell i will be using both styles
i really like +1 for comments (specially useful in forums where users "+1" other users)
for pictures and similar nodes i'll be using "i like this"
so if they're ever integrated then selecting the style for each content-type/comments would be a huge plus :)
anyway am not really sure if using both at the same time would conflict with drupal or the database..
Comment #7
youkho commentedThanks for this little module could you please add reverse as when "i like this" i can also click "i don't like this anymore"
Comment #8
nancydruThis is pretty much like the hacked up version my customer was using, so I pretty much understand it. And, yes, it is largely the text and the link. All that is fairly easy to fix. As a matter of fact, my version (to be committed) has the text set up as configurable options.
Comment #9
nancydruAll ready to go. Includes sample css (commented out) to do what I did.
Comment #10
nancydruComment #11
nancydruCommitted to 6.x-2.x-dev.