These days Photo Galleries have become integral part of big portals. There are many open source PHP scripts that you can use for integrating photo gallery with your website. For example, we have Gallery, Coppermine, 4Images etc. Out of these I prefer to use CopperMine Photo Gallery. It is the best Photo Gallery PHP script available on internet. For proper installation, it requires PHP, MySQL, and ImageMagick or the GD Graphics Library, and web server software such as Apache. It can be easily integrated with Coppermine Photo Gallery has interfaces with other popular content management systems like e107, Invision Power Board, Joomla!, Mambo, phpBB, PostNuke, PunBB, Simple Machines Forum, vBulletin, Woltlab Burning Board, and YaBB SE. It is an open-source software and is licensed under the GNU General Public License.
But for using coppermine, you must have to add a “Powered by Coppermine” link in your photo gallery. Overall, Coppermine Gallery is a good gallery software. It’s really easy to use, bug free and integrates easily to many popular open source forums. But it is not easy to customize its code, as layout and functions are not properly separated.
You can easily earn a good amount of money through using adsense in your photo gallery. Today I will tell you how to place google adsense codes in your Coppermine photo gallery.
1: Below Header
For adding 728×90 adsense ad just below the header, you have to find “{ADMIN_MENU}” in the template.html file of your Coppermine template. Then add this piece of code just after “{ADMIN_MENU}”.
<table width=”100%” border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td align=”left” valign=”top”> {ADMIN_MENU}
<table width=”100%” border=”0″ align=”center” cellpadding=”25″ cellspacing=”0″>
<tr>
<td align=”center” valign=”top”>
Your Google Adsense Code
</td>
</tr>
</table>
2 : Adsense Ad around the image.
For adding adsense ads around images, you have to edit “themes.inc” file. This file is located in “include” folder of the Coppermine directory.
// HTML template for intermediate image display
if (!isset($template_display_media)) { //{THEMES}
$template_display_media = <<<EOT
<tr>
<td align=”center” class=”display_media” nowrap=”nowrap”>
<table cellspacing=”2″ cellpadding=”0″ class=”imageborder”>
<tr>
<td align=”center”>Your Adsense Code</td>
<td align=”center”>{IMAGE}</td>
<td align=”center”>Your Adsense Code</td>
</tr>
</table>
Find comment containing “intermediate image display”. Just compare the code with the code written above and add “<td align=”center”>Your Adsense Code</td>” just above and below “<td align=”center”>{IMAGE}</td>”.
So, in this way you can easily integrate Adsense with you Coppermine Photo Gallery and monetize your photo website. In case of any confusion, feel free to contact me.
To know more about Coppermine and to download itย visit http://coppermine-gallery.net/
THANK YOU so much for this! I’ve been searching for a way to add adsense around images in my coppermine gallery and always came up empty. Thanks to you now I’ll be able to do what I wanted. Thanks
Thank you for that advice. I used it to put the StumbleUpon button at my page top.
I am new to php coding, and could not find anywhere that gave a tutorial on how to ad the google adsense to my coppermine gallery theme. This was perfect! I had to do a little moding of the code and now it is perfect and I have you to thank!!! ๐ As soon as I get the new gallery online, stop by and see the results!
The adsense below the header didn’t work for me. When I just added by adsense code after {ADMIN_MENU} it worked but showed the banner on the left side. Then I tried with the code you published and it messed up my coppermine template. I think I’ll settle to just using the banner on the left side
Really many thanks! Finally i can ad adsense to my gallery! ๐
When I tried to add the 1. Below Header code, I too had problems. When I just added the code after {ADMIN MENU} I was able to get Google Ads to show. I just wanted to say Thanks as your information gave me enough to make this work.
Great Tutorial. Thanks.
Nice info. Thanks.
But, can I use two adsense ads adjacent to photos? What about TOR?
Terms of Service I mean. The one that does not allow you to post photos adjacent to adsense
The second one doesn’t work. Please help me!
Thanks for the tutorial. Worked perfectly ๐ My only slight concern is that it’s on what Google would consider to be non content pages (ie; the upload section/search etc), but I don’t think it will be too much of an issue. I’ll just remove if they ask me to.
Thanks a lot again buddy
perfect dud….. thanks a million….
i love google Adsense, it enables me to earn money on the websites and forums that i have put up several years ago. if you got tons of websites, you can earn a lot from Adsense alone
thanks bro… ๐
Many thanks for this valuable help
Thank you so much. I have dealt with coppermine for years but forgot the exact files to modify for ad placement. After sever unsuccessful attempts modifying the displayimage.php file, I found your site and also found the right files. Thanx.
thanks for this advisory and great article. I am trying to start a photo graphic website and this is really going to help me.
Thank you again and Regards.
Rajeev