[SOLVED] Help with inserting Adsense banner between album items
mcemrn
Joined: 2013-02-17
Posts: 20 |
Posted: Thu, 2013-10-24 20:24 | |||
Hi everybody, i need help inserting an Adsense banner ( Banner 468 x 60 ) between the items of the album, precisely after three items, please see the screenshot attached. I think i have to modify the file \themes\wind\views\album.html.php I hope someone can help me, Michele
|
||||
Posts: 27300
This could be converted to a module but this should work for now. Add:
to the bottom of \themes\<your theme>\views\album.html.php
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 20
Oh Thanks floridave! You are fantastic, thanks for the code!
But i have a problem, the adsense banner will load properly in browsers Internet Explorer and Mozilla Firefox but... it won't load(after first page visited) in browsers Google Chrome, Opera and Safari in fact it will load only if i click F5 button!
Please help
EDIT: I tested some browsers...
WILL WORK ON: Internet Explorer 8, Internet Explorer 10, Mozilla Firefox
WON'T WORK ON: Google Chrome, Internet Explorer 9, Opera, Safari
Posts: 27300
Works for me in Chrome and IE10 and Safari 5.17 windows.
Does standard text and html work in the <div>advert code goes here</div> without the goofy js and iframe stuff from your advert banner?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 20
Ok the standard example text "advert code goes here" work good and display properly in all the browsers i tested like Chrome, Firefox, IE 8,9,10, Opera and Safari.
But when i put my Adsense Banner 468x60 between the tags <div></div> the banner will show (in browsers Chrome, IE 9, Opera, Safari) only the first page, then when i surf the gallery and change album the banner won't show anymore and only a blank div is showed unless i click F5 button.
I am 100% sure that the Adsense Banner is active and work properly because i use the same Banner 468 x 60 in other gallery pages...
Posts: 27300
I tried a few things with jquery and iframes......some luck with iframes but the TOS get in the way.
OK the only way to do this without breaking the TOS of google adsense is:
Edit \themes\<your theme>\views\album.html.php
find:
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
and before that add:
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 20
Thanks, now the code works 100% on every browser! Thanks for the time! Thanks, Thanks, Thanks