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

⚡JFarrow⌁ replied to Shelli Poole's discussion Facebook sign-in app gives a clue to Ning 2.1 coming?
"not sure i follow how this is an indicator of Ning 2.1  can you elaborate?  thanks"
49 minutes ago
⚡JFarrow⌁ replied to Alyce Keegan's discussion Problems reverting to old site theme
"yes,,, the reversion back to a previous theme is a huge problem.  and there are others. forexample…"
51 minutes ago
Fire-Tech replied to Alyce Keegan's discussion Problems reverting to old site theme
"I appreciate it. My biggest concern is reliability. I've heard that mixing up between different plu…"
1 hour ago
Shelli Poole replied to Shelli Poole's discussion Facebook sign-in app gives a clue to Ning 2.1 coming?
"Sighhhh no one cares. I'm secure."
3 hours ago
James Gatlin is now a member of USA NING CREATORS
4 hours ago
Just Asking replied to Alyce Keegan's discussion Problems reverting to old site theme
"I had to get addons from just about every company out there to make it do everything I wanted. and…"
22 hours ago
Fire-Tech replied to Alyce Keegan's discussion Problems reverting to old site theme
"Yeah, SE with all of the SEAO addons look to be best for me. I can handle the code part.. just hear…"
yesterday
CocteauBoy replied to CocteauBoy's discussion After Years of Enduring Empty Promises, I Am Leaving Ning
"Which links takes you to that? I don't get that warning for either link. I can only guess that the…"
yesterday
Jamie Baker replied to Nancy Gruver's discussion Migration from Ning to WordPress
"Hi Nancy,
I've migrated a few sites to Wordpress/Buddypress and strongly advise it. Fortunalty with…"
yesterday
Peter Denio, James Gatlin and CALIPSO joined Ning Creators Network
Tuesday
Anam replied to Alyce Keegan's discussion Problems reverting to old site theme
"I have been having this very issue for over a week. I put in a ticket, and included many other issu…"
Tuesday
Chazz replied to The Ning Team's discussion Notice of 2016 Storage Limit and Pricing Plan Changes
"I too have to admit that I am a customer who feels abused. Our Network Platform service continues t…"
Tuesday
Kos replied to Alyce Keegan's discussion Problems reverting to old site theme
"Ning definitely needs to 'clear' your back end it seems.  Filing a ticket on a Friday, you won't re…"
Tuesday
Katy Blagg replied to Katy Blagg's discussion Resizing Group Icons
"Thank you to all of you who have helped!!!
Just what I wanted. Thank you so much :)
Is working just…"
Tuesday
Kos replied to Nancy Gruver's discussion Migration from Ning to WordPress
"Alyce yes, Groups and their members migrate over.  Sadly no content does; they're empty but yes, th…"
Tuesday
Just Asking replied to Alyce Keegan's discussion Problems reverting to old site theme
"I think the two biggest contenders for alternatives are Jamroom and SocialEngine PHP, though some h…"
Tuesday
Alyce Keegan replied to Nancy Gruver's discussion Migration from Ning to WordPress
"Hello! Kos are you able to migrate groups? :( I have all of my classes listed as groups on my ning…"
Tuesday
Mandy replied to Nancy Gruver's discussion Migration from Ning to WordPress
"Hi Kos I'm in the same boat; would you mind sending me  PM with the link to check out as well! Than…"
Sunday
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion Tip: For Those Who Need a Personal Site
"no problem bud... definitely cool... one thing that distinguishes this from the rest is the ability…"
Sunday
George H. Compton IV replied to ⚡JFarrow⌁'s discussion Megaload of Ning Tips, Tricks and Hacks (over 200+)
"I love the way you organize the tips, awesome job. :-)"
Sunday
More…