Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums How To Including Adsense within stories / news articles.
Hhawk
Posted on 23 Jun 2010, 09:57:03

Access: Member
Total Posts: 94
Joined: 2010-03-01

How can I add Adsense (Google advertisements) code in news articles / stories?
Would be cool if there was a how-to for this.

Here is the code which Adsense uses:

Code:
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
/* 468x60 */
google_ad_slot = "3159916116";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


A few things which should be possible:

1. Adsense should only appear in the full story mode.

2. The position of Adsense should be random (if possible) for example:

Text
Text
Text
Text
Text
Adsense
Text
Text

And on reload:

Text
Text
Adsense
Text
Text
Text
Text
Text

I don't know if the last is possible, but would be nice. Otherwise skip it. The main thing I want, is that it automatically adds an Adsense advertisement in full story mode.

Please let me know. Thanks in advance.

(using 3.6)
#2538
Hhawk
Posted on 23 Jun 2010, 10:05:38

Access: Member
Total Posts: 94
Joined: 2010-03-01

I just got an idea, maybe this is easier to achieve...?

On my news page it shows the short story, when people click "Read more..." they will be presented with the full story.

Would it be possible to add the Adsense code automatically between short and full story?

For example:

News page:

Short story.
Read more...

On clicking "Read more..."

Short story (top part)
Adsense
Story

Let me know.

Regards
#2539
Chris
Posted on 25 Jun 2010, 16:57:37

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

To have the adsense display when viewing the full article could be done by editing the "Comments Structure" section of your template, place the adsense code between the {news} & {comments} tags
#2548
Hhawk
Posted on 06 Jul 2010, 10:11:42

Access: Member
Total Posts: 94
Joined: 2010-03-01

Well that works, however I would like it to appear within the story.
#2633
Network-13.com © 2013