Okay
  Public Ticket #158904
user can fake ratings on the comment box
Closed

Comments

  • Evil started the conversation
    user can fake their ratings on the comment box! they can rate different ratings on the top but they can also post a comment with their fake ratings. For example: I can use the ratings on the top and put 100% on the ratings but at the same time I can also comment in the box and show the public that I rated the article different from what I put in the upper ratings. I think I'll just disable the ability to use the ratings on the top for now until the new update. (hope they fixed that on the next update)
  • Evil replied

    For temporary quick fix:

    I want to know how to disable the user's ability to use the ratings on the top. Thanks.

  •  326
    Brian replied

    This is a known issue. Keep in mind, if a user rates on the top and then refreshes the page they will no longer be able to rate in the comments. It's only if the user attempts to rate the top and then the bottom without refreshing the page. It's on the list of future theme fixes. In the meantime, to disable top ratings, change line 591 of the inc/scripts-ajax.php file from:

    jQuery('body').on('mouseover', '.user-rating .rating-wrapper.single', function(e) {	

    to:

    jQuery('body').on('mouseover', '.user-rating2 .rating-wrapper.single', function(e) {	

     

  • Evil replied

    Nice! Thanks Brian :)

  • Kalle replied

    I just tried this quick-fix, but it doesn't work :-( Both tried line 591 and 596...

     

    Any other suggestions?

  • Evil replied

    Are you trying to prevent them to fake their ratings on comment box? Or they can rate multiple times?

     

    go appearance >> theme options >> advance >> uncheck "Allow Unlimited User Ratings"

  • Kalle replied

    Thanks Evil Clown ... hmmm, didn't think i'd utter those words waking up this morning :-) 

     

    Am trying to remove the option to rate at the top for three reasons: 

    1) think it's confusing, that a user can rate at the top AND at the bottom

    2) when rating at the top, no comments are added ..and maybe because the user it not aware, that this is possible

    3) the user maybe leaves before seeing the content of the post

     

    Therefore: i'd like the rating at the top of the page disabled. Perhaps by disabling the mouseover effects ..but can't get it to turn off :-(

  •  326
    Brian replied

    @Evil Clown: did the code change I gave you actually have the desired effect?

    @Kalle Pedersen: Are you sure you're referring to the Flavor theme and that you edited the correct lines of code?

  • Kalle replied

    Yep...

  •  326
    Brian replied

    Then I'll need to wait and see what Evil Clown responds, because the first thing to check is whether or not that code even worked in the first place, which I was able to discern 100% based on his first response...

  • Evil replied

    @brian yeah mine is good now.

     

    @kalle

    I set up mine like this:

    User's need to log in first before they can rate and they can only use the rating system at the bottom.
     

    1) disable the top rating area if user IS NOT logged in.
    Open the inc/scripts-ajax.php file and locate this code from line 590:

    from:

    // user rating panel display
    	jQuery('body').on('mouseover', '.user-rating .rating-wrapper.single', function(e) {				
    		jQuery(this).children('.rating-bar').addClass('over');	
    		jQuery(this).children('.rating-bar').children('.rating-meter').hide();	
    		jQuery(this).children().children('.form-selector').show();		
    	});
    	jQuery('body').on('mouseleave', '.user-rating .rating-wrapper', function(e) {				
    		jQuery(this).children('.rating-bar').removeClass('over');	
    		jQuery(this).children().children('.form-selector').hide();
    		jQuery(this).children('.rating-bar').children('.rating-meter').show();			
    	});

    Change it to:

    <?php if(is_user_logged_in()) { ?>
    // user rating panel display
    jQuery('body').on('mouseover', '.user-rating .rating-wrapper.single', function(e) {				
    	jQuery(this).children('.rating-bar').addClass('over');	
    	jQuery(this).children('.rating-bar').children('.rating-meter').hide();	
    	jQuery(this).children().children('.form-selector').show();		
    });
    jQuery('body').on('mouseleave', '.user-rating .rating-wrapper', function(e) {				
    	jQuery(this).children('.rating-bar').removeClass('over');	
    	jQuery(this).children().children('.form-selector').hide();
    	jQuery(this).children('.rating-bar').children('.rating-meter').show();			
    });	
    <?php } ?>

     

    2.) disable the top rating EVEN IF user is logged in:
    Open the inc/scripts-ajax.php file and locate this code from lineline 602
     

    from:

    jQuery('body').on('mouseover', '.user-rating .rating-wrapper.single', function(e) {

    Change it into:

    jQuery('body').on('mouseover', '.user-rating2 .rating-wrapper.single', function(e) {	

     

    3.)  Remove "Hover to rate" text above rating system on the top.

    from:

    if(!$user_ratings_top_disable) $out.='<div class="hovertorate"><span class="icon-down-bold"></span><span class="hover-text">'.__('Hover To Rate',IT_TEXTDOMAIN).'</span></div>';

    change it into:

    if(!$user_ratings_top_disable) $out.='<div class="hovertorate"><span class="icon-down-bold"></span></div>';

     

    4.) Remove the down arrow beside hover to rate text (#3)

    Add this to your custom CSS theme option:

    .ratings .header .hovertorate {display:none;}
  •  326
    Brian replied

    @evil clown: I don't think your response is clear or thorough enough. lol jk

  • Evil replied

    lol i know right :)) kudos to you @brian. those are all your codes.