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 Social Network to add comments!

Join Ning Creators Social 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

⚡JFarrow⌁ replied to Fabricio Giugni's discussion Create a member Pro. What can he do that others can't?
"You could offer access to a group or set of pages that other members can't see..."
1 hour ago
Kevin Acosta replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"FYI - some programming glitch is also affecting the old Ning 2.0 Pro sites . . . same "blank" regis…"
2 hours ago
Kevin Acosta replied to Marcelo Rodrigues's discussion Chat problem
"Apparently having the same issue here, including the timing as reported by site members while I was…"
2 hours ago
Kevin Acosta replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"@ Kyryl - - thanks for these updates.  I was out of pocket traveling the past week, and several mem…"
2 hours ago
Tyler Durbin replied to Marcelo Rodrigues's discussion Chat problem
"My chat has been down for 2 days!  They are saying that it is a bug.  Ugggg...."
3 hours ago
Alex replied to Alex's discussion NING 3 Groups on Home Page
"Thank you John... works a treat.
Much obliged!
Alex"
3 hours ago
Manuel Adame Jimenez replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Patience Kos
{[°III ♤ ♡ ♧ III°]}"
3 hours ago
Bizz replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"Not sure, but will have to take a look to see if it's possible."
4 hours ago
Bizz replied to Alex's discussion NING 3 Groups on Home Page
"I would write this with this code below as it would keep the groups a nice size and not to small mu…"
4 hours ago
Ning via Facebook

#Ning #radio #online Tune in to the radio, find your playmates - and have fun on…

Mike Collins replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"John is there anyway of excluding the search in private groups through code?"
4 hours ago
Naveen Jain replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"This worked. Thanks"
5 hours ago
Naveen Jain replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"culytics.com"
5 hours ago
Bizz replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"Your most welcome :-)"
5 hours ago
Anam replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"Ahhh, I see! That makes sense. At least I eventually had the wit to think maybe it was my line of w…"
5 hours ago
Kos replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Day #3 and Chat is still down. This is ridiculous.  Please release "old" chat until you get things…"
5 hours ago
Bizz replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"No worries. If you want to make notes in css you must enclose them else it will stop all css from t…"
5 hours ago
Anam replied to Naveen Jain's discussion How can I disable Ning Search in 3.0

Hi John, I actually had tried it and it didn't work, but just gave it another try and it did. I a…"
5 hours ago
Bizz replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"Hi Anam, did you try my one as it should work, works on mine and I tried it on the creators one.
#x…"
5 hours ago
Anam replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"This didn't work for me. I also would like to remove the new search bar as it displays material in…"
7 hours ago
More…