forum.coppermine-gallery.net

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
Code: [Select]
$template_film_stripand edit as you see fit. If that section doesn't exist in your custom theme, copy
Code: [Select]
// 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
Code: [Select]
?>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.

Code: [Select]
<!-- 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
Code: [Select]
<!-- 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:

Code: [Select]
* {
margin:0;
padding:0;
align:center;
vertical-align:top;
}

 ::)