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: [Solved]: Show first level album thumbnails - display problem.  (Read 5551 times)

0 Members and 1 Guest are viewing this topic.

JasonB

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 37
    • The Big Squiff

When setting "Show first level thumbnails in categories" to "No", 1.3 no longer shows thumbnails - but it does draw an empty table row.  Is there any way of getting rid of this altogether?  (So that it draws the pages as if there were no galleries at all.)

Sorry - I'd meant to post this under the Miscellaneous child forum...
« Last Edit: July 16, 2004, 07:24:43 am by JasonB »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Show first level album thumbnails - display problem.
« Reply #1 on: July 12, 2004, 08:41:18 am »

post a link to your gallery, please.

GauGau
Logged

JasonB

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 37
    • The Big Squiff
Re: Show first level album thumbnails - display problem.
« Reply #2 on: July 14, 2004, 05:36:33 am »

Okay.  I just whipped together a test.  You can look at it here.

Notice the extra "box" underneath the "Test 2 (Album)" category.  The other "Test" categories do not have this.  So I can tell just by looking at it visually (even assuming that it didn't have "1" and "0" for the Albums and Files columns, and that the background table cell wasn't lighter) that there's an album in that category.  The extra cell doesn't seem to serve any purpose.  I'm assuming that the template draws it anyway and, only after it's drawn, does it check the "show first level album thumbnails" setting and not draw the actual thumbnail itself.  Instead, I think it would make more sense to move the code for drawing that cell inside the conditional block that checks the preference so it's not drawn at all.

Note: Using different themes doesn't change this result.
« Last Edit: July 14, 2004, 05:43:54 am by JasonB »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Show first level album thumbnails - display problem.
« Reply #3 on: July 14, 2004, 08:48:08 am »

ah ok, I can see what you mean. I don't rememvber exactly how this used to be in previous versions. Currently, Tarique is trying to improve coppermine's output to make it at least xhtml standards compliant (preferrably even table-less), so this issue might get cured on the way. I'm sorry I have no immediate fix ready, would take some closer looks. Anyway, I'm putting this on my (ever-increasing) todo-list, but don't sue me if I don't come up with a solution immediately ;)
Maybe someone else knows a cheap fix?

GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Show first level album thumbnails - display problem.
« Reply #4 on: July 14, 2004, 09:36:28 am »

This issue has been there since 1.1 (ever since I added that hack) and there is no solution for it currently.
Logged
SANIsoft PHP applications for E Biz

JasonB

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 37
    • The Big Squiff
Re: Show first level album thumbnails - display problem.
« Reply #5 on: July 15, 2004, 04:44:48 am »

So long as it's something people are aware of that's all I ask.  You guys are doing a fantastic job!  :)
Logged

JasonB

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 37
    • The Big Squiff
Re: Show first level album thumbnails - display problem.
« Reply #6 on: July 15, 2004, 05:24:22 am »

I fixed it with a minor hack.  (When I actually looked at it seriously, it seemed fairly simple.)

I'm using the rainy_day theme.  In "theme.php" I made the following changes:

Replaced:

Code: [Select]
     <tr>
           <td class="tableb" colspan=3>{CAT_ALBUMS}</td>
     </tr>

With:

Code: [Select]
     {CAT_ALBUMS}
Replaced:

Code: [Select]
           $params = array('{CAT_TITLE}' => $category[0],
               '{CAT_THUMB}' => $category['cat_thumb'],
               '{CAT_DESC}' => $category[1],
               '{CAT_ALBUMS}' => $category['cat_albums'],
               '{ALB_COUNT}' => $category[2],
               '{PIC_COUNT}' => $category[3],
               );
           echo template_eval($template, $params);

With:

Code: [Select]
           if ($category['cat_albums']) $category['cat_albums'] = "<tr><td class='tableb' colspan=3>" . $category['cat_albums'] . "
</td></tr>";
           $params = array('{CAT_TITLE}' => $category[0],
               '{CAT_THUMB}' => $category['cat_thumb'],
               '{CAT_DESC}' => $category[1],
               '{CAT_ALBUMS}' => $category['cat_albums'],
               '{ALB_COUNT}' => $category[2],
               '{PIC_COUNT}' => $category[3],
               );
           echo template_eval($template, $params);

This simply sticks the table code into the value of the variable itself - if it doesn't have a null value.  (If it's null it won't display anything anyway.)
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.