Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter cbarnett

    (@cbarnett)

    I sent you the support details form, I think. Let me know if you didn’t get it. Thank you.

    Hi, thank you – that would be awesome!!! I’m looking forward to it!

    My main gripe with this Plugin is relating to this qTranslate issue. I reviewed the plugin asking if it would be possible to just integrate this three lines of code into the future updates so it plays nice with qTranslate – so we who use multiple languages on this website no longer have to fiddle with the code and add in the patch every time it is updated.

    But, regardless, as of the 2.0.2 update, we were again able to patch the plugin similarly to before, and I wanted to share how with anyone else who may be using the qTranslate plugin in combination with this Related Posts plugin:

    To patch the latest version of this plugin (v2.0.2) so it works with qTranslate

    In wp_related_posts.php

    Add the following to line 90:

    if(function_exists('qtrans_postsFilter')) :
    	$related_posts = qtrans_postsFilter($related_posts);
    	endif;

    This ends up appearing like this (between the lines of code shown):

    }
    
    function wp_rp_fetch_posts_and_title() {
    	$options = wp_rp_get_options();
    
    	$limit = $options['max_related_posts'];
    	$title = $options["related_posts_title"];
    
    	$related_posts = array();
    
    	wp_rp_append_posts($related_posts, 'wp_rp_fetch_related_posts_v2');
    	wp_rp_append_posts($related_posts, 'wp_rp_fetch_related_posts');
    	wp_rp_append_posts($related_posts, 'wp_rp_fetch_random_posts');
    
    if(function_exists('qtrans_postsFilter')) :
    	$related_posts = qtrans_postsFilter($related_posts);
    	endif;
    
    	return array(
    		"posts" => $related_posts,
    		"title" => $title
    	);
    }

    Hopefully the developer will consider making this patch in his future updates. I know he’s working for free though – and that can be difficult. My company is planning to donate to all the plugin developers whose plugins we are currently integrating into our new website. I encourage all of you to consider donating to these developers as well. Especially if you use it for your business websites!

    Hey – an update. I figured out how to make this patch work with the latest version (1.7)

    In wp_related_posts.php

    Add the following to line 80:

    if(function_exists('qtrans_postsFilter')) :
    	$related_posts = qtrans_postsFilter($related_posts);
    	endif;

    This ends up appearing like this (between the lines of code shown):

    $related_posts = $wpdb->get_results($q);
    	}
    
    	if(function_exists('qtrans_postsFilter')) :
    	$related_posts = qtrans_postsFilter($related_posts);
    	endif;
    
    	return $related_posts;
    }

    Anyway, this is working for me now (yay!) so I hope it helps other people out there!!!

    This patch doesn’t seem to work with the NOW latest version (1.7)

    I tried adding the code specific for (1.2) after line 85 and my related posts still show up all languages mashed together in one string.

    Any suggestions for using a patch for qTranslate with this plugin v1.7?

    I would appreciate the help, thanks.

Viewing 5 replies - 16 through 20 (of 20 total)