Forums

[Plugin: All in One Adsense and YPN] SERIOUS BUG 02/02/2009 (5 posts)

  1. colinjensen
    Member
    Posted 9 months ago #

    Hi,

    I am not sure whether this will apply to all blogs etc. I found a little bug, basically before each advert it was invalid html tags. <p and <br.

    I had a quick look through the code and right down the very bottom of the source code you have:

    $repchar = "<p";
    if(strpos($content, "<p") === false)
    $repchar = "<br";

    This was causing the problem. So I changed it to:

    $repchar = "<p>";
    if(strpos($content, "<p>") === false)
    $repchar = "";

    [EDIT]

    You also need to change

    $content = substr_replace($content, $replacewith.$repchar, $pickme, 2);

    to

    $content = substr_replace($content, $replacewith.$repchar, $pickme, 0);

    Now it works fine, I suggest people check what the plugin is doing on your blog.

  2. linewbie
    Member
    Posted 9 months ago #

    Hey thanks for the report, but I couldn't reproduce the bug on my test set up. The code is there to break up your article into paragraphs so the ad doesn't go in the middle of a paragraph.

  3. MvdL79
    Member
    Posted 8 months ago #

    This didn't help me. I am still having problems with this script.
    Though after editing the .php file, the code <!--adsensestart--> shows up correctly when I view the page source.

    However, the Adsense advertisement shows up before that and does not show up random anymore. Sigh.

  4. MvdL79
    Member
    Posted 8 months ago #

    :(

  5. MvdL79
    Member
    Posted 8 months ago #

    Okay after disabling one plugin at a time, editing php code, etc. I found out what's causing the problem:

    The following plugin: RAW-html apparently causes serious problems with the Adsense script. I use this plugin to display html tables. Though it's weird, cause in the beginning it didn't cause any problems at all?

Reply

You must log in to post.

About this Topic