Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   [SOLVED] Atahualpa, WP Super Cache and WP Post-ratings (http://forum.bytesforall.com/showthread.php?t=12326)

seboush Jan 19, 2011 04:21 AM

[SOLVED] Atahualpa, WP Super Cache and WP Post-ratings
 
Hello,

I am trying to get Wp Super Cache & WP Post-ratings to work together. I have found a thread on WP post-ratings (http://forums.lesterchan.net/index.p...ic,4281.0.html) saying:

Replace your normal <?php the_rating() ?> function in your theme for <?php get_rating_ajax ($post->ID) ?>

I cannot find <?php the_rating() ?> in Atahualpa's files. The only thing I have found is in bfa_postinfo.php:

// For the "WP-PostRatings" plugin
if ( strpos($postinfo_string,'%wp-postratings%') !== FALSE ) {
$wp_postratings = ( function_exists('the_ratings') ?
the_ratings($start_tag = 'span', $custom_id = 0, $display = FALSE) : "" );
$postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo);
}

But I cannot figure how to insert the above modification.

Many thanks in advance for your help.

juggledad Jan 19, 2011 05:24 AM

As you can see from his page, WP Post-ratings is no longer supported or being updated. The instructions are almost a year and a half old. My suggestion would be to look for another rating plugin that is being actively being developed.

seboush Jan 19, 2011 06:54 AM

Hi,

Thanks for your answer.

Actually, changing the plugin would also erase all the history of all votes... So I would like to keep the same plugin even if it's not updated. Also it's been working fine so far with a nice config screen in Wordpress admin.

If you could help me about where to insert this line of code, I would be more than happy!

Thanks,

juggledad Jan 19, 2011 10:39 AM

well that's where you would insert it. the WordPress function 'the_ratings()' has several variables that can be passed to it. Since the plugin is changing that function for another, you are going to have to play with it or examine the plugins code to see what it is doing.

seboush Jan 20, 2011 07:52 AM

If someone is interested, in file bfa_postinfo.php, I have replaced:

$wp_postratings = ( function_exists('the_ratings') ?

by

$wp_postratings = ( function_exists('get_rating_ajax') ?

and now WP Post-ratings works fine with WP Super Cache.


All times are GMT -6. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.