coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Lenanshee on October 23, 2008, 10:17:52 AM

Title: Justify text / valign="top"
Post by: Lenanshee on October 23, 2008, 10:17:52 AM
Hi everyone!

I have a small problem I'd like to solve. Here is what I get:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fi38.tinypic.com%2F2igc493.gif&hash=904cb5bc6be0f3d63b80aff820b73dbbf96910bd)

I'd like the description of the category to be justified and the mini thumb I'm using to be aligned on top (just like you would do with <td valign="top">) but I don't know where I can modify these things.

Thank you in advance and keep up the good work guys!
Title: Re: Justify text / valign="top"
Post by: Gizmo on October 23, 2008, 12:21:14 PM
It would be so much easier to answer this given a link to your gallery. Problem is, we don't know which theme you're using (you didn't say) or if you've modified it (you didn't say).
Title: Re: Justify text / valign="top"
Post by: Lenanshee on October 23, 2008, 02:40:35 PM
Sorry  :-[

Her is my gallery: http://www.nicolekidmanfan.org/gallery/

I'm using the classic theme, I only modified the colors and font style.
Title: Re: Justify text / valign="top"
Post by: Gizmo on October 23, 2008, 06:13:14 PM
Much Better! You need to copy the $template_cat_list variable from the sample theme.php and paste it into your theme before the ending ?>


// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;


Find
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>

Replace with
<td class="catrow" align="left"><table border="0"><tr><td valign="top">{CAT_THUMB}</td><td align="justify"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>

Same idea for the albums if you wish to change those.