Thumbnails for the categories Thumbnails for the categories
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Thumbnails for the categories

Started by flapane, December 04, 2010, 01:52:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flapane

Hi,
I never added the thumbnails to the categories, so I've never experienced such visual glitch.
The first thumbnail in the category section is ok, but the second one cause the text to be moved to the right, and the third one moves the text even further.
I'm sure that it's something related to the tables...
Any hints?
Thanks in advance
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Αndré

Can you please test if the text moves to the left if you use a longer category name (e.g. change 'I miei gatti' to 'I miei gatti - test if category name moves to the left if I add this text').

flapane

Hi Andrè,
you're right, you can see that the latest category now is well aligned (while the second one is still moved to the right).
Should I suppose that it's something related to the catlink class?
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

Update: I tried to align to the left the "catlink" class via css, but nothing happend.
What could it be?
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Jeff Bailey

Try adding this to your custom themes theme.php

/******************************************************************************
** Section <<<$template_cat_list>>> - START
******************************************************************************/
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
       <tr>
               <td class="tableh1" width="80%" align="left">{CATEGORY}</td>
               <td class="tableh1" width="10%" align="center">{ALBUMS}</td>
               <td class="tableh1" width="10%" align="center">{PICTURES}</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" style="width:100%;"><span class="catlink">{CAT_TITLE}</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 style="width:100%;"><span class="catlink">{CAT_TITLE}</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 tableb_alternate" 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;
/******************************************************************************
** Section <<<$template_cat_list>>> - END
******************************************************************************/

untested
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

flapane

Thank you so much, it worked great!
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Jeff Bailey

No problem. Thank you for resolving your thread.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré

Jeff, is there something to do here for a general fix?

flapane, did that issue occur in every theme or is it just related to your custom theme? I assume your custom theme is based on the mac_ox_x theme? I cannot replicate that issue on my testbed. Maybe it has already been fixed by another fix since the release of cpg1.5.10.

flapane

Andrè, yes, my theme is based on mac_ox_x theme but, to be honest, I don't know if it happened on the older theme too, because I've never used the categories before.
I've just tried to activate the older mac_ox_x theme and it seems to work well.
Assuming that I didn't modify the old theme.php while writing the new theme, I don't know if this is a bug that has been fixed in these months, or I've never noticed it just because I've never used the "categories" until some weeks ago.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Jeff Bailey

All I did was change these two lines
<td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left" ><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>

I added
style="width:100%;"
to the table columns that have the cat title and description.


table {
width: 100%;
}

caused the issue.
Not sure why it was there but I'm sure there is a reason, so I had him add the theme edit instead of removing that.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

flapane

It comes from the global main style sheet /style.css, while all the specific gallery css values are stored in the gallery theme folder at /gallery/themes/wooden/style.css.
The major drawback is that sometimes there may be a conflict, even if it never happend before.

Whenever I have some spare time, I'll try to let the gallery be independent from the website (and maybe release the theme), but atm unfortunately I don't know when.

Thanks again
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com