1
alienday
Adding Google Adsense to Block
  • 2006/2/12 2:23

  • alienday

  • Just popping in

  • Posts: 16

  • Since: 2004/11/27


I try to add this:



------------------------------

I get this: The resource you are looking for cannot be opened by your browser. HTTP Error 406 - Not acceptable
Internet Explorer.

xoops 2.2.3 No error with PHP debugging, no trackable error within Apache.

I can submite fine if I remove
2
jonr_is
Re: Adding Google Adsense to Block
  • 2006/2/20 22:39

  • jonr_is

  • Just popping in

  • Posts: 32

  • Since: 2006/1/2 1


Yes, I have this problem too... any tips of how to add javascript to a blcok?
Now on Xoops: 4-3system.com

3
zyspec
Re: Adding Google Adsense to Block
  • 2006/2/21 2:24

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I have virtually the same code you have listed working in a block with no problems (Xoops 2.0.13.2). Literally the only difference is my google_ad_client number (obviously) and I have a google_ad_channel defined.

The only suggestion I can offer is that you make sure you have entered your google_ad_client number correctly and chosen HTML as the Content Type for the block. Not much help, but thought it might be worth a try.

Edited:
In searching around I found that your problem "could" be caused by the mod_security module in Apache. Check out this article for an .htaccess suggestion to see if this could be your problem.

4
jonr_is
Re: Adding Google Adsense to Block
  • 2006/2/21 2:57

  • jonr_is

  • Just popping in

  • Posts: 32

  • Since: 2006/1/2 1


zyspec, I owe you a beer. I had tracked the problem down to the code, so I suspected that somewhere, some anti-hacking code was doing its job.
I would never have guessed it was related to Apache, I would have searched the XOOPS code forever.
The .htaccess did the job. This should be in the FAQ.
Now on Xoops: 4-3system.com

5
macmend
Re: Adding Google Adsense to Block
  • 2006/2/25 11:38

  • macmend

  • Quite a regular

  • Posts: 285

  • Since: 2004/2/27


I have a similar problem except i get an empty block with just the title, even when I use an html block and use the .htaccess.

In fact I cannnot get adsense to appear in either of my XOOPS sites, one on 2.0.13 the other on 2.2

I am using safari in mac os 10.4.5
Free Mac Support

Ordinary Wisdom

apache server with php sshexec turned on
xoops version 2.0.18.1 & 2.3.1
php version 5.2.5
mysql version 5.0.45

6
jonr_is
Re: Adding Google Adsense to Block
  • 2006/2/26 2:08

  • jonr_is

  • Just popping in

  • Posts: 32

  • Since: 2006/1/2 1


Quote:

macmend wrote:
I have a similar problem except i get an empty block with just the title, even when I use an html block and use the .htaccess.

In fact I cannnot get adsense to appear in either of my XOOPS sites, one on 2.0.13 the other on 2.2

I am using safari in mac os 10.4.5


Have you looked at the source? Are the
7
cookie
Re: Adding Google Adsense to Block
  • 2006/4/18 19:23

  • cookie

  • Just popping in

  • Posts: 24

  • Since: 2004/10/25


I'm having a related issue. I do have the apache mod_sec installed...

However, one XOOPS site has a Google Adsense ad which shows up in a custom block that I call "advertisement"

This has been working for quite some time with no issues.

I'm building a new website, which has an "advertisement" block on the left column, and an "advertisement" block on the right column.

On the index of the website, both ads show properly. However, if I click on any of the sections (modules) of the website, the right column ad doesn't show at all.

I can view source and see that the ad code is there, but the block is blank (not showing the ad).

I wonder, would a block be considered a frame? When generating the adsense code, it asks whether the code will be placed in a frame. I've chosen no to this option.

Thanks in advance for any pointers/tips.

8
cookie
Re: Adding Google Adsense to Block
  • 2006/4/18 19:39

  • cookie

  • Just popping in

  • Posts: 24

  • Since: 2004/10/25


I've found that removing this line:

google_ad_type = "text_image";

Fixed my issue.

I'm not sure why, but it fixed it.

Thanks.

9
kjk786
Re: Adding Google Adsense to Block
  • 2006/4/18 20:41

  • kjk786

  • Just popping in

  • Posts: 38

  • Since: 2006/1/26


I'm using google adsene on my sites both 2.2.4 and 2.1.132 without problem.
You have to choose HTML when you create block and If you have 3-4 block with adsens on same page som of adsens will not show.
whttp://www.roo.no
Free Advertising

10
najmead
Re: Adding Google Adsense to Block
  • 2006/5/2 4:58

  • najmead

  • Just popping in

  • Posts: 5

  • Since: 2006/3/24


I'm having trouble with Google Adsense as well.

I've followed the advice in the link in a previous post in regards to .htaccess, but to no avail. Checking the source for the page shows the scripts are being added, but still not show. When I try and "preview" the block from the Administration interface, I get the following error at the bottom of the screen:

"); win.focus(); win.document.close(); //-->

Any help?

Login

Who's Online

332 user(s) are online (257 user(s) are browsing Support Forums)


Members: 0


Guests: 332


more...

Donat-O-Meter

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

Latest GitHub Commits