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]: Album Thumbnail Issue  (Read 3462 times)

0 Members and 1 Guest are viewing this topic.

Davis

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
[Solved]: Album Thumbnail Issue
« on: August 23, 2009, 04:13:50 pm »

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
« Last Edit: August 23, 2009, 06:29:15 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Album Thumbnail Issue
« Reply #1 on: August 23, 2009, 04:27:04 pm »

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

Davis

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: Album Thumbnail Issue
« Reply #2 on: August 23, 2009, 04:35:42 pm »

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

Nibbler

  • Guest
Re: Album Thumbnail Issue
« Reply #3 on: August 23, 2009, 04:51:19 pm »

From your debug output:

Code: [Select]
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.
Logged

Davis

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: Album Thumbnail Issue
« Reply #4 on: August 23, 2009, 05:13:32 pm »

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";
Logged

Nibbler

  • Guest
Re: Album Thumbnail Issue
« Reply #5 on: August 23, 2009, 06:17:36 pm »

Easily,

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

Davis

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: Album Thumbnail Issue
« Reply #6 on: August 23, 2009, 06:25:11 pm »

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

Davis
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.