Adding Adsense on Coppermine template is easy. You need to go to your Coppermine main folder ->Themes->Your theme->template.html and add Adsense code to header or footer or sidebar. This will be for your side wide template. But adding Adsense just beside the intermediate image is tricky. But for a better CTR you need to display your adsense ads just beside the intermediate image. Since Coppermine is an image gallery people tend to focus more on images rather than looking into header or footer. So if your Adsense ad is in header or footer there is a less chance of clicks but if you can manage to place your custom content or Adsense just beside the intermediate image in coppermine gallery, there is a high chance of better CTR because it is in a more visible and prominent position.
The instructions to add additional content or Google Adsense to Coppermine intermediate image pages apply for all extra content that should be applied above, below or next to (at the right or left) of your actual intermediate image that is embedded into the Coppermine page. Keep in mind though that the place at the right or left may already be small, depending on the screen resolution of your visitor and the size of your intermediate image, so it’s advisable to add your extra content at the top or bottom rather. Edit themes/yourtheme/theme.php, find the variable definition for $template_display_media and edit as suggested below. If that definition doesn’t exist in your custom theme, copy it first from the sample theme (Which comes by default in Coppermine package), then edit accordingly. The section that needs changing is the table that wraps the template token {IMAGE}, so you need to edit
<table cellspacing="2" cellpadding="0">
<tbody>
<tr>
<td align="center">{IMAGE}</td>
</tr>
</tbody>
</table>
Modify the inner table as you see fit. To add some content at the bottom, you would have to change those lines to
<table cellspacing="2" cellpadding="0">
<tbody>
<tr>
<td align="center">{IMAGE}</td>
<td align="center">Your custom content</td>
</tr>
</tbody>
</table>
The complete code is here. If you don’t have the $template_display_media in your theme.php, then you need to copy and paste the below code and to place it just before the closing ‘?>’ tag in your coppermine theme.php
/*********************************************************
** Section <<<$template_display_media>>> - START
**********************************************************/
// HTML template for intermediate image display
$template_display_media = <<<EOT
<tr>
<td align="center" nowrap="nowrap">
<table width="100%" cellspacing="2" cellpadding="0">
<tr>
<td align="center" style="{SLIDESHOW_STYLE}">
ADD YOUR ADSENSE CODE OR CUSTOM CONTENT HERE
</td>
<td align="center" style="{SLIDESHOW_STYLE}">
{IMAGE}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="2" cellpadding="0">
<tr>
<td align="center">
{ADMIN_MENU}
</td>
</tr>
</table>
<!-- BEGIN img_desc -->
<table cellpadding="0" cellspacing="0" width="100%">
<!-- BEGIN title -->
<tr>
<td><h1>
{TITLE}
</h1></td>
</tr>
<!-- END title -->
<!-- BEGIN caption -->
<tr>
<td><h2>
{CAPTION}
</h2></td>
</tr>
<!-- END caption -->
</table>
<!-- END img_desc -->
</td>
</tr>
EOT;
/*******************************************************
** Section <<<$template_display_media>>> - END
*******************************************************/
Demo: Andaman Port Blair Photo
Related posts:



This is the only tutorial I got the success. I tried with coppermine official tutorials . But only you gave me the correct answer. Tons of Thanks you. good luck.
@sldo: Thank you buddy
Thanks, it a very helpful post. It allow best monetizing adsense in coppermine, its helful.
Thank you Mily
Thank you Mily