Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-03-08 07:58:39

chumby
Member
Registered: 2014-10-23
Posts: 188

Photos in Album. Sort by random?

Hi there,

Does anyone know of a way to sort/display images in an album as "random" instead of the presets that are listed in the album settings?

Cheers,
Chumby

Offline

#2 2020-03-08 09:01:56

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Photos in Album. Sort by random?

there is a sample function in the phplugins-pangolin-sample.php file starting on line 510 (of an unaltered file) that has to do with creating a custom image loop for albums.
It doesn't show anything about randomizing the loop, but there is a php rand() function that might be useful: https://www.w3schools.com/php/func_math_rand.asp

You'd have to know some php coding. Maybe something that finds the number of photos then uses the rand() function to display them randomly.

Matt or Ben or Daniel will likely know more, but it's a place to start.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2020-03-08 18:26:10

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Photos in Album. Sort by random?

OK great, thanks Rod.  Wil check that out.

Would be kind of cool to let the user sort the photo album by a drop down with different options as well.

Cheers
Chumby

Offline

#4 2020-03-08 23:31:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Photos in Album. Sort by random?

chumby wrote:

OK great, thanks Rod.  Wil check that out.

Would be kind of cool to let the user sort the photo album by a drop down with different options as well.

Cheers
Chumby

You can do that already, but there isn’t a random option.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2020-03-09 06:59:46

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Photos in Album. Sort by random?

Ok, nice one.  Where is that option, Rod?

Cheers
Chumby

Offline

#6 2020-03-09 11:17:07

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Photos in Album. Sort by random?

It’s in the album setup under the base settings tab


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2020-03-09 16:52:06

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Photos in Album. Sort by random?

Hi rod,

Yep got that one... I was talking about something a user may be able to use on the album homepage - not something in he backlight admin there.

I dont think that is possible at the moment?

Cheers
Chumby

Offline

#8 2020-03-09 21:37:02

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Photos in Album. Sort by random?

Not sure what you mean by the “album homepage.”

You can set the order on a per album (photo order) or per album set (album order) basis in Lightroom or in Backlight.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2020-03-09 21:43:07

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Photos in Album. Sort by random?

Hi Rod,

I am thinking about the web user being able to filter the order via a publicly viewed drop down or the like on the album. 

Not admins that have access to backlight or lightroom... just thinking about user customization here.  All good if not available.. just a thought...

Cheers
Chumby

Offline

#10 2020-03-09 21:49:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Photos in Album. Sort by random?

Ah. I see what you mean now.
That’s not an option, though it might be possible using that custom loop function example in phplugins.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

Board footer

Powered by FluxBB