• Resolved JustT2552

    (@justt2552)


    Hi,
    I have been trialing the free version.
    I have been trying to edit the “Custom Field” wp_review_review_count
    I Update the new number Eg. from 3 to 256
    I refresh the front end and the User rating is now 256
    however when someone adds a NEW User Rating it then reverts back to 4?

    Is there anyway I can edit the User rating, this is how many we originally have and I dont want to start from scratch again.

    2. Also I noticed that you can not revote if you are on the same ip address, is this set to a specific time eg 1day, 1 week? or for as long as you are on the same ip?

    Thanks in Advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    1. That counter post meta is only a cache of the number of ratings, and it gets recalculated when the number changes. You’ll need to adjust the function that calculates it, look for function mts_get_post_reviews in includes/functions.php.
    For example, you can insert the following code:
    if ( $post_id == 123 ) $count += 256;
    Right after this line:
    $count = count( $comments );

    2. It has no time limit, it just stores IP and doesn’t allow rating from the same IP again. To change this you can adjust the function hasPreviousReview in the same functions.php file.

    Hope that helps.

    Thread Starter JustT2552

    (@justt2552)

    Ok Cheers I will give it a go

    Thread Starter JustT2552

    (@justt2552)

    HI Again,
    Thanks for the code above.
    The first code worked however the 4.8 Stars went doen to like .25 as the ratio was out.
    So I didnt use this method.

    Could you please tell me exactly what I would have to do with
    function hasPreviousReview
    to remove the ip address block.

    Thanks in advance.

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    Kindly try replacing

    
    set_query_var( 'wp_review_ip', $ip );
    add_filter( 'comments_clauses', 'wp_review_filter_comment_by_ip' );
    

    with

    
    return false;
    

    Hope that helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editing Ratings’ is closed to new replies.