1
Anonymous
News 1.63 and google adsense
  • 2008/12/13 21:48

  • Anonymous

  • Posts: 0

  • Since:


The news module version 1.63 has a nice function for adding advertisements in text or javascript. I added a google adsense javascript in this field but I don't see any advertisements. (I use XOOPS ver 2.3.2b) Does anybody have a clue?

2
ghia
Re: News 1.63 and google adsense
  • 2008/12/14 2:00

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Advertisements and/or IP addresses are blocked by software, firewall, etc. ?
Was it properly registred for your site?
Does it work in a test html page?

3
Anonymous
Re: News 1.63 and google adsense
  • 2008/12/14 12:35

  • Anonymous

  • Posts: 0

  • Since:


When adding the adsense code in a block it works well. With the news module nothing happens.

To be precisely, I use the option in the news config where you can add a javascript or an advertisement text. I guess I only have to put code there to show advertisements in all news articles? Or do I have to make some other steps too?

4
webmystar
Re: News 1.63 and google adsense
  • 2008/12/14 12:48

  • webmystar

  • Friend of XOOPS

  • Posts: 415

  • Since: 2008/6/23


i think the news modul "destroy" the structur from the adsense javascript code ...

i would write the adsense code in the template from the news modul.

5
Anonymous
Re: News 1.63 and google adsense
  • 2008/12/14 12:54

  • Anonymous

  • Posts: 0

  • Since:


When putting in an ordinary text it does not show as well. Besides that it's a function I'd like to use, I don't like hacking templates for this.

6
Anonymous
Re: News 1.63 and google adsense
  • 2008/12/16 19:37

  • Anonymous

  • Posts: 0

  • Since:


Bump

Is there anybody who has seen this option working?

7
trabis
Re: News 1.63 and google adsense
  • 2008/12/17 0:36

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Edit news/templates/news_item.html

Then paste the tag <{$advertisement}> where you want it to display.

Please have in atention that the advertisement is also included on index.php. This means that you can have a list of several articles each one displaying an advertisement. This will be against the conditions imposed by google adsense.

If you want your ad close to your news item text then you should consider showing it just in article.php (single item) and for doing so you need to edit news/index.php and remove line~276:

$xoopsTpl->assign('advertisement', news_getmoduleoption('advertisement'));

If you want to place your ad bellow the news item (for example, above the comments nav) then you may find a better place for the tag in templates/news_article.html (which is not used in index.php and will avoid the hack)

8
Anonymous
Re: News 1.63 and google adsense
  • 2008/12/17 16:39

  • Anonymous

  • Posts: 0

  • Since:


Thank you for your little tutorial Trabis. I got it working now

Login

Who's Online

464 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 464


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits