NP_ColorRating adds ColorRating functionality to Nucleus items. ColorRating is a javascript/ajax star-based rating system developed by Jack Moore at Color Powered. ColorRating requires the PDO extension for PHP with the sqlite driver enabled, and thus may not work for everybody.
NP_ColorRating does not allow for listed the best rated items, and it will restrict rating to once per item per IP address. It is mostly a visual way to show readers how others rated an item. It is easy for your visitors to quickly rate the items.
| General Plugin info | |
|---|---|
| Author: | Frank Truscott, based on ColorRating by Jack Moore |
| Current Version: | 1.01 |
| Download: | Here |
| Forum Thread: | Here |
| Demo: | demo |
Using NP_ColorRating is very easy. Add the following variable to your Item Body, Item Header, or Item Footer fields in the templates used by your skins to display index and/or item pages.
<%ColorRating%>
<%ColorRating(scripts%> - Used to add required css and javascript files to pages. Put in the head section of your skins.
<%ColorRating%> - Used to add colorrating rating stars and rating form (javascript/ajax) to your items.
itemVars are nucleus tags in the Body (or Extended) fields of an item.
<%ColorRating%> - Used to add colorrating rating stars and rating form (javascript/ajax) inside your items. The current item will be rated.
<%ColorRating(identifier)%> - Used to add colorrating rating stars and rating form (javascript/ajax) inside your items. The identifier will be a unique string that identifies the thing you want to rate. It should be alphanumeric for best compatibility and probably have no spaces, though these rules are not enforced.
This last form could be useful if you want to rate some list in your item. Say you have written a number of plugins that you make available for download on a single page and you want your users to rate your plugins. You may have an item that looks like this (simplified, of course):
My Plugins * NP_Fred - A grumpy old plugin that doesn't like to do anything. <%ColorRating(NP_Fred)%> * NP_Ethel - An easily influenced foil to NP_Lucy. <%ColorRating(NP_Ethel)%> * NP_Lucy - The star of the show, but always causing some trouble. <%ColorRating(NP_Lucy)%> * NP_Ricky - Language-impaired nemesis to NP_Lucy, but always ends well. <%ColorRating(NP_Ricky)%>
none
As with all javascripts, there is possibility of this script conflicting with other scripts on your site.
It seems that if you are also using NP_ColorBox, you must put <%ColorRating(scripts)%> before <%ColorBox%> in your head section.
Please report any other compatibility issues to the forum thread for discussion: Forum Thread.
NP_ColorRating version 1.00 works with Nucleus CMS version 3.50 - 2009-10-22 ftruscot