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

Ron replied to Jan Homan's discussion How to create a video as a header?
"ok sorry, I thought you know how to enclose a script already. Anyway, try this again with the attac…"
27 minutes ago
Jan Homan replied to Jan Homan's discussion How to create a video as a header?
"Heey Ron,
I think the code is working, but the video is above the page and above the so called: <di…"
39 minutes ago
Ron replied to Jan Homan's discussion How to create a video as a header?
"Hi Jan,
Ok looks good. Try the javascript code link below and add it to your custom code. Assuming…"
59 minutes ago
Jan Homan replied to Jan Homan's discussion How to create a video as a header?
"Hello Ron,
I streched the canvas as well the full width background of the header.
Here is the link…"
2 hours ago
Ron replied to Mandy's discussion Add Text Box- Photo Upload Page
"This could be an alternative John, if you won't fully utilize the tag content. I think this is wort…"
7 hours ago
Ron replied to Ron's discussion Ning Apps: Photo Tagging Feature (WIP)
"Hi Luke, I will be posting the details here and on the feedback page within a couple of days.
Thank…"
9 hours ago
Arturo Padrón left a comment for Sonia
"Hola, amor mio, te extraño "
9 hours ago
Ron replied to Jan Homan's discussion How to create a video as a header?
"Hey Jan,
Ok I see that. BTW, Is your site header already stretched out to accommodate your proposed…"
9 hours ago
Ron replied to Ron's discussion Free Emoji for Ning Apps Early Access Subscribers
"Yes Luke, I have updated the details above about usage and it is site wide :-)
It should be availab…"
10 hours ago
Ron replied to Mandy's discussion Add Text Box- Photo Upload Page
"Hey that's good to know and keep it up! :D Sure thing and have a great weekend as well. :-)"
10 hours ago
Ron replied to Ron's discussion Free Emoji for Ning Apps Early Access Subscribers
"You're welcome Mary Jane. Yes, it will be for both 2.0 and 3.0 :-)"
10 hours ago
John Bizley replied to John Bizley's discussion First Look Of My New Classifieds Page now open for viewing.
"Thanks Kos, I just added a text listing in the Vehicles & Parts section to show how those would loo…"
10 hours ago
John Bizley replied to Luke Jones's discussion Move the "about me" answer's to the side
"Hi Luke yes I think that could be done, I will have a play around with it and see what I can come u…"
11 hours ago
Kos replied to John Bizley's discussion First Look Of My New Classifieds Page now open for viewing.
"Extremely interesting.  Thank you for sharing John"
11 hours ago
steve replied to Mary Jane Peterson's discussion Need Some Ideas For New Site
"You need to give your site direction Mary.. what i would do if it was me is think about what you li…"
13 hours ago
John Bizley replied to Mandy's discussion Add Text Box- Photo Upload Page
"What about if you renamed the 'tags' box to products used or keep the tags but maybe add the words…"
23 hours ago
John Bizley replied to John Bizley's discussion Check out these 3 photo page layouts using my comments to the side and more entries at the same time
"Not sure which of these to go for as I like the first one and the full screen one, what do you guys…"
23 hours ago
John Bizley replied to ismail shah's discussion Removal of Large Spaces between Posts
"No worries, glad you got it figured out :-)"
yesterday
John Bizley replied to John Bizley's discussion Here are a couple of little text tips that you may find useful
"Thanks JF :-)"
yesterday
Mary Jane Peterson replied to Ron's discussion Free Emoji for Ning Apps Early Access Subscribers
"Hi Ron 
Thank you , will this also be on ning 2.0 as well ?"
yesterday
More…