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 2019-05-14 21:31:41

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 235
Website

Counting the number of photos in an album

Hello,

Is there a way to ask the publisher how many photos are in an album or on the whole site?

I would like, using a hook with phplugin, to display the number of photos currently present in the visited album.

Is that possibel?
Thank you
Nico

Offline

#2 2019-05-14 21:42:36

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Counting the number of photos in an album

Hi Nico, see the example in phplugins-pangolin-sample.php for copy_top.  The specific code looks like this:

if ($this->hasAlbum()) {
	echo 'Number of photos: '.$this->album->getNumberOfPhotos();
}

Offline

#3 2019-05-14 22:16:01

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 235
Website

Re: Counting the number of photos in an album

Humm thanks Ben, but I think it's PHPlugins functionality in Backlight 2. I don't think the Number of photos is accessible this way in Backlight 1.

No?

Nico

Offline

#4 2019-05-14 23:45:55

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Counting the number of photos in an album

Nico3939 wrote:

Humm thanks Ben, but I think it's PHPlugins functionality in Backlight 2. I don't think the Number of photos is accessible this way in Backlight 1.

No?

Nico

Correct, that's a Backlight 2 feature.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#5 2019-05-15 00:07:19

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 235
Website

Re: Counting the number of photos in an album

Thanks Daniel, so this feature don't exist in Backlight 1?

Offline

#6 2019-05-15 00:22:59

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

Re: Counting the number of photos in an album

I just ran a quick test. This feature does not work in Backlight 1


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 2019-05-15 00:23:38

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 235
Website

Re: Counting the number of photos in an album

Thank you very much Rod

Offline

Board footer

Powered by FluxBB