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

Dan Lee replied to Bizz ( John )'s discussion Adjusting Your Videos List Page Metadata Section Colours
"OK, I FOUND IT :)"
15 minutes ago
Alliance replied to Dan Lee's discussion I Will Design Your Ning Network To Make it Look More Professional
"http://deeday504.com/ is a NING site?"
17 minutes ago
Bizz ( John ) replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Here you go Dan this should fix you up
http://creators.ning.com/forum/topics/adjusting-your-videos-&he...;"
6 hours ago
Dan Lee replied to Dan Lee's discussion I Will Design Your Ning Network To Make it Look More Professional
9 hours ago
Hantz Jeanlouis is now a member of Ning Creators Network
12 hours ago
Traddie replied to Dan Lee's discussion I Will Design Your Ning Network To Make it Look More Professional
"Do you have examples of other sites you have designed?"
12 hours ago
Bizz ( John ) replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"I have a fix for this. Will post it as a tip when home later this evening.
John :-)"
12 hours ago
Ning via Facebook

#unitewithNING Ning`s conquering Internet: follow our new Google+ page here!…

Dan Lee replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"ANY FIX FOR THE COLOR OF THE TEXT, FOR THE NEW VIDEO FEATURE? WHEN I ADDED IT TO MY HOME PAGE I GOT…"
21 hours ago
Garfield Archivist replied to Bizz ( John )'s discussion Ning: Is it possible to enable the comments form on posted videos like we can for photos in activity feed.
"Me Three"
22 hours ago
⚡JFarrow⌁ replied to Bizz ( John )'s discussion Ning: Is it possible to enable the comments form on posted videos like we can for photos in activity feed.
"i second that"
22 hours ago
Ning via Facebook

#inspirewithNING #dj Feel inspired with cheerful spring and joyful minutes, filled with sounds…

Kos replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"What, in 2.0 themes, do you want Tony?  Most can be replicated with simple CSS.  Can you be more sp…"
yesterday
Kos replied to Bizz ( John )'s discussion Ning: Is it possible to enable the comments form on posted videos like we can for photos in activity feed.
""
yesterday
Bizz ( John ) replied to Bizz ( John )'s discussion Videos Playing In Activity Feed, check it out on my site, Now shows photos to ( Updated: 27-04-17 )
"Added some more updates on this so it works with photos now also."
yesterday
Tim Frank replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Thank you for the answer. My only regret is that it took just short of a month to get an empathetic…"
yesterday
Kyryl_Ning_Support replied to Bizz ( John )'s discussion Ning- Your design studio widget images are not loading
"Thanks, John,
I have posted the info about the fix of the embedded videos under more appropriate po…"
yesterday
Bizz ( John ) replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Yes I noticed that but I don't think that's a big issue as at least the embeds are working now and…"
yesterday
Kyryl_Ning_Support replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Hi John,
Yes you are right the issue with embedded videos has been fixed, however, it's only workin…"
yesterday
Bizz ( John ) replied to Bizz ( John )'s discussion Ning- Your design studio widget images are not loading
"Thanks for the update Kyryl, and I also see the embed videos images have also been fixed up. Nice w…"
yesterday
More…