I've done a fresh install of Gallery 3 and have everything working smoothly, but I'm having trouble figuring out how to add my Google Adsense code.
The old instructions for Gallery 2 don't seem to apply to the new template structures.
I've tried adding the javascript in the "Theme Options" page in the "Header Text" and "Footer Text" areas, but when I click the "Save" button, the form strips out the javacript and leaves behind the html only...
Code I paste:
<script type="text/javascript"><!--
google_ad_client = "pub-4777317788332621";
/* 336x280, created 1/24/10 */
google_ad_slot = "5524378183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
-----------------------------
Code left behind after hitting the "Save" button:
<!--
google_ad_client = "pub-4777317788332621";
/* 336x280, created 1/24/10 */
google_ad_slot = "5524378183";
google_ad_width = 336;
google_ad_height = 280;
//-->
Do I need to input any additional code to preserve the javascript?
How can I add the Adsense code to every page in the gallery?
Thanks for your help,
Joe
Posts: 27300
you need to edit the view page you want to add the code to.
So edit themes/wind/views/page.html.php
JS is removed for security reasons.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
I would like to know where and how to add my Google Adsense code to make it appear whenever an individual image is exibited in my Gallery 3.0 beta 2
Please see link to my page and I guess I am using default theme.
http://www.nigerianfolks.com/modules/gallery/index.php/Nollywood
__________________________________________________
Pretenders are people who lack self confidence...
Posts: 27300
First you need to upgrade to an experimental version:
FAQ: How do I upgrade?
Then add this module:
http://codex.gallery2.org/Gallery3:Modules:code_block
then edit the block you would like to edit. Add the block to the sidebar.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery TeamFAQ: How do I upgrade?
Posts: 18
floridave,
Thanks for your reply.
Would it be correct if I say Gallery 3.0 Beta 3 is the experimental version? because I noticed it is the most talked about in the forum at the moment.
If not, may I have a direct download link?
_______________________________________________
Pretenders are people who lack self confidence...
Posts: 16504
Here's the link for the latest code:
http://github.com/gallery/gallery3/zipball/master
And more detailed instructions, be sure to follow them:
http://codex.gallery2.org/Gallery3:Upgrading
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
Ok, upgrade from Gallery 3.0 beta 2 to gallery-gallery3-6023f2b was a success, (without any snitch.
My initial problem was that my Username or password was compromised, so I had to authenticate and was not logged in during upgrade as most people would do and as stated in the instructions.
Now, I still can't login with the info I see in var/database....
Changing login info last night got my screen frozen or continous loading page, where do I go from here?
If I can't login, there is no way I can integrate the adsence code I requested help for here.
Looking forward to a possitive and implementable response.
________________________________________________
Pretenders are people who lack self confidence...
Posts: 16504
That's not the information you'd use to log into Gallery. That information is only stored in the database. The username is most likely admin, but the password is something you've set or left at the auto-generated password during your initial install. If you've forgotten that, let us know. One of the developers posted a post that resets that using a sql query.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
nivekiam,
Thanks, I know the post you are refering to, in that thread, I stated that I lost my password.
See quote below,
http://gallery.menalto.com/gallery_3.0_beta_2_feedback?page=4
My problem is that, I don't really know how to run sql queries, so, in my case, it always returns a syntax error.. pardon me.
But I will still give it another go, if problem persists, maybe a fresh install will take this ache off my head as I always keep the latter as the last option.
Thank you all who assisted me so far, your assistance is not in vain because, each I troubleshoot this, I learn something new.
______________________________________________
Pretenders are people who lack self confidence...
Posts: 16504
Ah, I see.
If you have phpMyAdmin, it makes it a little more user friendly to run queries. The query you'd want to run, since you don't have a prefix:
update users set password='O34c384a78a5d83403d5ddd80ed077165ef7' where id=2;
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
nivekiam,
I got to update the users set password .. so that one went well but I got this.
If you have more tips, please leave it here, I am going to bed now (because I live in Europe and it's past 2 am)but I will reset it to how it was to avoid vulnerabilities and check back here when I wake up to see if there further steps from here.
In between I think I messed all up back when I tried to integrate it to Nuke-Evolution with the integration pack without checking it's compatibility with gallery3. LOL
___________________________________________
Pretenders are people who lack self confidence...
Posts: 16504
If they have tables named the same, there would be conflicts and you'd have "blown up" both installs. So it's probably best to start over from scratch.
You can re-import your images using the Server Add module:
http://codex.gallery2.org/Gallery3:Modules:serveradd
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
I started all from scratch again, using gallery3 b3 this time, the upgraded to gallery-gallery3-b8fb891 and lost my theme as indicated in the upgrade instructions, I followed to the FAQ I got when upgrade was successful, to solve the theme problem but it was not explainatory enough so, at a point I tried a fresh login and it an error that something was broken... so I could not login
I had no choice but to downgrade back to 3 b3 .
My question now is, is there a link to a fix for themes after upgrading besides the 2 lines of code in the FAQ, like a step by step tutorial, if so, could you please point me to the link?
Thanks in advance.
This is what I I have now.
http://www.nigerianfolks.com/modules/gallery3/index.php/nollywood/
There is something strange about the page, at the move of the mouse.
_____________________________________________
Pretenders are people who lack self confidence...
Posts: 27300
I would just start over with a fresh install from:
http://github.com/gallery/gallery3/archives/master
skipping the install of B3 and upgrade.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
Thanks Dave for your advice, I followed it through by starting over with the .tar from the link you proposed above; the only problem now is activating one of the 2 themes because they cant be clicked on.
______________________________________________
Pretenders are people who lack self confidence...
Posts: 27300
We only ship with one theme so if you want additional themes you will have to add them manually.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
There is no theme activated, I should have had (wind)like after other installs, I just can't activate it, all I have is a white page with links and text, unlike when I installed, activated and configured b2 and b3.
Maybe something went wrong with the installation?
See for yourself. http://www.nigerianfolks.com/modules/gallery3/
I hope I am not a bore with all this troubleshooting stuff.
______________________________________________
Pretenders are people who lack self confidence...
Posts: 18
Ok, I eventually got it to work, the problem was that the latest experimental version of gallery3 refused to function correctly in the modules directory of my website.
It is now fully functional at;
http://www.nigerianfolks.com/gallery/
You guys were right, when you indicated that this software was for those willing to live on the edge, I guess I am one of those poeple. LOL
Furthermore, I am using this medium to thank those who sacrificed part of their precious time to reply in regards to my quest.
_____________________________________________
Pretenders are people who lack self confidence...