Hi

This is a simple yet potentially lucrative tip to insert Google Adsense or Yahoo/Bing Ads (or anything really) after the first paragraph (defined by <p> tags) in all content in forum or blog posts (including member posts).

ADS IN BLOGS:

Click to enlarge preview
Here is the script to insert adverts under the first paragraph in BLOG POSTS. The red script will need to be replaced with your own Google Adsense or Yahoo/Bing ads script.

Put it in your custom code box:

<!-- Insert Ads INSIDE Blog Posts by SweetPotato -->
<div id="ad_after_jump" style="display:none;">
<!-- Advert Script START -->
<script id="mNCC" language="javascript">  medianet_width='200';  medianet_height= '200';  medianet_crid='45454545';  </script>  <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=4545454" language="javascript"></script>
<!-- Advert Code END -->
</div><script type="text/javascript">if (typeof(x$) != 'undefined') {  x$('.xg_widget_profiles_blog_show .postbody .xg_user_generated').find('p').eq(0).after('<p style="font-weight:bold;">Continued after the jump ....</p></br><div id="ContentAdverts"></div>');    var inject_SPadverts = document.getElementById('ad_after_jump');    var SPadverts = document.getElementById('ContentAdverts');    SPadverts.innerHTML = inject_SPadverts.innerHTML; }</script>

 

ADS IN FORUM POSTS - same as above but use this code and change the red script.

<!-- Insert Ads INSIDE Forum Posts by SweetPotato -->
<div id="ad_after_jump" style="display:none;">
<!-- Advert Script START -->
<script id="mNCC" language="javascript"> medianet_width='200'; medianet_height= '200'; medianet_crid='54565767'; </script> <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=84534343" language="javascript"></script>
<!-- Advert Code END -->
</div><script type="text/javascript">if (typeof(x$) != 'undefined') { x$('.xg_widget_forum_topic_show .description .xg_user_generated').find('p').eq(0).after('<p style="font-weight:bold;">Continued after the jump ....</p></br><div id="ContentAdverts"></div>'); var inject_SPadverts = document.getElementById('ad_after_jump'); var SPadverts = document.getElementById('ContentAdverts'); SPadverts.innerHTML = inject_SPadverts.innerHTML; }</script>


I have tested this pretty thoroughly and only come across a couple of instances where the ads weren't where I expected them to be. 95% of the time they are after the first paragraph, assuming that the html generated in the content has the correct <P>tags.

If your ads are not going to fill the width of the page, for example if they are 200px wide, and you want the following paragraph to wrap around the advert then add this css to your advanced css section:

#ContentAdverts{
width:220px;
float:left;
margin-right:15px;
}

If you want to remove the 'Continued after the jump wording then delete <p style="font-weight:bold;">Continued after the jump ....</p></br> from the code above.

Play around with it and see how you get along.

Enjoy

SP

More tips

Tags: , Insert, , , Paragraph, , Paragraph, Paragraph, Adverts, Adverts inside Blogs, Forum", Insert Adverts in Content after the First Paragraph, Paragraph, Paragraph", inside

Views: 930

Reply to This

Replies to This Discussion

I have no way of testing yet <!-- Insert Ads INSIDE Forum Posts by SweetPotato --> since I am moving my PLus Site into a Mini, in order to make the Mini a PLUS Site and get rid of the old one. I do not planned to spend twice.

I will let you know how it looks <!-- Insert Ads INSIDE Forum Posts by SweetPotato --> in the new site. 

The Mini will change into PLUS when I reach 140 and 2 days before invoicing on the old I will get rid of it.

Good luck with it all
Sp

SP, I tried it out and it is working great. Would you know how to append an ad to the bottom of a video? For example, in the space you would use to add descriptive material about a video?

hey that is a very nice tip!

please do have a code that makes advert on forum/blog appearing at the bottom of the first post rather than after the first paragraph?

thanks

thanks for the link

when i placed the code as it is on the page - i got the text in in the right position but when i replaced the text with adsense code (to have advert appearing ) it didnt work :S

thanks but that is only for forums - i want the code for blog posts

oh thanks a lot!!! that was very nice of you!

i placed both forum and blog codes in my custom code page

Blog google adverts are appearing okay but forum google adverts only appear if i remove the code for the Blog - seems there is a conflict


anyone else encountered this problem?

Thanks a lot SweetPotato, working fine on Blogs and Discussions.

I want to use the same on pages too as my network is content based and pages are most important. Please suggest........

http://thatsme.in

RSS

Latest Activity

Lee Lawrence replied to Shannon's discussion 'VOTE - NING 2.0 or NING 3.0'
"They are allowing current users to open more 2.o platforms."
29 minutes ago
Deusdete Bandeira joined arqueologiadigital.com's group
Thumbnail

Criadores Brasileiros - Brazilian Creators

Grupo para todas as redes Brasileiras do Ning. (Group for all Ning Brazilian Networks).See More
45 minutes ago
Kos replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Maybe this will help?  It's from this discussion by Soaringeagle.  A really…"
50 minutes ago
Kos replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Your 2nd one is a full page layout but the first, a 2 column.  You also don't have to…"
53 minutes ago
Phoron replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"I think i worded my question improperly.  What I meant was can you make the boxes you see on…"
1 hour ago
Cindy replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"I think most people like a solid background where the text is anyway. I just left mine black. I…"
1 hour ago
Kos replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Fade the background image itself?  No 3.0 can't do that but you could upload it to pixlr…"
1 hour ago
Profile IconNing via Facebook
Thumbnail

A community is nothing without its members. Richard Millington shares some places to look when…

See More
Facebook1 hour ago · Reply

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service