PROJET AUTOBLOG


Ona Hole Review

Archivé

source: Ona Hole Review

⇐ retour index

New rating system

vendredi 8 mars 2013 à 21:03

Introducing a new rating system :)

I had it on my mind for some time now, but looking at ToyDemon’s source code gave me a concrete example of microdata usage. Reading Google’s support pages and experimenting did the rest, spent a couple of hours on this.

With the HTML5 meter tag, 4 criteria are considered with a rank from 0.0 to 10.0. The overall rating is the total average divided by 2, which gives us the very standard 1.0 – 5.0 rating. This one will be converted and showed as stars in the Google result pages, something nice :) This rating system makes it easier for third-party software to extract my ratings for each products, unlike my “hearts in image”.

By the way: maybe PHP developers here will be interested in the PHP code behind the old rating system, so here’s the source code with generation script. For the new rating system I just use a new “gen.php” because I’m lazy, helps me to quickly and accurately write the HTML 5 code for each product. And here it is.

Changes will be seen by Google in a few hours or days only, so don’t worry if it doesn’t work yet :)

Ah, something else: the meter tag isn’t supported everywhere yet. Firefox, Chrome, Opera, Safari and their derivatives support it perfectly. Don’t know how it comes out on iPhone/iPad, but the Android browser 4.1.2 doesn’t (just use Firefox Mobile or Opera Mini). And what about Internet Explorer ? Even Internet Explorer 10 doesn’t. Just use a real browser and leave IE alone.

See ya :)