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/
Leave a Reply