colorrating

NP_ColorRating

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

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin...
  3. Set the permissions on nucleus/plugins/colorrating/rating/database/ to 777 (read-write-execute by all)
  4. Set the permissions on nucleus/plugins/colorrating/rating/database/ratings.sqlite to 666 (read-writable by all)
  5. Add <%ColorRating(scripts)%> to your skins, which will include all of the needed css/js files. If you want to keep your pages (X)HTML compliant, keep that tag in your pages <head> section.

How to use the plugin

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%>

Available SkinVars

<%ColorRating(scripts%> - Used to add required css and javascript files to pages. Put in the head section of your skins.

Available TemplateVars

<%ColorRating%> - Used to add colorrating rating stars and rating form (javascript/ajax) to your items.

Available ItemVars

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)%>

Options

none

Compatibility

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.

Wishlist

Bugs

History

  • Version 1.01 11/03/2009 - fix issue where function being called when it is not loaded, especially on pages like the RSS feed.
  • Version 1.00 10/22/2009 - initial release.

Plugin review

NP_ColorRating version 1.00 works with Nucleus CMS version 3.50 - 2009-10-22 ftruscot

 
colorrating.txt · Last modified: 2010/09/01 09:29 by dobermann