coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: DRN on August 25, 2006, 08:18:31 AM

Title: Adding banners above and below each picture
Post by: DRN on August 25, 2006, 08:18:31 AM
Hi,

I would like to add a banner both above and below each picture when viewed (on the php page where users can rate or comment the picture... for example hxxp://mydomain.com/displayimage.php?album=6&pos=21)

Here's an image to clarify what I wish to do:
Click Here (http://img244.imageshack.us/my.php?image=imagesn2.jpg)
I marked the places in which I would like to place the banners with big red BANNER title.

I managed to add a banner below the menu, after editing the theme file, but I couldn't find what exactly need to be edited in order to place banners above and below each picture.

If anyone could tell me which files need to be edited, it would be great. And if possible to refer me to the exact lines, it would be even better.

Thanks a lot :)
Title: Re: Adding banners above and below each picture
Post by: Gizmo on August 25, 2006, 02:47:18 PM
The code for $template_display_media is what you can edit to add your banners. If this code isn't in your theme.php, copy it from the sample>theme.php and paste it in. You'll want to place your banners before and after the {IMAGE} variable.


// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2px" cellpadding="0px" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

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

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





<!-- BEGIN img_desc -->
                        <table cellpadding="0px" cellspacing="0px" 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;
Title: Re: Adding banners on both sides of each picture
Post by: ackee on December 16, 2006, 10:24:23 PM
I want to add banners to the sides of each picture.  Can I change the look using the same method as posted for top and bottom banners in August?
Title: Re: Adding banners above and below each picture
Post by: Joachim Müller on December 18, 2006, 06:09:18 AM
Yes.