All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - infomancer

Pages: [1]
1
Another thing that you can do is simply tell SuperCache to clear the cache for that specific post after a rating is made. Works for me... Just add this code after "$rate_userid = intval($user_ID);"

Code: [Select]
if (function_exists ('wp_cache_post_change')) {
$GLOBALS["super_cache_enabled"]=1;
wp_cache_post_change($post_id);
}

2
I Just installed WP PostRatings and started getting the same problem immediately. In Google Webmaster Tools, /images/ and /rating_over. are generating tons of 404 errors. For now, I've simply disallowed those directories in robots.txt

I don't use any Minify plugin...

3
I managed to do it, but in an extremely roundabout way. I know very little PHP so I can hardly recommend this ugly solution. However, if anyone's interested, here it is:

1. Add the following two functions:

Code: [Select]
function the_ratings_static($start_tag = 'div') {
global $id;
$ratings_id = $id;
echo "<$start_tag id=\"post-ratings-$ratings_id\" class=\"post-ratings\">".the_ratings_results1($ratings_id).'</'.$start_tag.'>';
return;
}

function the_ratings_results1($post_id, $new_user = 0, $new_score = 0, $new_average = 0, $type = 0) {
if($new_user == 0 && $new_score == 0 && $new_average == 0) {
$post_ratings_data = null;
} else {
$post_ratings_data->ratings_users = $new_user;
$post_ratings_data->ratings_score = $new_score;
$post_ratings_data->ratings_average = $new_average;
}
$template_postratings_text = stripslashes(get_option('postratings_template_mostrated'));
return expand_ratings_template($template_postratings_text, $post_id, $post_ratings_data);
}

2. Modify the "most rated" template to include only static stars (use %RATINGS_IMAGES%)

3. Call the_ratings_static function from your theme where you want to use it, like a boss!

4
WP-PostRatings / Display only stars (no text, no votes allowed)
« on: 06 September 2011, 19:18 »
Hello,
 I am looking for a way to show only the current rating of the post (no voting allowed) in the custom loop I did for top rated posts. But I don't want to modify "Ratings Vote Text" since I'm using it for regular posts.

Basically the same static "stars" that are shown in the widget and it the comment author ratings. In the templates it's marked by %RATINGS_IMAGES%. Any way to get that from the plugin?

(I can, of course, just use get_most_rated(); and modify the template to my needs, but then I won't be able to use stuff like tags and custom fields on my "top list" page).

Edit: OK, something like this will make the stars static. the_ratings_results gives static stars, and the_ratings_vote gives the voting ones. I still can't figure out how to get rid of the text.

Code: [Select]
function the_ratings_static($start_tag = 'div') {
global $id;
$ratings_id = $id;
echo "<$start_tag id=\"post-ratings-$ratings_id\" class=\"post-ratings\">".the_ratings_results($ratings_id).'</'.$start_tag.'>';
return;
}

Pages: [1]