[TYPO3] Ratings Extension

Stephen Bungert s.bungert at metrinomics.de
Mon Mar 17 14:51:42 CET 2008


Hallo.

I have the ratings extension working with tt_news articles. I display them
as static in the article, and in a side bar I have another rating instance
as ' auto mode' so that the rating functions.

I did this so that it fits in with the graphic designers design.

That way people can see the rating in list mode without adjusting it. Then
when They go tot he individual SINGLE tt_news article page they can click on
a "rate it" button, then using javascript, the container for the auto mode
ratings instance is shown where people can vote.

I noticed some problems, the ratings were different. And The static value
never updated, I then looked in the database and saw that I now have, for
example, two refs to 'tt_news_9' instead of one.

How come the extension didn't detect that there already existed a rating for
this reference and stored the new rating in that row?

$ratingConf = array ('storagePid' => 12, 'templateFile' =>
'fileadmin/templates/extension_templates/ratings_template_sb.html',
'minValue' => 1, 'maxValue' => 5, 'ratingImageWidth' => 12, 'mode' =>
'auto', 'disableIpCheck' => 1, 'additionalCSS' => '');

$ratingsOutput = $ratingsAPI->getratingdisplay("tt_news_" . $this->newsId,
$ratingConf);

$this->newsId is the SINGLE tt_news articles number.





More information about the TYPO3-english mailing list