Introduction ort_mdj_rating is a Ajax rating system based on Unobtrusive AJAX Star Rating Bar Features * Use CSS for ratings * IP limiting * scalable voting bar 1 to 10 unit * uses Ajax Usage and Tags is used to draw voting bar Attributes: * id: default is current article id (uses $thisarticle[‘thisid’]) and most of the cases you don’t have to specify this. If you want to show rating bar for a diffent article find its article id on articles list. e.g. on index: vote for my awsome “AAA Titled” article where “x” is my “AAA Titled” article id (integer) * units: number of rating units you want to use, default is 10. 10 is upper limit. * unitwidth: Width of a rating unit in pixel, default is 30. Note that unitwidth is not used for styling, in rating.css default value 30px used so if you change it you shoul edit the rating style sheet * firstvote: Give your fist vote for all articles, default 7 is used for neccesary javascript and css files. Attributes: * js: default is empty, it used for uploaded .js file id INSTRUCTIONS 1. Installation: * Upload css_rating_sql.php and rating.php to your Textpattern directory. (You can skip this see 2) * Upload 2 images in images folder to images directory. Important, do not change the image's name. * Upload the rpc.php to root directory (it handles ajax requests) * Go to css_rating_sql.php e.g. http://www.yoursite.com/textpattern/css_rating_sql.php * Delete css_rating_sql.php you get the success message * Install ort_mdj_rating * Upload the rating.js file in files folder via Textpattern interface or directly to files folder. * Put the tag which is used to draw voting bar. I.e. "Default Form", after tag. * Put the tag which is used for neccesary javascript and css files. This should be placed in tags (Presentation - Pages). * Paste the rating.css content in your default Style Sheet. 2. Creating Rating SQL table (Optional, skip this if you do 1. step) Following table is used for rating data you can run this sql code via phpMyAdmin CREATE TABLE IF NOT EXISTS `txp_ratings` ( `id` int(10) unsigned NOT NULL, `total_votes` int(10) unsigned NOT NULL, `total_value` int(10) unsigned NOT NULL, `used_ips` longtext NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM;