Member
Member
easynow   2010-07-23, 18:27
#1

hi, i love zenphoto!

At the moment i am using randomimage on my frontpage as a kind of banner.

My idea was to have it only source images from an unpublished album, so i can control what images it uses. However, if you are not logged in and viewing an unpublished album, the randomimage doesn't work and you get a placeholder instead.

is there alternative (to unpublishing) way of hiding the source album to get around this?

maybe there is some other way of doing this completely?

thanks for any help.

Member
Member
sbillard   2010-07-23, 22:53
#2

Please look at the function getRandomImagesAlbum(). I believe it is what you want.

Member
Member
easynow   2010-07-24, 16:22
#3

i understand this, however, the album i will be calling from will be un-published, so i assume people who are not me (logged in), will not be able to see it?

Member
Member
sbillard   2010-07-24, 16:43
#4

Did you perhaps look at the parameter definitions for this function?

Member
Member
easynow   2010-07-24, 17:22
#5

$showunpublished=false

woops

Member
Member
easynow   2010-07-24, 17:37
#6

i have just realised that the function i am using currently isn't the randomimage one, it is the printHeadingImage($randomImage) function within the effervescence theme.

this one crops and resizes the image before printing it.

i have no idea how to hack up this function to call $randomImageAlbum.

steep learning curve for me..

Administrator
Administrator
acrylian   2010-07-24, 17:45
#7

Replace one with the other...

Member
Member
easynow   2010-07-24, 17:52
#8

working on that, thanks for you help, i will report back..

Member
Member
easynow   2010-07-24, 18:01
#9

sorted it! thankyou for your help. php is new to me.

in case anyone else finds this useful:

in my html

Administrator
Administrator
acrylian   2010-07-24, 18:11
#10

It is the album name (for subalbums it is toplevel/sublevel/...), not the title. This small difference is quite important!

Member
Member
easynow   2010-07-24, 23:35
#11

woops yes of course! thankyou

Member
Member
easynow   2012-08-17, 15:27
#12

wrong post sorry

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