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

Charles Harrison replied to Bryce Rubio's discussion A Message from Our CEO
"What a terrible Template and Layout. Please we need a Responsive Template and Layout, and more Resp…"
1 hour ago
Maureen Jansen replied to Maureen Jansen's discussion Message group members
"Thank you to the admin who told me what to do. The button was hidden on a blue bar. "
4 hours ago
⚡JFarrow⌁ replied to Bizz ( John )'s discussion My New Events Notification Messages
"Wow... really nice!"
11 hours ago
Kevin Acosta replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Please explain the correct pathway for Ning 2.0 - - as you can see from the image below there is no…"
12 hours ago
Traddie replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Hi. I added the @yopmail.com   address this morning, and this afternoon I still had a few get throu…"
12 hours ago
Constantine is now a member of Ning Creators Network
19 hours ago
Kyryl_Ning_Support replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Hi Philip,
We have replied to you in private message, as the reply contain some personal informatio…"
21 hours ago
Kyryl_Ning_Support replied to Hugh's discussion Support Tickets Closed Even if Error not Fixed
"Hi Hugh,
We do apologise for the inconveniences, the system could close your ticket automatically.…"
21 hours ago
Kyryl_Ning_Support replied to Maureen Jansen's discussion Message group members
"Hi there,
To send the message to all members of the group please go to the Group and Press the Butt…"
21 hours ago
Saurabh replied to Saurabh's discussion Home page showing error
"The error again started"
yesterday
Jungla replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"How can you do new stuff, when you can't even fix old errors? My website, today gives all day Our a…"
yesterday
Philip Voice replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Has this update affected networks?

Can you please check landscapejuicenetwork.com as it's been dow…"
yesterday
Kos replied to Anna Ning Support's discussion Announcing Events for Ning 3.0
"Moi?  *lol*  Yeah, once I'm 'in' something, I tend to stick around forever 'til you show me the exi…"
yesterday
Pat Howlett replied to Anna Ning Support's discussion Announcing Events for Ning 3.0
"Kos, you are certainly one who kept me coming back :]
I hope to have something worth sharing soon. "
yesterday
Kos replied to Anna Ning Support's discussion Announcing Events for Ning 3.0
"Great to see an old face return!  Welcome back Pat :)"
yesterday
⚡JFarrow⌁ replied to shironala's discussion Hi can somone help me with the css problem ?
"i see that you have your x_body padding set at  padding-top: 154px; which may be the reason for you…"
yesterday
Thisisbully replied to Bizz ( John )'s discussion My New Events Notification Messages
"Nice"
yesterday
shironala replied to shironala's discussion Hi can somone help me with the css problem ?
""
yesterday
Pat Howlett replied to Anna Ning Support's discussion Announcing Events for Ning 3.0
"I'm back :]
Backstory...I became an NC back in 2006 and ran multiple local business networks (at on…"
yesterday
Kyryl_Ning_Support replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Hi there,
Unfortunately, the CAPTCHA could prevent sign ups from bots only, that is making the life…"
yesterday
More…