• 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    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.

    ??

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: All in One Adsense and YPN] SERIOUS BUG 02/02/2009’ is closed to new replies.