coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: shronk on December 07, 2007, 01:06:23 AM

Title: Filmstrip valign?
Post by: shronk on December 07, 2007, 01:06:23 AM
Hi there

So I wanted to change the valign of the filmstrip from top to middel so that it'll look better.
However I couldn't find where the alignment is set?
Title: Re: Filmstrip valign?
Post by: Joachim Müller on December 07, 2007, 08:08:45 AM
edit themes/yourtheme/theme.php, find$template_film_stripand edit as you see fit. If that section doesn't exist in your custom theme, copy// HTML template for filmstrip display
$template_film_strip = <<<EOT

        <tr>
         <td valign="top" style="background-image: url({TILE1});"><img src="{TILE1}" alt="" border="0" /></td>
        </tr>
        <tr>
        <td valign="bottom" class="thumbnails" align="center">
          <table width="100%" cellspacing="0" cellpadding="3" border="0">
              <tr>
                 <td width="50%"></td>
                 {THUMB_STRIP}
                 <td width="50%"></td>
              </tr>
          </table>
        </td>
        </tr>
        <tr>
         <td valign="top" style="background-image: url({TILE2});"><img src="{TILE2}" alt="" border="0" /></td>
        </tr>
<!-- BEGIN thumb_cell -->
                <td valign="top" align="center">
                                        <a href="{LINK_TGT}">{THUMB}</a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" align="center" >&nbsp;</td>
<!-- END empty_cell -->

EOT;
from themes/sample/theme.php into a new line before?>of themes/yourtheme/theme.php
Title: Re: Filmstrip valign?
Post by: shronk on December 07, 2007, 02:08:29 PM
that doesn't work because the align is inside the {THUMB_STRIP} code :-\
Title: Re: Filmstrip valign?
Post by: Nibbler on December 07, 2007, 02:32:39 PM
You want to change the valign of the cell holding the thumb image right? So change it in the thumb_cell section.


<!-- BEGIN thumb_cell -->
                <td valign="top" align="center">
                                        <a href="{LINK_TGT}">{THUMB}</a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                </td>
<!-- END thumb_cell -->
Title: Re: Filmstrip valign?
Post by: shronk on December 07, 2007, 02:50:18 PM
<!-- BEGIN thumb_cell -->
                <td valign="middle" align="center">
                                        <a href="{LINK_TGT}">{THUMB}</a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                </td>
<!-- END thumb_cell -->


so this should actually align the tumbnails in the thumbstrip correctly, however, the smaller (in height) ones still stick on top  :-\
Title: Re: Filmstrip valign?
Post by: Nibbler on December 07, 2007, 03:08:39 PM
Post a link.
Title: Re: Filmstrip valign?
Post by: shronk on December 07, 2007, 03:38:02 PM
http://matterhorny.ch/galerie/displayimage.php?album=lastupby&cat=0&pos=1&uid=67 here you go
Title: Re: Filmstrip valign?
Post by: Nibbler on December 07, 2007, 03:52:11 PM
http://matterhorny.ch/portal/templates/matterhorny/css/template_css.css:


* {
margin:0;
padding:0;
align:center;
vertical-align:top;
}


::)