Add "rate" link to node teaser
chip - December 22, 2007 - 19:56
| Project: | Fivestar |
| Version: | 5.x-1.11-beta3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
The attached patch adds a "rate" link to node teasers when the fivestar form is set to "hidden" on the teaser.
Also attached is a screenshot showing what the patch does.
| Attachment | Size |
|---|---|
| fivestar_add_rate_link_screenshot.png | 163.84 KB |
| fivestar_add_rate_link.diff | 1.31 KB |

#1
Thanks chip for the patch, but I'd prefer to avoid adding this link because I think more people would want to remove the link than keep it. With the admin forms ballooning like crazy I'd prefer to keep the configuration simplified where possible. If adding a link to nodes for rating, I'd suggest using a hook_link in a custom module for the site or using custom_links module.
#2
I reviewed this issue at the Austin Drupal User group meetup last weekend, and people have confirmed the difficulty in getting visitors to rate content and the value of exposing a "rate" link in the teaser. So, I took another cut at the patch to address the configuration complexity concern you raised.
In the attached patch, it makes the rate link configurable by adding an "Add rate link" entry to the already existing "Teaser display" control. So now the "rate" link becomes configurable without creating any additional controls or configuration variables.
Hope this is more to your liking.
#3
I tweaked the patch a bit to use the existing ID on the form rather than create an empty anchor tag. Attached patch includes these changes.
I also rolled in the changes from http://drupal.org/node/203182, updating the names of the select list options.
#4
Automatically closed -- issue fixed for two weeks with no activity.