Current status of the Ning Platform is always available on the Ning Status Blog.

Forum

NC for Hire

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

You need to be a member of Ning Creators Network to add comments!

Join Ning Creators Network

Replies

  • gud
  • NC for Hire

    This week seems to be getting better. We can say tips week. Another great tip. Keep it up SP.

  • Great tip SP. Am curious if i added a picture on the first right side of the blog right next to the first pragraph, wont this code interfere with it. I mean wont the Ad show on the first main/ front page of the network?

    I am surely going to try this tip. It looks great.
    • NC for Hire
      It depends if the image is in the first set of para tags. My advice would be to include the image in the first paragraph aligned left or right so the text wraps around it substantially enough for it to look ok once the code gets injected. But this tip doesn't really factor in all the variables possible. All I can suggest is to try it and see how it looks. My guess is that this tip will be best with inline text ads. Let me know how it goes. Sp

  • Hi SP,

    I saw this from jen and I was wondering if you could combine it with yours so we have one add after the first paragraph and one at the button?

    http://jensocial.com/forum/topic/show?id=2154984%3ATopic%3A477210&a...

    • NC for Hire
      Button or bottom? Either way I'm reluctant to play around with Jen's tip from her site. I'd ask her, especially if you are in her premium group.
      Sp
This reply was deleted.

Search the Creators Network

Latest Activity

Omid Sadeghpour, Sue Valdeck, LCBSocial and 2 more joined Ning Creators Network
3 hours ago
Lora replied to Lora's discussion 3.0 Photo Galleries
"I have four galleries and use the 50 category set up, wish there was more.
Big issue for us is when…"
3 hours ago
Lora replied to Lora's discussion 3.0 Photo Galleries
"YES........... this is my issue!!!! We use our site to sell. When members have to delete multiple p…"
3 hours ago
Lora replied to Lora's discussion 3.0 Photo Galleries
"huh???? lol .... say that in english............... lmao."
3 hours ago
Scott Bishop replied to George H. Compton IV's discussion (TIP) Ning 2.0 responsive fullwidth network at any screen resolution. :O Cellphones to TV's ;)
"Hey George, dumb question probably: What and where is the "ad-box above the header"?"
3 hours ago
JFarrow replied to Lora's discussion 3.0 Photo Galleries
"that could be profitable.."
4 hours ago
Jen replied to Jeffrey Haskins's discussion Geez....
"Jeffrey, If you are referring to "Posted By", not sure, unless somehow you have some CSS that is hi…"
4 hours ago
Alyce Keegan replied to Lora's discussion 3.0 Photo Galleries
"LOL! atleast I didn't say ghost busters or then you'd have to be worried ;)"
5 hours ago
JFarrow replied to Lora's discussion 3.0 Photo Galleries
"you have a group for gang busters??  sweet.... be careful with that..."
6 hours ago
TJ @ jQueryHelp replied to Jamie Baker (Vision)'s discussion Time to say goodbye
"Sorry to see you go!  I do understand your decision and wish you all the best!"
6 hours ago
JFarrow replied to Lora's discussion 3.0 Photo Galleries
"the only limit is imaginary capacity...nice work...keep it growin'!"
6 hours ago
JFarrow replied to Lora's discussion 3.0 Photo Galleries
"here is a fork of a nice responsive photoset style which could be adapted to work in articles and b…"
6 hours ago
Alyce Keegan replied to Lora's discussion 3.0 Photo Galleries
"hopefully there's no limit LOL! One of my groups is going gang busters with over 2000 photos... con…"
7 hours ago
Edie2k2 replied to Ning's discussion Introducing Activity Feed Improvements, Including Member Status Updates
"Right on. I don't care 'how' many pro 3'rs pretend that the Emperor dons new clothes... dude is nak…"
7 hours ago
steve replied to Lora's discussion 3.0 Photo Galleries
"I have about 30 groups now i think, and each group has its own gallery. So far at least there seems…"
7 hours ago
Edie2k2 replied to Ning's discussion Introducing Activity Feed Improvements, Including Member Status Updates
"So much delusion in relation to 3.0. It's quite hilarious. Anyway, long live 2.0 and may 3.0 find a…"
7 hours ago
steve replied to Ning's discussion Introducing Activity Feed Improvements, Including Member Status Updates
"yeah its all to do with how people use the net now. its all mobile devices mostly. Im seen as a din…"
7 hours ago
Writer Chick {Diane} replied to Lora's discussion 3.0 Photo Galleries
"I have about 15 photo galleries on my site, and I'm not finished adding them.  We're a graphics-ric…"
7 hours ago
Writer Chick {Diane} replied to Ning's discussion Introducing Activity Feed Improvements, Including Member Status Updates
"2.0 is a clunky dinosaur. I really want the versatility and organizational features that 3.0 has, b…"
8 hours ago
Kos replied to Ning's discussion Introducing Activity Feed Improvements, Including Member Status Updates
"As the internet evolves and responsive websites become the norm, it's just not feasible from a busi…"
8 hours ago
More…