Downloads » Resources » AnythingRating

AnythingRating

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Votes: 2

AnythingRating 1.0

Works with MODx Version(s): 0.9.6
Submitted: Sep 23rd 2008 | License: Creative Commons | Downloads: 402

An Ajax dynamic star rating widget for MODx


Description

Wiki documentation
Demo site

See anythingRating_readme.txt in the zip file
  • Uses AJAX Post (simple js script, no JS library like mootools needed)
  • Unobtrusive (works with javascript disabled)
  • Use as many rating group you want
  • Rate as many items you want without any TV definition
  • Checks not only against IP upon vote but includes also a cookie check
  • Precise rating to a 2 decimal place
  • Pre-loads common images
  • Multi-languages (French, English, ...)
  • Tested in IE 7, Firefox 2.x, Opera and Safari

  • Rating group - Define your rating group once only per page:
    • Choose the number of "stars" (or any other image)
    • Define an end date for the contest
    • Style the rating information you want with the template
    • eg: 3.25/5 stars 65% (205 votes)
    • Change the "star" image by changing the css style sheet
    • Precise the number of IP addresses stored. Store the more recent addresses
    • Decide if multi-vote is allowed or not
    • Choose if only registered users could vote or not

  • Rate anything you want with a unique id :
    • Link your rated item to a rating group for contest
    • Ability to set 'novote' option to not allow users to vote for this item
    • Initialize the first rating from a named Template Variable of a document

  • Display top rated items of a rating group:
    • Choose the number of top rated items
    • Choose to display the "best" or the "worst"
    • Define the linked information (title, description, image and link) from an other table
    • Style the top rated results you want with the template
    • Display as many you want your top rated lists

Weary of your contest ? Simply drop the rating group table!

AnythingRating Usage

Creating your first contest. In a document:

* Put the snippet call in the beginning of the document content:
[!AnythingRating? &define=`1` &atrGrp=`grpName`!]
* then for each item to rate:
[!AnythingRating? &atrGrp=`grpName` &atrId=`anyId`!]
* To show the top rated items:
[!AnythingRating? &getTopRated=`1` &atrGrp=`grpName` &topTableField=`tableName` &topIdField=`anId` &topTitleField=`aTitle`!]

AnythingRating parameters and examples : see Wiki documentation

Support : http://modxcms.com/forums/index.php/topic,24771.0.html

Instructions

  • Copy the contents of the file snippet.anythingRating.php into a new snippet named AnythingRating
  • Create a directory named anythingRating under the assets/snippets folder.
  • Copy the files from the zip into the anythingRating folder.
  • Add the following snippet calls:

First on the beginning of each page, a rating group definition :
[!AnythingRating? &define=`1` &atrGrp=`grpName`!]
where 'grpName' is the rating group name of items you want to rate.

Then anywhere in your page near the item to rate:
[!AnythingRating? &atrGrp=`grpName` &atrId=`idItem`!]
where 'idItem' is the id of each rated item. could be or with a maxigallery template or any other relevant id you want
And optionaly, if you want display the top rated items on the same page:
[!AnythingRating? &getTopRated=`1` &atrGrp=`grpName` &topTable=`site_content` &topTitle=`pagetitle`!]
where 'site_content' is an example of table where to search the titles of rated items

* May be edit the css/anythingRating.css file and adapt the styles to change how your rating widget looks
* May be edit the templates/anythingRating.tpl.html file and adapt the template to change how your rating widget looks.
* Do the same with templates/topRated.tpl.html
* Look below at the possible placeholders to customize your templates

Previous Releases



Extras

No results found.


( back to top )