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: Add banners at displayimage  (Read 9072 times)

0 Members and 1 Guest are viewing this topic.

Cobra

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
    • CMS en Espaņol
Add banners at displayimage
« on: November 24, 2005, 11:04:51 pm »

I want to add a banner at displayimage. How can I do that?

I'm using rainy_day theme with a modificated header (with adsense).

Thanks,

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Add banners at displayimage
« Reply #1 on: November 24, 2005, 11:26:18 pm »

edit themes/yourtheme/template.html
Logged

Cobra

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
    • CMS en Espaņol
Re: Add banners at displayimage
« Reply #2 on: November 25, 2005, 12:39:05 am »

Quote
I'm using rainy_day theme with a modificated header (with adsense).

I already edit the theme.html when I modificated the header to add google adsense.

Now I want to add a banner at the top of the image in the displayimage.

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Add banners at displayimage
« Reply #3 on: November 25, 2005, 10:46:38 am »

Quote
I'm using rainy_day theme with a modificated header (with adsense).

I already edit the theme.html when I modificated the header to add google adsense.

Now I want to add a banner at the top of the image in the displayimage.

Wow! We just release 1.4.2 and already you want to desecrate it!  ;)
Shame on you!


I suppose you could open theme.inc.php
search for:

Quote
// HTML template for intermediate image display
if (!isset($template_display_media))  //{THEMES}
$template_display_media = <<<EOT

and right below that add:

Quote
<tr>
Your banner content here
</tr>

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Add banners at displayimage
« Reply #4 on: November 25, 2005, 10:48:30 am »

do not edit the core file include/theme.inc.php - edit themes/yourtheme/theme.php instead! Should be pretty easy to add a banner there.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Add banners at displayimage
« Reply #5 on: November 25, 2005, 10:53:25 am »

do not edit the core file include/theme.inc.php - edit themes/yourtheme/theme.php instead! Should be pretty easy to add a banner there.


Oops sorry about that.

Gaugau is right, of course.


Dennis
« Last Edit: November 25, 2005, 11:03:09 am by GauGau »
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Add banners at displayimage
« Reply #6 on: November 29, 2005, 03:59:08 am »

You could do this with the plugin system, across all themes in one whack!

codebase.php
Code: [Select]
$thisplugin->add_filter('post_breadcrumb','banner'); //below the breadcrumb

function banner()
{
    if (defined('DISPLAYIMAGE_PHP')) { 
        echo <<<EOT

<h1>This is my little banner</h1>

EOT;
    }
}
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.