Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | fivestar_link.patch | 2.54 KB | quicksketch |
#2 | fivestar_add_rate_link_1.diff | 1.61 KB | chip |
fivestar_add_rate_link.diff | 1.31 KB | chip | |
fivestar_add_rate_link_screenshot.png | 163.84 KB | chip |
Comments
Comment #1
quicksketchThanks 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.
Comment #2
chip CreditAttribution: chip commentedI 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.
Comment #3
quicksketchI 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.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.