xoops forums

Zap_English

Quite a regular
Posted on: 2016/6/6 9:12
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 391
Since: 2016/5/24
#1

Xoops Banners and Google Adsense

XOOPS Version XOOPS 2.5.7.2
PHP Version 5.4.45
mySQL Version 5.5.50
xbootstrap theme

I have several banners on my site and I wanted to add Google Adsense

I created the client "Google"

I added the banner and set the content to html, and nothing shows.

How can I get the xoops banner system to work with adsense?

Quote:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- xxxx -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxx"
data-ad-slot="xxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>


Maybe Google Adsense should be a built in feature of Xoops future versions

Mamba

Moderator
Posted on: 2016/6/7 13:03
Mamba
Mamba (Show more)
Moderator
Posts: 10988
Since: 2004/4/23
#2

Re: Xoops Banners and Google Adsense

To use GoogleAds in XOOPS, place the Google code in a block, and select HTML as type of block.

However, I never tried to use the banner system for that, for different clients, interesting idea...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Zap_English

Quite a regular
Posted on: 2016/6/8 7:11
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 391
Since: 2016/5/24
#3

Re: Xoops Banners and Google Adsense

Setting it in a block won't work if you're using the xoops banner system. The banner is built into xbootstrap

The banner system has the option "Use HTML code?"

So why does it work in a block but not in the core?

Things like being able to use adsense, OGP and multiple system languages should really be inherent in the core. They're all basic requirements in any website these days

Runeher

Module Developer
Posted on: 2016/6/8 14:31
Runeher
Runeher (Show more)
Module Developer
Posts: 825
Since: 2008/1/24
#4

Re: Xoops Banners and Google Adsense

I have no problem using adsense via the banner system...

Mamba

Moderator
Posted on: 2016/6/8 17:31
Mamba
Mamba (Show more)
Moderator
Posts: 10988
Since: 2004/4/23
#5

Re: Xoops Banners and Google Adsense

Quote:
I have no problem using adsense via the banner system...

I hope, you can help him to get this done, as he wants it...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Runeher

Module Developer
Posted on: 2016/6/8 20:27
Runeher
Runeher (Show more)
Module Developer
Posts: 825
Since: 2008/1/24
#6

Re: Xoops Banners and Google Adsense

I would if I knew what the problem is, but as I said it works well on all my sites, using both the Bootstrap theme and other themes. Never had any problems with it.

Zap_English

Quite a regular
Posted on: 2016/6/9 15:27
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 391
Since: 2016/5/24
#7

Re: Xoops Banners and Google Adsense

I just get a blank space when it cycles to a google ad

Runeher

Module Developer
Posted on: 2016/6/13 14:06
Runeher
Runeher (Show more)
Module Developer
Posts: 825
Since: 2008/1/24
#8

Re: Xoops Banners and Google Adsense

Can you post a link to your site?

Zap_English

Quite a regular
Posted on: 2016/6/13 17:32
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 391
Since: 2016/5/24
#9

Re: Xoops Banners and Google Adsense

http://rfu.in.ua

Runeher

Module Developer
Posted on: 2016/6/13 18:31
Runeher
Runeher (Show more)
Module Developer
Posts: 825
Since: 2008/1/24
#10

Re: Xoops Banners and Google Adsense

From the source code it seems your adsense code is not configured correctly. This is what it should look like in the banner system:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- banner-468x60 -->
<ins class="adsbygoogle"
style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-xxxxxxxxxxxx"
data-ad-slot="xxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Notice:

style="display:inline-block;width:468px;height:60px"