Announcement

  •  » Requests
  •  » [resolved] random representant

#1 2010-12-08 07:03:14

Nakre
Translation Team
2010-05-05
156

[resolved] random representant

I know there is already "find a new random representant" but would be also nice to have "change randomly the representant image" like daily or so.. ?

Offline

 

#2 2010-12-08 09:29:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: [resolved] random representant

1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:

Code:

<?php
$conf['allow_random_representative'] = true;
?>

Offline

 

#3 2010-12-08 15:52:41

Nakre
Translation Team
2010-05-05
156

Re: [resolved] random representant

is that working only for the albums that has sub-albums ? coz so far thats what i see if an album has not sub one doesnt seem changes randomly.
Thanks :)

Offline

 

#4 2010-12-10 23:57:24

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: [resolved] random representant

Nakre wrote:

is that working only for the albums that has sub-albums ? coz so far thats what i see if an album has not sub one doesnt seem changes randomly.

Sorry Nakre, my answer was not complete (I don't use this configuration setting very often).

Once you've set $conf['allow_random_representative'] = true, then you have to perform a "Delete Representant" action on each category. You can also perform the following SQL query:

Code:

UPDATE piwigo_categories SET representative_picture_id = NULL;

Offline

 

#5 2010-12-11 01:36:13

Nakre
Translation Team
2010-05-05
156

Re: [resolved] random representant

worked fine thanks :)

Offline

 

#6 2010-12-15 23:52:18

Nakre
Translation Team
2010-05-05
156

Re: [resolved] random representant

ah plg would the representants change as the random image with abt time 10 secs etc, without refresh needing ?

Offline

 
  •  » Requests
  •  » [resolved] random representant

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact