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

Strumelia replied to Allison Leahy's discussion What are you most excited about?
"Goodness. Are you being humorous, I hope?  Maybe I'm misunderstanding? 
SP, I will certainly give y…"
14 minutes ago
Garfield Creator replied to John McDonald's discussion INTRODUCING NING 3.0: THE RE-IMAGINING OF OUR PRODUCT
"500k actually. That's a lot of people. What a shame and there are new twilight shorts planned."
29 minutes ago
SweetPotato replied to Allison Leahy's discussion What are you most excited about?
"Well my plugin will cater for that too, not that I expect any thanks from you :-)"
38 minutes ago
Writer Chick {Diane} replied to John McDonald's discussion INTRODUCING NING 3.0: THE RE-IMAGINING OF OUR PRODUCT
"The TWilight saga one is still there.  They've changed their domain name to thetwilightsagacommunit…"
1 hour ago
Tim Atkinson replied to Tim Atkinson's discussion My letter to Bernard Desarnauts, SVP & GM, Ning
"I have also cc'd in Phil McCluskey, late of this parish...."
2 hours ago
Scott Bishop replied to Allison Leahy's discussion What are you most excited about?
"Could not have said that any better Strumelia. It's sad that N3'ers just don't get it. "
2 hours ago
Edie2k2 replied to Ning's discussion Update to Product Roadmap and Communication Changes
"Hilarious. Strumelia you are wrong for making me laugh so hard. So wrong...smh *laughing* Right no…"
3 hours ago
Strumelia replied to Gary Cobb's discussion WHAT'S UP WITH NING 3.0
"My 4000 very active members are passionate about my 5 year old Network.
I persevere for their sake:…"
4 hours ago
Strumelia replied to Ning's discussion Update to Product Roadmap and Communication Changes
"A new lonely response to some poor soul, from Ning on their FB page today:




Foxx B Crea
Yesterda…"
4 hours ago
Gary Cobb replied to Gary Cobb's discussion WHAT'S UP WITH NING 3.0
"Love your humour Strumelia.. and your passion and perseverance on Creators. "
4 hours ago
Strumelia replied to Gary Cobb's discussion WHAT'S UP WITH NING 3.0
"Gary, it's not just a UK thing-  you are not the first person to post here about that.  Yes it does…"
4 hours ago
Strumelia replied to John McDonald's discussion INTRODUCING NING 3.0: THE RE-IMAGINING OF OUR PRODUCT
"Yep, pretty much dead as a doornail.
Check out the main page- too funny!-  their site banner reads…"
4 hours ago
Strumelia replied to Allison Leahy's discussion What are you most excited about?
""Ning 2 will not run along side Ning 3. Ning 2 is going to stop, dead, no more, the end."
Steve,  2…"
4 hours ago
Strumelia replied to Allison Leahy's discussion What are you most excited about?
"I would need a video feature like I have in my 2.0-  where it's my thousands of members who add the…"
4 hours ago
Strumelia replied to John McDonald's discussion INTRODUCING NING 3.0: THE RE-IMAGINING OF OUR PRODUCT
"Elson i did get some awesome support a few weeks ago on my 2.0 to solve an archiving problem.  The…"
5 hours ago
Strumelia replied to John McDonald's discussion INTRODUCING NING 3.0: THE RE-IMAGINING OF OUR PRODUCT
"Curtis don't be afraid to tell us how you really feel.    =8-o    lol... "
5 hours ago
Tim Atkinson replied to Gary Cobb's discussion WHAT'S UP WITH NING 3.0
"Glad it's not just me - think that every time I see it!"
5 hours ago
steve replied to Allison Leahy's discussion What are you most excited about?
"N2 will not continue on, unless someone is going to sell the software once its no longer in use,,,…"
6 hours ago
Ana Jovanovic and Eve Bellator joined Ning Creators Network
6 hours ago
SweetPotato replied to Kos's discussion OK Ning Wizards - I Need Your Help
"Kos,If you're still struggling with this (or haven't already paid for the work elsewhere), then I'v…"
6 hours ago
More…