Hello,
Can someone please tell me how to use google adsense code in gallery.. In which file do I have to paste the code? I know its a silly question but I could not use adsesne in gallery.. Please help me...
coolplace,
paulbearne gave directions for G2 if you want to do this for G1 then you have to paste the code in a html_wrap file. Depending on the location where you want the add to show. Read the stickies on how to work with the html_wrap files.
Go back to the template and make sure you haven't droped so of the code elsewhere on the page
this is stange!!
post the code here if you can't fix it
Paul
PS have a look at our good bad and ugly swindonGallery.org.uk
ricaw
Joined: 2006-04-03
Posts: 2
Posted: Wed, 2006-05-31 17:27
Hi all. I placed the AdSense code in my page (www.wright.com.br/gallery2/) but with AdSense code I can't upload the pictures using the Windows XP Publisher Tool because I can't login in the page. Anyone know why?
jkimbo
Joined: 2006-12-29
Posts: 18
Posted: Fri, 2006-12-29 21:11
I tried this and the adsense does not show, not even a public service ad will show. I have version 2.1.2
Posts: 87
Hi
Yes I can do this
Have a look at www.swindonGallery.org.uk
These instuctions are for the matrix theme but they should be same for the other themes
you need go to gallery2/themes/matrix/templates and make a folder called "local"
them copy into this folder from the template folder the file called theme.tpl
now open gallery2/themes/matrix/templates/local/theme.tpl in an text editor
and look for ( in my case ) <div id="gsFooter"> and add a div with the addsence code inside as below
<div id="footerAddBlock">
<script type="text/javascript"><!--
google_ad_client = "pub-3133210812009797";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div id="gsFooter">
{g->logoButton type="validation"}
{g->logoButton type="gallery2"}
{g->logoButton type="gallery2-version"}
</div>
This will put a google addsnece block at the bottom most pages
I have also edited the theme.css again copying it to a local folder (ie. gallery2/themes/matrix/local/theme.css)
I added this block to tidy up the div
#footerAddBlock{
display:block;
text-align: center;
padding:2px 0 2px 0px;
font-weight:bold;
background-color:#EEEEEE;
}
I hope this will help
Paul
Posts: 27300
coolplace,
paulbearne gave directions for G2 if you want to do this for G1 then you have to paste the code in a html_wrap file. Depending on the location where you want the add to show. Read the stickies on how to work with the html_wrap files.
Dave
____________________________________________________
Gallery Frames / Mods || G1 Test Gallery
Posts: 13
Hi Paul
I have done what you have said to the T - i hope.
when I looed at the view source of the main page I saw this:
<a href="javascript:alert('Validation disabled until you set allowSessionAccess in config.php');">
Is this something I need to do and if so how?
http://www.thegoodbadandugly.info/gallery2/main.php?
Regards
Johan
http://www.copywriting-tactics.com
Posts: 87
Hi
I have had a look and it seems to be working OK
then I spotted the junk in the thumbnail text
Go back to the template and make sure you haven't droped so of the code elsewhere on the page
this is stange!!
post the code here if you can't fix it
Paul
PS have a look at our good bad and ugly swindonGallery.org.uk
Posts: 2
Hi all. I placed the AdSense code in my page (www.wright.com.br/gallery2/) but with AdSense code I can't upload the pictures using the Windows XP Publisher Tool because I can't login in the page. Anyone know why?
Posts: 18
I tried this and the adsense does not show, not even a public service ad will show. I have version 2.1.2
any suggestions?
Posts: 87
Can I have an URL
Posts: 27300
Not the URL but a Codex page that might help:
http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense
Dave
____________________________________________________
Blog with G2 || G2 theme contest: $3K in Prizes
Posts: 1
EDIT - Fixed...!
If anyone else has this issue - clear your caches in the admin page
------------
well this balled up my gallery!
I did the code thing - but had a few issues to deleted the new 'local' directory.
I now cannot access my gallery at all!
I get this:
Security Violation
The action you attempted is not permitted.
Back to the Gallery
http://steveandciara.com/gallery2/main.php?g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT
Please can some advise how this has locked the gallery out??
thanks in advance
Steve