• wp 2.5-2.7
    yarpp 2.6.1

    I am working on a plugin that should fire after yarpp. By setting the priority of the_content to 1201+…

    Doing so causes my filter not to be run…

    on a post where yarpp doesn’t run (main index) everything works as desired.

    if I set the priority to something less than 1200 my output is int he post but before the related posts and I would like to be able to have it after…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter BlogTrafficExchange

    (@blogtrafficexchange)

    to see what I am talking about check out one of my blogs…

    The section I want after yarpp is the releated stores section….

    you can see the releated stores here: https://www.richcreditdebtloan.com/

    but you can see it is missing here: https://www.richcreditdebtloan.com/money-management-questions-and-answers/

    Thread Starter BlogTrafficExchange

    (@blogtrafficexchange)

    in general this bring up an interesting ordering question as well… smoe users might prefer to hand order the various automatic filters….

    @blogtrafficexchange… Hmm… a couple things I can think of:

    1. It may be trying to run your filter first as part of keyword generation algorithm… in that case, try adding your filter function name to the YARPP filter blacklist (just search includes.php for blacklist).
    2. Alternatively, you can make sure YARPP runs where you want it to run by implementing YARPP as a template tag, putting <?php related_posts();?> in your template and turning off the automatically display option.

    Let me know how it goes–I’d love to make sure our plugins are compatible. If you’d like, feel free to email me a copy of your plugin so I can see what the matter is.

    mitcho

    Thread Starter BlogTrafficExchange

    (@blogtrafficexchange)

    sending you the plugin… I need my plugin to be compatible with yours…

    Thread Starter BlogTrafficExchange

    (@blogtrafficexchange)

    I am still working on a bunch of things to make my plugin better, but getting this working seems a tab bit fundamental to my longer terms plans…

    Seems like if you are breaking others too that there should be a better way than your current blacklist approach. you are too popular to break others so fundamentally?

    maybe I can still code around and I look forward to what you have to say…

    Thread Starter BlogTrafficExchange

    (@blogtrafficexchange)

    Actually I am not sure why you need my plugin… I wrote the following test plugin that show the behavior…

    <?php
    /*
    Plugin Name: YARPP_BUG
    Plugin URI: https://www.blogtrafficexchange.com/test
    Description: Changing filter priority to more than 1200 breaks his pluing with yarrp
    Version: 1.0
    Author: Blog Traffic Exchange
    Author URI: https://www.blogtrafficexcahnge.com/
    License: GPL
    */
    /* Copyright 2008-2009 Blog Traffic Exchange (email : [email protected])
    */

    // Play nice to PHP 5 installations with REGISTER_LONG_ARRAYS off
    if(!isset($HTTP_POST_VARS) && isset($_POST))
    {
    $HTTP_POST_VARS = $_POST;
    }

    //change me to less than 1200 to see working
    add_filter(‘the_content’, ‘bte_rs_the_content’, 99999);

    function bte_rs_the_content($content) {
    global $post;
    $postMod = get_post_modified_time();
    return $content.”<p>Post modified: “.$postMod.”</p>”;
    }
    ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] the_content filters with larger priorities are not being’ is closed to new replies.