forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: alexandre596 on May 15, 2012, 10:53:28 pm
-
I don't know how to say that... ???
well, everytime you create an album, and add pictures, the album thumbnail is always the last image that was uploaded, right?
but, I want it to be a random image not the last uploaded... (there's an option when you click in the album properties, that's the random I'm talking about)
there's a way for it happen?
I tried searching for something at albmgr.php file, but I couldn't find it anywhere there..
[I hope everyone could understand :P)
-
What's the actual question? Set the album thumbnail to random and it will always be random for that album, unless you change it.
-
What's the actual question? Set the album thumbnail to random and it will always be random for that album, unless you change it.
that's the question, the default is the last uploaded image, but I want to always be the "random image" option
-
Go to album properties, use the dropdown arrow just below that thumbnail, and select random image. Then click the Update album button at the bottom.
-
Go to album properties, use the dropdown arrow just below that thumbnail, and select random image. Then click the Update album button at the bottom.
yeah, but there's a way to that happen automatically?
-
First option: set the default value of the thumb field to -1 in the database's albums table.
Second option: open delete.php, find
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";
and replace with
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner, thumb) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id', '-1')";
-
First option: set the default value of the thumb field to -1 in the database's albums table.
Second option: open delete.php, find
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";
and replace with
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner, thumb) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id', '-1')";
tried the second option, and it's working!!
thank you very much!!!!