Support » Plugin: Easy Plugin for AdSense » [Plugin: Easy AdSense] Mid-Post Ad template bug fix with Pro?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t think the Pro version will fix it. If you post your blog URL, I can take a look and try to figure out what is causing it.

    is an example of a page affected. I have placed a link unit in the mid-post section to give you an example.

    Thanks! if you can figure it out I will certainly upgrade to pro regardless, and donate a little extra.

    I looked at your page, and I think I know what’s going on.

    My plugin counts the paragraph markers (<p> tags) to determine an appropriate place to insert the mid-text ad, which would be between two paragraphs near the middle of the post. On your post though, it looks like the <p> tags are being stripped off either by your theme or a plugin, and reinserted before generating the final output. So my plugin doesn’t see any paragraphs, and concludes that half the total number of paragraphs is zero, which is near the top.

    The only option I can think of is to insert the mid-text ad based on the number of words or characters. But I think it will look ugly, because it might break a line or a word to put the ad in between.

    A slightly better, but still imperfect solution, is to look for return lines.

    Thus I modified easy-adsense-lite.php line 492

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


    if(strpos($content, "<p") === false)
    $repchar = "\r\n";

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

    I missed the quote after the <br

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Easy AdSense] Mid-Post Ad template bug fix with Pro?’ is closed to new replies.