coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: trackman on December 13, 2005, 12:34:37 AM

Title: Uploaded Files
Post by: trackman on December 13, 2005, 12:34:37 AM
What I have been experiencing is that uploaded files have been placed into the last uploads by the time they are uploaded, so if I upload some files after I approve the previous files they don't show up on the main page of last uploads. Is there anyway of when approving files, they show up on the main page first before any others.

Hope you understand

trackman ;D
Title: Re: Uploaded Files
Post by: Paver on December 13, 2005, 03:31:12 AM
No, I don't understand.  Files are shown in "last uploads" in order by upload time.  Are you saying you want files to use the approval time instead? 
Title: Re: Uploaded Files
Post by: Nibbler on December 13, 2005, 06:40:12 PM
editpics.php, find

$update .= ", approved = 'YES'";

change to

$update .= ", approved = 'YES', ctime = UNIX_TIMESTAMP()";
Title: Re: Uploaded Files
Post by: trackman on December 13, 2005, 09:32:31 PM
Thanks Nibbler, but they are still showing by approval not upload time ???
Title: Re: Uploaded Files
Post by: Nibbler on December 13, 2005, 09:40:16 PM
Fix include/functions.inc.php too then

$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY pid DESC $limit";

change to

$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY ctime DESC $limit";
Title: Re: Uploaded Files
Post by: trackman on December 13, 2005, 10:14:22 PM
Thanks Nibbler, sorted ;D