• Resolved amulet

    (@amulet)


    I’m testing out the spoiler-plugins from https://secandri.com/blog/2005/02/22/spoiler-plugins-for-wp-15/ and I’m having a problem. I tried posting a comment at that site a couple days ago, but still haven’t heard. I’m using WP 1.5.2, btw.

    The plugin works fine on the full post, but it doesn’t show up on the main page. I noticed the script has this in the PHP code at the bottom:

    // if you use the_excerpt or comment_excerpt please enable code below this
    // i disable this because i dont use it on my template; and also sometime spoiler-tag doesnt complete.
    //
    //add_filter('the_excerpt', 'smart_spoiler_tag', 20);
    //add_filter('comment_excerpt', 'smart_spoiler_tag', 20);

    I use the_excerpt_reloaded. Could that be the problem? This is the code I use to get the_excerpt_reloaded to work:

    <?php
    if(is_single()) {
    the_content();
    } else {
    the_excerpt_reloaded(100, '<a><img><b><i><ul><ol><li><h1><h2><h3><div><font><table>', 'excerpt', TRUE, '(More...)', FALSE, 1, TRUE);
    }
    ?>

    I’ve tried activating the add filter line for ‘the_excerpt’, changing it to ‘the_excerpt_reloaded’, but that still doesn’t work. I really like this plugin on the full post. Can anyone help me to get it to work on the main page? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter amulet

    (@amulet)

    It’s been more than 24 hours…it’s ok to bump now, right? I still need a solution. Anybody?

    Thread Starter amulet

    (@amulet)

    I just wanted to let anyone who reads this post know that I finally figured out my problem. In case someone else has the problem, I’ll give a brief explanation of how I solved it:

    I don’t know if all these tags are necessary to put into the PHP code to call the_excerpt_reloaded, but one of the things I did in getting the Spoiler-Plugins to work is make sure all html tags in the plugin were in the second parameter for the_excerpt_reloaded, and I have mine set like this:

    the_excerpt_reloaded(100, '<a><img><b><i><ul><ol><li><h1><h2><h3><div><font><table><spoiler><input>', 'excerpt', TRUE, '(More...)', FALSE, 1, TRUE);

    In the spoiler-plugins file itself, I scrolled to the bottom and activated (removed the double slashes – //) the following line:

    add_filter('the_excerpt', 'smart_spoiler_tag', 20);

    At first, I changed it to ‘the_excerpt_reloaded’, but that didn’t work. Leave it as ‘the_excerpt’, even if you’re using the_excerpt_reloaded.

    Hope this helps someone!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Spoiler-Plugins Problem’ is closed to new replies.