Member
Member
reneesanguinetti   2012-10-09, 15:48
#1

Hello,
I am using Zenphoto version 1.4.3.1 [10646] (Official build) with zpFocus v1.4.3.
In my sidebar I use printMostRatedAlbums and it works just fine! But I was wondering how to add a function so the images from the albums would display randomly. This is the code I use:

'

        '

Thank-you! Renee

Administrator
Administrator
acrylian   2012-10-09, 16:29
#2

YOu really should sometimes look at the documentation:..
http://www.zenphoto.org/documentation/plugins/_zp-extensions---image_album_statistics.php.html#functionprintImageStatistic

Ups, wrong link but still the same:
http://www.zenphoto.org/documentation/plugins/_zp-extensions---image_album_statistics.php.html#functionprintAlbumStatistic

All the "print" functions of the plugin are just convenience wrappers. All use these two functions.

Member
Member
reneesanguinetti   2012-10-09, 17:16
#3

Hello,
You are right, I should have investigated the documentation further.
But, I tried the code with '$option = random'.

'

            '

It doesn't print the albums (images) randomly, but instead shows the album title. Did I forget something in the code?
Thank-you.

Administrator
Administrator
acrylian   2012-10-09, 17:30
#4

Please look at your code and and compare with the link I posted. It should be really obvious why it doesn't work...

Administrator
Administrator
acrylian   2012-10-09, 17:40
#5

Probably I misunderstood you. You want the most rated albums displayed randomly? That is not possible at all. Either most rated or random with this plugin (if you use - hint- the right function) Otherwise you have to create an entire new custom function. That is why there is a "get" function.

Member
Member
reneesanguinetti   2012-10-09, 17:58
#6

Yes, I want the most rated albums displayed randomly. And I did use the printAlbumStatistic function with $option = random and it still did not print the albums (images) randomly, but instead showed the album title. I will look at the get functions.
I appreciate your time! Renee

Administrator
Administrator
acrylian   2012-10-09, 18:05
#7

I cannot reproduce this. printAlbumsStatistcs with the random option does work as expected. Be sure to set the parameters correctly.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.