[resolved] [Plugin: Yet Another Related Posts Plugin] Bug in ver. 3.0.6, correction inside (2 posts)

  1. kanedauy
    Posted 7 years ago #

    Theres an error in options.php,

    $cache_complete = $wpdb->get_var("select (count(p.ID)-sum(c.ID IS NULL))/count(p.ID)
        FROM $wpdb->posts as p
        LEFT JOIN {$wpdb->prefix}yarpp_related_cache as c ON ( p.ID = c.reference_ID )
        WHERE p.post_status = 'publish' ");

    have to be out of the if (yarpp_get_option('ad_hoc_caching') != 1) {...
    because its used outside the if in the calc of the buffer done% message.

    Other thing, this is my lang of overusedwords file in Spanish http://otrosmedios.elpais.com.uy/wp-content/plugins/yet-another-related-posts-plugin/lang/words-es_ES.php.txt

    You have to add the file (rename to php only) in the lang dir, and modify intl.php

    function word_file_lang() {
    	if (!defined('WPLANG'))
    		return 'en_US';
    	switch (true) {
    		case preg_match("/^de/i",WPLANG):
    			return 'de_DE';
    		case preg_match("/^it/i",WPLANG):
    			return 'it_IT';
    		case preg_match("/^pl/i",WPLANG):
    			return 'pl_PL';
    		<strong>case preg_match("/^es/i",WPLANG):
    			return 'es_ES';</strong>
    			return 'en_US';


  2. @kanedauy - thank you very much for your cache_complete fix! I will incorporate it into 3.0.8. You can already see the change in 3.0.8b2:


    I would also like to add that Spanish stopwords file, but I cannot download it. Can you email me? yarpp@mitcho.com . Thanks. :)

Topic Closed

This topic has been closed to new replies.

About this Topic