Awesome, Finally I get it works, after adding this line
it guided me to what was missing, first of all, the files URL's isn't correct, then the DB tables were missing, and finally, it works
Actually, I found
tons of other scripts but no one can be that easy to set up with powerful features like yours, Also, I have tried the voting script (thumbs up and down) but I stuck in getting the actually rating stats like the star rating script does.
I wanted to fill these values for Google rich snippets:
Code: Select all
<div class="rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="5" />
<meta itemprop="worstRating" content="1" />
<meta itemprop="ratingValue" content="{$votes}" />
<meta itemprop="ratingCount" content="{$nvotes}" />
</div>
The thumbs up script won't give these values as it appends endless numbers!
I am already using a star rating script (but it's too old and not working with PHP 7.3.5).
but yours works great. here is an example of the output I wanted:
al3abmizo.com/games/shooting/play/5247
Code: Select all
<div class="rating" itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="5">
<meta itemprop="worstRating" content="1">
<meta itemprop="ratingValue" content="4.1">
<meta itemprop="ratingCount" content="239">
</div>
- Which generate this:
i.ibb.co/vkKtnGh/rating-output.png
Thank you.