Catergory Name aligned right Catergory Name aligned right
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Catergory Name aligned right

Started by noni, June 10, 2006, 12:27:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

noni

I just upgraded my gallery to the new version and now one catergory name is randomly aligned to the right...

http://gallery2.efanguide.com/~amritarrao/

What's have I done wrong.  ???

Vargha

looks fine to me ??? clear ur cookies and try again, or just use ctrl+F5
Haalaa Boro Ye Chayi Vasam Dorost Kon Ta Man Ye Fekri Be Halet Bokonam ;) Ye Hendooneye Shotoriham Biyar Bizahmat :)
Visit My Site www.Rangarang.co.nr
Check Out My Gallery
www.Rangarang.co.nr/buddies
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F838%2Frangarang4xn.jpg&hash=48b4c3087515cafe09fc6d3f7ee19dce86328d8e)

Paver

In Firefox, all categories are left-justified - it looks fine.  In IE, the "Movie Screencaps" category is pushed over to the right.  The only difference this category has is that it has no immediate albums in it.  Looking at the source, you see that this category has a class="catrow_noalb" compared to class="catrow" for the rest.  In addition the empty cell to the left of this category (which holds the category thumbnail if you set one) has a align="left" tag compared to the rest not having one.

Looking at at the sample theme's style.css, "catrow_noalb" and "catrow" only differ in a color element, so that cannot explain it.  So I assume IE has an issue with the align tag for the empty cell.  Maybe it thinks if you want to align it, it should give it some space or something.

The easy fix would be to modify the variable $template_cat_list in themes/yourtheme/theme.php.  If it's not present, copy it from themes/sample/theme.php or copy it from here.  Modify as shown to remove the align="left" tag:
// 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>{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"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

Vargha

nice one paver, i didnt think of looking at it in IE  :D
Haalaa Boro Ye Chayi Vasam Dorost Kon Ta Man Ye Fekri Be Halet Bokonam ;) Ye Hendooneye Shotoriham Biyar Bizahmat :)
Visit My Site www.Rangarang.co.nr
Check Out My Gallery
www.Rangarang.co.nr/buddies
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F838%2Frangarang4xn.jpg&hash=48b4c3087515cafe09fc6d3f7ee19dce86328d8e)

noni

Thx for helping, but I added that code to the theme.php file and it didn't make a difference.  :-\

Paver

Oh, I should have realized that the important difference is in the beginning <td>.  Replace the "catrow_noalb" block with this (adding in align="left" to the beginning <td>):
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->

noni