Advanced search  

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

Pages: [1]   Go Down

Author Topic: there's a way to the album thumb always random?  (Read 5657 times)

0 Members and 1 Guest are viewing this topic.

alexandre596

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
there's a way to the album thumb always random?
« 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)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: there's a way to the album thumb always random?
« Reply #1 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.
Logged

alexandre596

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Re: there's a way to the album thumb always random?
« Reply #2 on: May 16, 2012, 11:24:37 pm »

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
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 949
  • +Tinyportal Support team.
Re: there's a way to the album thumb always random?
« Reply #3 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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

alexandre596

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Re: there's a way to the album thumb always random?
« Reply #4 on: May 17, 2012, 12:37:17 am »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: there's a way to the album thumb always random?
« Reply #5 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
Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";and replace with
Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner, thumb) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id', '-1')";
Logged

alexandre596

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Re: there's a way to the album thumb always random?
« Reply #6 on: May 21, 2012, 02:28:02 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
Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";and replace with
Code: [Select]
$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!!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 20 queries.