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 Help & Support Inserting Google Adsense in a newspost doesn't work.
Hhawk
Posted on 03 Mar 2010, 14:39:05

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

Okay I have enabled HTML, however it won't display a Google Adsense advertisement?

For example, I add the following code in the full story section:
Code:

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxx";
/* 468x60 2010 Linken */
google_ad_slot = "8019322826";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


But it only shows up as a few empty spaces.

Any way to make it display the advertisement?
#1991
Chris
Posted on 03 Mar 2010, 16:25:53

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

Possible to link to the page so I can look at it?
#2000
Hhawk
Posted on 03 Mar 2010, 18:11:44

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

Okay I have readded the adsense code *within* the news post (full story).

Take a look here: http://deelektrischeauto.nl/news/18/0/BMW-maakt-serieus-werk-van-elektrische-auto.html

As you can see, between the first and second paragraph there is a gap (few empty lines). Here should the Adsense code being displayed.

As for the Adsense code, it works, cause looking further down, I have added another Adsense advertisement, but this time in the template. Now it works.

However I want the Adsense advertisement to appear in the post itself.
#2006
Chris
Posted on 03 Mar 2010, 23:34:00

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

The problem is that the system is automatically adding <br /> to new lines so this is messing up the javascript adsense code.

I made a patch for the bbparser.php file you can download here. Replace your own copy with this new copy.

When pasting your adsense code directly into the news article format it like so

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


Keep the <script section all on one line. For example this is bad

Code:
<script 
type="text/javascript">

#2009
Hhawk
Posted on 04 Mar 2010, 08:13:13

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

Thanks man. Works now!

:hug:
#2011
Hhawk
Posted on 22 Apr 2010, 11:17:40

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

Same problem again with 3.5...

Can you give me a *fixed* version of the bbparser? So it will work once more with my Google Ads?

Or at least tell me what I have to change, so I can do this myself in the future?
#2262
Last edited by Hhawk at 2010-04-22 11:18:08 Reason:
Cow
Posted on 22 Apr 2010, 18:33:11

Access: Member
Total Posts: 18
Joined: 2010-03-30

brbrb !!! work fine on 3.4 .... :s

i juste copy on my template (news)
#2263
Hhawk
Posted on 26 Apr 2010, 12:35:51

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

Quote:
brbrb !!! work fine on 3.4 .... :s

i juste copy on my template (news)

Please quote me where I have said version 3.4 in my last reply?

I said it doesn't work with version 3.5 not 3.4.
#2266
Network-13.com © 2013