[Solved]: Album Thumbnail Issue [Solved]: Album Thumbnail Issue
 

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

[Solved]: Album Thumbnail Issue

Started by Davis, August 23, 2009, 04:13:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Davis

In my gallery I have 8 albums.  Under "Album Properties" each album is set up to use "Last Uploaded" as the Album Thumbnail.  When anyone uploads a picture I allow them to choose which of the 8 albums they feel it belongs in but I must approve it before it is posted.  

The issue I am having is that when someone uploads a picture to my gallery it automatically becomes the thumbnail for the album they choose to put it in even though I haven't approved it. I get an email that I have an upload to approve, I go to my site, the picture is indeed waiting to be approved, but it is already displaying as the thumbnail for whatever album the uploader decided it should go in.  

I have been told that it should not work this way and that something has been changed in the code of my coppermine install to make it behave this way but I have no idea where to look or how to get this issue fixed.  Can anyone help me figure this out?

Thanks
Davis

Nibbler

You need to give us more to go on. Post a link to your gallery, enable debug mode for all and have a non-approved pic displaying as album thumbnail.

Davis

Okay here is the link to my gallery http://www.bundalover.com/pics/index.php [NOT WORK SAFE]

If you look at the Album "Short Shorts" there is a picture of three girls in white shorts.  That picture is a picture that has not been posted in that album yet.  If you click on the album you will not see that picture.

I have enable debug mode for all.

Nibbler

From your debug output:


SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg15x_pictures WHERE aid = '12' ORDER BY ctime DESC LIMIT 1


That's not a normal part of Coppermine and it's not checking if the pic is approved.

Davis

Nibbler thanks for responding so quickly!  Is there something I could easily add to this line of code to make it check to see if the pic is approved?

Here is the line of code from my index.php

$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '{$aid}' ORDER BY ctime DESC LIMIT 1";

Nibbler

Easily,


$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '{$aid}' AND approved = 'YES' ORDER BY ctime DESC LIMIT 1";

Davis

Thank you so much my good man! That worked perfectly!  I truly appreciate your help!

Davis