coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Cobra on November 24, 2005, 11:04:51 PM

Title: Add banners at displayimage
Post by: Cobra 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,
Title: Re: Add banners at displayimage
Post by: Joachim Müller on November 24, 2005, 11:26:18 PM
edit themes/yourtheme/template.html
Title: Re: Add banners at displayimage
Post by: Cobra on November 25, 2005, 12:39:05 AM
QuoteI'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.
Title: Re: Add banners at displayimage
Post by: artistsinhawaii on November 25, 2005, 10:46:38 AM
Quote from: Cobra on November 25, 2005, 12:39:05 AM
QuoteI'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
Title: Re: Add banners at displayimage
Post by: Joachim Müller 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.
Title: Re: Add banners at displayimage
Post by: artistsinhawaii on November 25, 2005, 10:53:25 AM
Quote from: GauGau 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.


Oops sorry about that.

Gaugau is right, of course.


Dennis
Title: Re: Add banners at displayimage
Post by: donnoman on November 29, 2005, 03:59:08 AM
You could do this with the plugin system, across all themes in one whack!

codebase.php

$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;
    }
}