Support » Plugin: Revenue Share for Authors (RSP for WordPress) » Error on code if i set ads to center of post

  • Resolved acquariusoft


    If i set the ads on the center of post i obtain this code

    <div class="entry-content">
    			<a<br /><div align=center><script type="text/javascript"><!--
    google_ad_client = "ca-ca-pub-0638797270094505";
    google_ad_width = 468;
    google_ad_height = 60;
    <script type="text/javascript" src=""></script></div><br /> id="dd_start"></a>

    and i see id=”dd_start”>` in the code.

    with the other position is all ok.
    Can you solve this problem?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author obscurant1st


    Ok thanks for reporting. i will check into that and reply here shortly.

    i think is good if you not search the half of the post, i think you must count <p> tag and divide, or (more interesting for me) choose the number of <p> tag where insert ads.

    Tnx for you work!!

    Plugin Author obscurant1st


    Thanks! 🙂

    Did you try deactivating all the plugins except this one?
    I think its not the problem with this plugin as it works perfectly in my blogs!

    Please check it and let me know!

    i think the problem is the logic, in my blog i insert image in the start of post, with link ecc.
    if post is short and you try to find the middle of the post, it is inserted in the tag of the image. also if you only count char you can insert in the middle of tag or link.

    I think is good find the end of some paragraph and insert in it

    Plugin Author obscurant1st


    $insert_ad = strpos($content, '. ', $count_words);
    Check this in the plugin’s php file and try changing it to the code below!
    $insert_ad = strpos($content, '</p> ', $count_words);

    I don’t know if it will work as I haven’t tried it. In most cases my logic seems to be working fine. I didn’t use a <p> for inserting the ad because if someone choose to write the blog post with just one paragraph this code will have the no effect if s/he chooses bottom or middle.

    Good luck with this anyway!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error on code if i set ads to center of post’ is closed to new replies.