Simplerunner
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [WP-PostRatings] Insert ratings info between upvote and downvoteHey I know you don’t provide support for modifications but I’m stuck badly.
I followed your link and replaced the image loop with this$total_score = get_post_meta($post_id, 'total_score' , true); $ratings_images .= '<img src="'.plugins_url('/wp-postratings/images/'.$ratings_image.'/rating_1_on.'.RATINGS_IMG_EXT).'" class="post-ratings-image" alt="'.$ratings_text.'" title="'.$ratings_text.'" onmouseover="current_rating('.$post_id.', 1, \''.$ratings_text_js.'\');" onmouseout="ratings_off('.$post_rating.', '.$insert_half.', '.$use_half_rtl.');" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" />'; $ratings_images .= '<span>'.$total_score.'</span>'; $ratings_images .= '<img src="'.plugins_url('/wp-postratings/images/'.$ratings_image.'/rating_2_on.'.RATINGS_IMG_EXT).'" class="post-ratings-image" alt="'.$ratings_text.'" title="'.$ratings_text.'" onmouseover="current_rating('.$post_id.', 2, \''.$ratings_text_js.'\');" onmouseout="ratings_off('.$post_rating.', '.$insert_half.', '.$use_half_rtl.');" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" />';
It works great for showing a total score for each post between the up and down rating images. BUT, whenever someone upvotes or downvotes, the Ajax reloads the ratings and the score on that post dissapears. In fact the $total_score on that post are
not shown to the user as long as he is logged in. Could you please tell me what I’m missing here?Thanks again.
Viewing 1 replies (of 1 total)