As quicksketch mentioned on IRC, there is a lot of javascript rollover effects in the latest dev of fivestar, which makes it more difficult to use form_alter() to change the title of the fivestar widget.

So it'd be good to add a "Title" option within the fivestar labels so that a user can replace "Average:" or "Your Vote:" with their own custom description of what is being voted on. That'd take care of feature and support requests like this: http://drupal.org/node/197894

There is a pending admin UI issue to be solved with this.

Should there be a checkbox that then overwrites the "Average:" and "Your Vote:" titles?

Or should there be an additional "Star Display Style" option of custom star title -- even though it doesn't really have anything to do with the actual display of stars. It has to do with what the title is doing...

Either option doesn't seem to be ideal.

CommentFileSizeAuthor
#10 fivestar_widget_title.patch3.43 KBdavemybes

Comments

quicksketch’s picture

I'd probably say just include text boxes for entering a title. These would default to 'Average' and 'Your vote' (the current labels). I wonder if it's going too far, the admin configuration is becoming a daunting place. Perhaps what's really needed is adequate documentation on how to theme the output, where this functionality can all be over-ridden.

KentBye’s picture

I like the idea of just including the additional text boxes in the fivestar label admin section without any additional checkboxes or drop-down items.

And I don't think it'd be overwhelming -- especially if you add some javascript to hide the "Cancel label" textbox on default, and then dynamically selectively show the toggle the textboxes depending on which option for "Star display style:" was selected.

For example:

* Display average vote value
Show admin Textbox for "Average:" ONLY
Hide admin textbox for "Your Rating:"

* Display user vote value
Show admin Textbox for "Your Rating" ONLY
Hide admin textbox for "Average:"

* User vote if available, average otherwise
Show admin Textboxes for "Average:" & "Your Rating"

* Both user and average vote
Show admin Textboxes for "Average:" & "Your Rating"

For overwriting the title, I think the most common use case would be to select Display average vote value since "Your Rating:" is never displayed. Then the user could replace "Average:" with whatever descriptive instructions they please.

For example, looking at YouTube, they say "Rate:" -- which is an action verb telling the user what to do.

After a user submits a rating, the "Rate:" title disappears, and they replace the text description with "Thanks for rating!" without the option to re-vote -- until you reload the page. Then the "Rate:" reappears, and the user can vote again.

quicksketch’s picture

I think both textboxes would probably be visible most of the time because the way Fivestar now update the title as you mouse over an option. If displaying the 'Average' only set of stars, even when you mouse over the text is changed to 'Your rating'. I could see a common use-case for these text fields would be setting both the textfields to the same thing, this would keep the title from ever changing whether the user mouses over or not. So the only case where any text field could be hidden would be the "Display user vote value" option, because 'Average' is never shown.

Anyway, I'll think about this as an option. We're looking at the Fivestar admin area as a place where we've incrementally increased options. I have a feeling it's already quite over-whelming to a new user.

KentBye’s picture

Cool.

And I just read what you said about the cancel label textbox here: http://drupal.org/node/203155#comment-667515 -- and so scratch the idea of hiding the "Cancel label" textbox on default.

As far as an overwhelming admin, I think the "Direct rating widget preview:" is a giant UI leap forward since you can mess with the settings and see what it effects immediately.

I was most confused in trying to visualize the differences between "Teaser display:" and the "Full node display:" and I'll open up a separate issue with a pretty minor bug and idea.

captcha’s picture

If we could get documentation on theming the output, it would throw open the door for a lot of customizations.

We would like to add a simple title 'Please rate this article' kind of thing.
If there is enough documentation on making such changes, we can get the flexibility we need with customizing titles and text.

jereme.guenther’s picture

For what it is worth, I am new to the fivestar module, and I absolutely love all the admin options. At most maybe have some collapsible areas, but for me, the more choices the better.

Guevara’s picture

Here is a dirty solution to change the labels "Average:" and "Your rating:"

1. Open the fivestar.module
2. Search for t('Your rating') and replace it with t('Yourlabeltext')
3. Same for t('average')

dgtlmoon’s picture

editing modules ;'(

dgtlmoon’s picture

You can set the title on a per-content-type basis but this patch needs to be applied first as theres a bug in the settings see http://drupal.org/node/227806

davemybes’s picture

Status: Active » Needs review
StatusFileSize
new3.43 KB

On a couple of projects, I have been asked to change the "Average" title as well, and up until now I have been doing other tricks to do that. I have not ever been able to do it using theme overrides, because I don't believe it can actually be done at that level. Please correct me if I'm wrong (and provide the location in the theme function too, please).

So, assuming it can't be overridden, I created a patch where you get a new text field to enter in the widget title, on a given node type. This patch is against 5.x-1.12. I didn't include the "Your Vote" text, because I didn't think it necessary. However, I'm sure I can get that in as well, if people desperately want it.

So feel free to give the patch a go, and let me know if there are any problems. Everything still seemed to work fine on my 5.7 install after patching.

prasoon gupta’s picture

Version: 5.x-1.x-dev » 6.x-1.12
Category: feature » bug
Priority: Normal » Critical

installed Drupal 6.2 and added Fivestar Module to enable rating for my node.

FivestAR requires VotingAPI module.. i added that too..

I changed the colors of the Stars.. and style.. and later on clicking to vote it Gave the following error..

"user warning: Unknown column 'vote_source' in 'field list' query: INSERT INTO votingapi_vote (content_type, content_id, value, value_type, tag, uid, timestamp, vote_source) VALUES ('node', 49, 100, 'percent', 'vote', 1, 1213513527, '117.198.129.187') in /home/computl9/public_html/creativeteensclub/ctc/includes/common.inc on line 3303."

CAN ANYONE help me dealing this error

quicksketch’s picture

Version: 6.x-1.12 » 5.x-1.x-dev
Category: bug » feature
Priority: Critical » Normal

@prasoon, Hi, could you open a new support request for your problem? This thread of conversation is for adding customizable titles to Fivestar (thanks for that patch btw incrn8). What you've done is "hijack" the issue, turning it into something else. We try to keep all issues to a single line of discussion so people can find issues more easily. So, go to http://drupal.org/project/issues/fivestar, and click "Create Issue" at the top of the page to start a separate request.

ToddThomson’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

For the fivestar module (version 6.x branch), it would be an improvement if:

For each content type with enabled direct fivestar support, the widget title could be customized.

I would use the following options: None, default, custom

Thanks for a great module!

quicksketch’s picture

Status: Needs review » Needs work

After adding in the ability to rate on multiple axis, we need the ability to set a title for each individual axis. I think this request is likely to be accounted for in #317317: Rate on multiple axis with admin UI.

davidwhthomas’s picture

SOLUTION:

Use the stringoverrides module ( http://drupal.org/project/stringoverrides ) or your preferred translator / localization module to translate the title in the t() function to whatever you want.

DT

quicksketch’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

#317317: Rate on multiple axis with admin UI has been committed. Let's take care of this request in the 2.x version of Fivestar. Now that we have dedicated settings pages for widget configuration options, we'll be able to make this an option much easier.

Mark B’s picture

I'm not sure overriding the string is a good solution. I want to change the word "Average" to "Average Rating", but "Average" is a fairly common word - I don't want it changing globally across my entire site. I only want to change the Fivestar widget label.

luckydad’s picture

Thanks for a great module. Subscribing.

dmetzcher’s picture

Has this feature been added yet? Just want to be sure I'm not missing it somewhere. Last comment was 11 May 2009, with a mention of an upcoming 2.x version.

WeRockYourWeb.com’s picture

Same here. Using the hack in #7 until this is added/ resolved.

jksloan2974’s picture

Not sure if this is the best solution, but it works and you don't have to edit the module.

Add the following to your template.php file. This will change the "Your rating": to "Was this helpful"

function yourthemename_preprocess_node(&$vars, $hook) {
$vars['content'] = str_replace('Your rating: ','Was this helpful?',$vars['content']);
}

whiteph’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Sorry, Drupal 6 is end of life, and is no longer supported.