Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: iPODLounge Theme ~ Adding Google Adsense Below Image  (Read 4458 times)

0 Members and 1 Guest are viewing this topic.

D-Block

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
iPODLounge Theme ~ Adding Google Adsense Below Image
« on: April 04, 2007, 11:21:34 pm »

Hi.  I am having some trouble. I am using the IPODLounge Theme with the latest CPGallery.

Intro: I have done a search on the forums with the keywords "adsense".  I read them and I tried to implement the suggestions like copying the section you need from the sample template and pasting into yours.  This didn't work.  I am missing something I guess.

Problem: I need to show my ads(adsense) below each full image that is viewed.

Screenshot available? Yes --> http://mangarooter.com/scr33n.gif - That is where I want my ads to appear.

Example Code Available For Theme [IPODLOUNGE]? Yes-->
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.3
  $Source: /cvsroot/coppermine/stable/themes/sample/theme.php,v $
  $Revision: 1.4 $
  $Author: donnoman $
  $Date: 2005/12/04 03:22:35 $
**********************************************/

define('THEME_HAS_NAVBAR_GRAPHICS'1);

// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/up.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>

                                <td align="center" valign="middle" class="navmenu" width="48px">
                                                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a>
                </td>





                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>


                                <td align="center" valign="middle" class="navmenu" width="48px">
                                                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
<!--WILL USE FASTCLICK.COM ADS HERE INSTEAD HERE-->
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->


        </tr>


EOT;

?>
« Last Edit: April 05, 2007, 08:47:21 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: iPODLounge Theme ~ Adding Google Adsense Below Image
« Reply #1 on: April 05, 2007, 08:13:21 am »

If you want the adsense code to appear below your intermediate images, don't edit the navbar section. Edit the stuff below
Code: [Select]
$template_display_media. If that section doesn't exist in your theme, copy
Code: [Select]
// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;
from themes/sample/theme.php into a new line before
Code: [Select]
?>of themes/yourtheme/theme.php.

To actually insert your adsense code, add
Code: [Select]
                <tr>
                <td>
                  <!-- your adsense code here -->
                </td>
        </tr>
into a new line after
Code: [Select]
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
Logged

D-Block

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: iPODLounge Theme ~ Adding Google Adsense Below Image
« Reply #2 on: April 05, 2007, 08:35:46 am »

Thank you for your response, really means allot to me.  I have implemented what you said and It worked.  This issue can be labeled as "Solved"
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.