Okay
  Print

How can I remove the decimal points from my ratings?

To remove the decimal points from your ratings open lib/inc/ratings.php and lib/sections/user-rating-box.php and find each occurrence of number_format and change the 1 within the brackets to 0, so for example this:

number_format( $GLOBALS['ghostpool_site_rating'], 1 ) 

Becomes:

number_format( $GLOBALS['ghostpool_site_rating'], 0 ) 

Next open lib/scripts/user-ratings.js and find:

if ( ghostpool_rating.rating != '' ) {
    var score = ghostpool_rating.rating;
} else {
    var score = this.readCookie('ghostpool_rating_score_' + ghostpool_rating.post_id);
}

Replace with:

if ( ghostpool_rating.rating != '' ) {
    var score = Math.floor( ghostpool_rating.rating );
} else {
    var score = Math.floor( this.readCookie('ghostpool_rating_score_' + ghostpool_rating.post_id) );
}

Find

var score = Math.floor((((((offset / ghostpool_rating.rating_width) * 100) * ghostpool_rating.rating_number) / 100) * 10)) / 10;

Replace with:

var score = Math.floor((((offset / ghostpool_rating.rating_width) * 100) * ghostpool_rating.rating_number) / 100);

Find:

score = (Math.floor(((((((e.offsetX + 4) / ghostpool_rating.rating_width) * 100) * ghostpool_rating.rating_number) / 100) * 10)) / 10), 

Replace with:

score = (Math.floor((((e.offsetX + 4) / ghostpool_rating.rating_width) * 100) * ghostpool_rating.rating_number) / 100),

Find:

var offset = e.offsetX + 4;

Replace with:

var offset = ( Math.round( ( e.offsetX + 4 ) / 24 ) * 24 );

Find:

var position = ghostpool_rating.position;

Replace with:

var position = Math.round( ghostpool_rating.position / 24 ) * 24;

Find:

position = e.offsetX + 4;

Replace with:

position = Math.round( ( e.offsetX + 4 ) / 24 ) * 24;