there's a way to the album thumb always random? there's a way to the album thumb always random?
 

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

there's a way to the album thumb always random?

Started by alexandre596, May 15, 2012, 10:53:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexandre596

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)

Αndré

What's the actual question? Set the album thumbnail to random and it will always be random for that album, unless you change it.

alexandre596

Quote from: Αndré on May 16, 2012, 10:15:00 AM
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

lurkalot

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.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

alexandre596

Quote from: lurkalot on May 16, 2012, 11:45:52 PM
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?

Αndré

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')";

alexandre596

Quote from: Αndré on May 21, 2012, 01:47:03 PM
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!!!!