Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Catergory Name aligned right  (Read 4605 times)

0 Members and 1 Guest are viewing this topic.

noni

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Catergory Name aligned right
« on: June 10, 2006, 12:27:32 pm »

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.  ???
« Last Edit: June 11, 2006, 05:52:22 pm by Paver »
Logged

Vargha

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 223
  • Persian Soldier
    • Rangarang
Re: Catergory Name aligned right
« Reply #1 on: June 10, 2006, 12:32:10 pm »

looks fine to me ??? clear ur cookies and try again, or just use ctrl+F5
Logged
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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F838%2Frangarang4xn.jpg&hash=48b4c3087515cafe09fc6d3f7ee19dce86328d8e)

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Catergory Name aligned right
« Reply #2 on: June 10, 2006, 12:45:01 pm »

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:
Code: [Select]
// 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;
Logged

Vargha

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 223
  • Persian Soldier
    • Rangarang
Re: Catergory Name aligned right
« Reply #3 on: June 10, 2006, 12:46:23 pm »

nice one paver, i didnt think of looking at it in IE  :D
Logged
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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F838%2Frangarang4xn.jpg&hash=48b4c3087515cafe09fc6d3f7ee19dce86328d8e)

noni

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Catergory Name aligned right
« Reply #4 on: June 10, 2006, 05:45:25 pm »

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

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Catergory Name aligned right
« Reply #5 on: June 10, 2006, 06:23:27 pm »

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

noni

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Catergory Name aligned right
« Reply #6 on: June 11, 2006, 07:56:46 am »

It worked! Thanks a lot Paver :)
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.