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: Thumbnails for the categories  (Read 5391 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Thumbnails for the categories
« on: December 04, 2010, 01:52:45 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Thumbnails for the categories
« Reply #1 on: December 04, 2010, 02:48:16 pm »

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').
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #2 on: December 04, 2010, 03:04:19 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #3 on: December 05, 2010, 06:03:02 pm »

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

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #4 on: December 17, 2010, 06:56:32 pm »

bump
Any hints?

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Thumbnails for the categories
« Reply #5 on: December 17, 2010, 09:20:18 pm »

Try adding this to your custom themes theme.php
Code: [Select]
/******************************************************************************
** 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
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #6 on: December 17, 2010, 10:17:23 pm »

Thank you so much, it worked great!

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Thumbnails for the categories
« Reply #7 on: December 17, 2010, 10:21:07 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Thumbnails for the categories
« Reply #8 on: December 18, 2010, 10:05:33 am »

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.
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #9 on: December 18, 2010, 01:28:27 pm »

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.

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Thumbnails for the categories
« Reply #10 on: December 18, 2010, 05:25:56 pm »

All I did was change these two lines
Code: [Select]
<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>
Code: [Select]
<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
Code: [Select]
style="width:100%;"to the table columns that have the cat title and description.

Code: [Select]
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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Thumbnails for the categories
« Reply #11 on: December 18, 2010, 06:25:37 pm »

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
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 21 queries.