Pages (2): 1 2   
Member
Member
thatlittleguy   19-01-2006, 17:33
#1

Any chance anybody could whip up a random photo style plug-in (and by plug-in I mean line of php code). Better yet would be the option to choose "random photo" or "random photo from specific album".

And it might not make sense to simply pull a random photo. Instead it might be more useful to display the thumbnail for a random photo and then link directly to that photo within it's own album.

Thank you very much.

Member
Member
luv   02-06-2008, 06:01
#2

Hello,

I'm looking for ways on how to display random image per album. Is there a way to achieve this? There's no option for this in the program. There are about 200 photos in one album and viewers dont really go through all images on the albums so it's the same pictures are getting viewed. At least randow view based on file names.

Thank you.

Administrator
Member
Member
fatman   03-06-2008, 00:19
#4

I have made a php file for display random images for external site(I show some random image on wordpress blog sidebar), if anybody interested, I could post the code here.

Administrator
Administrator
acrylian   03-06-2008, 07:51
#5

Of course, right on, we will add it then to your wordpress extensions page then.

Member
Member
fatman   03-06-2008, 12:07
#6

Added at ticket 555
http://www.zenphoto.org/trac/ticket/555

Administrator
Administrator
acrylian   03-06-2008, 12:15
#7

Thanks.

Member
Member
luv   04-06-2008, 06:51
#8

really nice! thanks.

Administrator
Administrator
acrylian   04-06-2008, 10:10
#9

It has been added to our extensions page http://www.zenphoto.org/2008/01/hacks/#random-image-external-site

Member
Member
luv   10-06-2008, 10:05
#10

The extension made by fatman is different from http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetRandomImages right? How to set getRandomImages? Is this the line where I should set?

[code]$imageWhere = " AND " . prefix('images') . ".show=1"[/code]

Thanks.

Member
Member
luv   10-06-2008, 10:16
#11

fatman,

Thank you for this piece of code. I have few questions because I cant seem to make it work.

1.) I placed random.php under zp-core and tested on the browser using http://mylocalgallery.com/zenphoto/zp-core/random.php?
num=9&height=50&width=50. I also tried with "class=" but it's not working.

There are boxes of thumbnails but the pictures are not showing. It displayed the filename of the image. I got this "Zenphoto Error: the requested object was not found." error when I clicked on the thumbnail.

  1. If I set the parameters or default value for num, height, width, class on random.php, will "http://mylocalgallery.com/zenphoto/zp-core/random.php" work?
Administrator
Administrator
acrylian   10-06-2008, 10:26
#12

luv, fatman's extension is meant to be used on a external site/pages that are not administrated by zenphoto (like a wordpress blog for example) while the function randomimages() is for zenphoto pages only.

Member
Member
luv   11-06-2008, 05:23
#13

Hi acrylian,

So how to set getRandomImages? I only have one album with 200 images.

Thank you.

Administrator
Administrator
acrylian   11-06-2008, 09:02
#14

Please follow the links to our documentation I posted above. And maybe read this before: http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/

Member
Member
vidisad   28-06-2008, 08:14
#15

I would like to have fatman's random image display on external site but php is not my strength. Here is the code for a gif image (images/slikom.gif) which serves as the link to my zenphoto gallery. When you click the gif it opens page with gallery. I would like to have instead of that gif image random image by fatman that does the same job, takes you to the gallery.

This is code i have now to do the above described job:
`

      [img]images/slikom.gif[/img]

    `

Where should I put fatman's code for the external php site?
`@readfile('http://yourgallery.com/zen/zp-core/random.php?

num=15&height=120&width=120&class=one-image&album=damjanci-ponaosob')`
I already have random.php in place. Does random.php has to be edited in any way?

Member
Member
fatman   28-06-2008, 08:31
#16

you may try

`

`

Member
Member
vidisad   28-06-2008, 23:01
#17

@fatman
It's working!!! Thank you very much. I would like to have it on click to open main zenphoto site instead of random photo you clicked on. That way visitors would be aware of all albums there. I guess this could be done with changing values in random.php but again I'm not sure which one should be changed. Could you please point me to that value?

Member
Member
girlsspot   30-06-2008, 13:58
#18

I had succeed according fatman's method. please go mysite http://girlsspot.info and see the effection on the right bar. You may set up a table or frame.

Member
Member
vidisad   01-07-2008, 05:22
#19

Very nice web site and of course girls. The fatman's code works for me too but I was just asking what should I change to have the random image (on the external site) being linked to the main zenphoto site instead of to the full size random photo in the target album.

Administrator
Administrator
acrylian   01-07-2008, 08:46
#20

You have to change the url in the random.php file. Look at this line: $randomImageURL = getURL($randomImage);
Replacing getURL($randomImage); with getGalleryIndexURL() should work.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.