[Solved]: Show first level album thumbnails - display problem. [Solved]: Show first level album thumbnails - display problem.
 

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

[Solved]: Show first level album thumbnails - display problem.

Started by JasonB, July 12, 2004, 06:24:03 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

JasonB

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

Joachim Müller


JasonB

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.

Joachim Müller

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

Tarique Sani

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

JasonB

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

JasonB

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:


     <tr>
           <td class="tableb" colspan=3>{CAT_ALBUMS}</td>
     </tr>


With:


     {CAT_ALBUMS}


Replaced:


           $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:


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