Forum:SH:Article rating

Hello,

I'm the founder of the game cloud and I have a feature that may interest you. I have coded a page rating on each article like at the end of this page. This is how to add this: background-image:url(http://images.wikia.com/uncyclopedia/images/8/81/Star-rating.png); background-repeat: no-repeat; background-color: transparent; list-style: none; width: 17px; height: 17px; float: left; text-indent: -9000px; padding: 0 1px; cursor: pointer; } .ratingUser { background-position: 0 -34px } .ratingAvg { background-position: 0 -17px } importedScripts = {}; // object keeping track of included scripts, so a script ain't included twice function importScript( page ) { if( importedScripts[page] ) { return; }    importedScripts[page] = true; var url = wgScriptPath + '/index.php?title=' + encodeURIComponent( page.replace( / /g, '_' ) ) + '&action=raw&ctype=text/javascript'; var scriptElem = document.createElement( 'script' ); scriptElem.setAttribute( 'src', url ); scriptElem.setAttribute( 'type', 'text/javascript' ); document.getElementsByTagName( 'head' )[0].appendChild( scriptElem ); }
 * 1) Duplicate MediaWiki:WikiaRating.js
 * 2) Add this code to MediaWiki:Common.css:
 * 1) p-rating div { text-align: center }
 * 2) ratingStars a { color: #e3e3e3; font-size: 16px; font-weight: normal; cursor: pointer }
 * 3) ratingStars a:hover { color: gold; text-decoration: none }
 * 4) ratingStars li {
 * 1) ratingStars { height: 20px }
 * 1) Add this code to MediaWiki:Common.js:

importScript("MediaWiki:WikiaRating.js");

If you want, you can put all the javascript code in MediaWiki:Common.js instead of importing it. You can change the stars by replacing this image by another one: http://images.wikia.com/uncyclopedia/images/8/81/Star-rating.png

You can ask me questions here. 05:36, November 24, 2012 (UTC)