I would like to propose simple feature that will bring module to Semantic Web aka Web 3.0.
As You probably don't know Google have just added feature to it's Search Engine Result Pages which prints review as 5stars! Example: http://www.google.com/search?hl=en&q=cairo+nights+san+francisco&btnG=Goo... What You see there is nothing really special. On the website http://www.yelp.com/biz/cairo-nights-san-francisco there is simple code like this: <img class="stars_4_half rating average" width="83" height="325" title="4.5 star rating" alt="4.5 star rating" src="http://static.px.yelp.com/static/20090605/i/new/ico/stars/stars_map.png"/> Before You will understand please read one more thing: http://www.google.com/support/webmasters/bin/answer.py?answer=146645 Now Google uses this and it will be good if module can go with this trend...
What is needed as I understand is to add <span class="rating"> somewhere.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | fivestar_hreview.patch | 1.17 KB | rupl |
Comments
Comment #1
quicksketchThanks for the link and making an issue, this is on the TODO list already.
The concept is rather simple, but there's often a lot of data that is outside of Fivestar's control regarding the markup. For example, trying to make a complete "review" requires not only the Fivestar rating, but also the title and contents of the reviews, which is outside the scope of the output Fivestar provides.
Regarding "aggregated" reviews, Fivestar at least has a little more responsibility here.
Is actually not far off from what we're using already:
So at least that could be fixed just by changing the name of some classes for the most part, but again the "title" of the item being reviewed isn't within the scope of Fivestar's output. Changing these classes will most definitely break existing CSS on sites that have themed their Fivestar widgets, so this is definitely in the "2.0" category for Fivestar since we don't want to break existing sites in the 1.x version.
Moving to active, "needs review" is for issues with patches or documentation changes.
Comment #2
ruplIt shouldn't be fivestar's job to output a complete hReview. To sufficiently offer hReview functionality, it only needs to output the 'rating' class in the appropriate areas:
For static display, all you have to do is add the class 'rating' around the initial div which contains the rating (line 1384 of fivestar.module,v 1.13.2.56)
$first = $n == 1 ? ' star-first rating' : '';For vote-enabled display, wrap rating around the !stars output for the Average rating (line 1418 of fivestar.module,v 1.13.2.56)
$output .= '<span class="average-rating">'. t('Average: <span class="rating">!stars</span>', array('!stars' => $average_stars)) .'</span>';Comment #3
ruplI downloaded the latest copy of fivestar (1.18) and attempted to create a patch like I described above (http://drupal.org/node/495118#comment-1883448). This is my first patch so please let me know if I'm messing anything up!
Comment #4
ericduran commentedEven thought this issue is older, I'm going to close it as a duplicate of #901260: Google microdata markup? mainly because there's been more discussion on that issue.