[SOLVED] Google ads, stripped in Header text

uhuru53
uhuru53's picture

Joined: 2006-12-02
Posts: 94
Posted: Fri, 2013-05-31 13:02

Using Gallery 3.0.7 (Rive Droite),
why if I add google adsense into Theme options, Header text
it doesn't work?

The code is stripped from this:

<script type="text/javascript"><!--
google_ad_client = "ca-pub-*******************";
/* 728x90, creato 02/07/08 */
google_ad_slot = "***********";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

to this:

<!--
google_ad_client = "ca-pub-***********************";
/* 728x90, creato 02/07/08 */
google_ad_slot = "***********";
google_ad_width = 728;
google_ad_height = 90;
//-->

Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-05-31 14:40

Use http://codex.galleryproject.org/Gallery3:Modules:adsense
For securty issues text is purified.

Dave
___________________________________________
Blog & G2 || floridave - Gallery Team

 
uhuru53
uhuru53's picture

Joined: 2006-12-02
Posts: 94
Posted: Fri, 2013-05-31 18:05
floridave wrote:
Use http://codex.galleryproject.org/Gallery3:Modules:adsense
For securty issues text is purified.

Dave
___________________________________________
Blog & G2 || floridave - Gallery Team

I understand, but however adsense module allows only one choice: sidebar or header or footer.
I'd like sidebar and header and footer.
How could I add some adsense code also in header besides sidebar?
I remember Gallery2 had a way to customize themes in a way they didn't change whenever you update them,
is it possible in gallery3?
Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-05-31 20:10

Edit your themes view page(s)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
uhuru53
uhuru53's picture

Joined: 2006-12-02
Posts: 94
Posted: Fri, 2013-05-31 20:53
floridave wrote:
Edit your themes view page(s)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Which file, in wind theme, should I edit?

album.html.php
block.html.php
dynamic.html.php
movie.html.php
no_sidebar.html.php
page.html.php
paginator.html.php
photo.html.php
sidebar.html.php

thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-05-31 21:02

Depends where you want the adverts to show.
Just add some text first to the file and see where is shows up.
page.html will show on all pages
photo.html on photo and movie pages
album.html on album and collection pages

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
uhuru53
uhuru53's picture

Joined: 2006-12-02
Posts: 94
Posted: Sat, 2013-06-01 08:16

I see, but in my theme folder I have only:

album.html.php

don't have:

album.html

Should I edit album.html.php ?

Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2013-06-01 15:42

Yes

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
uhuru53
uhuru53's picture

Joined: 2006-12-02
Posts: 94
Posted: Sat, 2013-06-01 19:02

Got it! Done!

I put the adsense lines just below these:

<?= $theme->header_bottom() ?>
</div>

many thanks.