ZenphotoCMS Forum
How to show random picture? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: How to show random picture? (/thread-6.html)

Pages: 1 2 3 4


How to show random picture? - 3stripe - 05-04-2006

Hi folks,

Cany anyone advise on this - surely it's not that hard to change the hack above to output thumbnails instead of a full pic?

(If you actually know what you're doing that is! :-)




How to show random picture? - Chilifrei64 - 05-04-2006

3stripe,
I understand that you may want this really really bad as I am sure others do as well, however you really must be patient as this is not a request forum but a support forum and we will and can help when we can. For me personally, I am attempting to write one and have found it difficult to work with the above code to get multiple images to display with it and am working on another method. This however has been put on the back burner because of home improvements/school/work and other tasks which take a far greater priority than creating a flikr badge let alone make a fully functional one in 3 days.
I havent mentioned my "project" to anyone because I knew that I didnt have the time to be held to it and counted on for it.

Why is it that many people seem to be getting frustrated with the speed as to which things are getting updated/resolved with zenphoto. I'll admit, zenphoto isnt developing as fast as I would like but zenphoto is still a very young and small project. yes it has the ability to get bigger and I beleive it will, but until the project gets big enough and draws real developers to this forum who are willing to help, the response time for requests like this are going to take some time. Trisweb I am sure has a full plate with 1 going to UC Berkley and 2 going there for computer science.. that is not easy.. along with recent security vulnerabilities he has to take care of and all the absolute crazyness with the push for subalbums. He does not work for us, he is doing a favor for us by creating a very nice application which he is offering to us for FREE. We should all appreciate it and help out where we can as opposed to criticize and pound him and his project.

Basically everyone needs to be patient, most people are finishing up on their school year right now, just getting back from spring break and what not.. Put yourself in his shoes, UC Berkley computer science major, finishing up on your degree, maintaining a life outside of school and a job to pay for you needs, and creating a free piece of software.. which order would your priorities be?




How to show random picture? - 3stripe - 05-04-2006

Hey there,

Thanks for taking the time to reply...

I 100% understand the need for patience! Zenphoto really is a great project, and I'm ready and willing to make a donation when they will take them :-D

I guess I was posting another request on the off chance that someone outside of the development team could help me... so sorry if it sound't like i was impatient with them in particular.

... anoyhow, I've got a website 95% finished (http://www.paulryding.com/index.php/) and now just need these two snippets of code to make it perfect - otherwise I wouldn't be so vocal. In the meantime I'll carry on trying to work all of this out myself.




How to show random picture? - Chilifrei64 - 05-04-2006

This person just finished making what you were looking for...

http://www.ruicruz.com/zenshow/




How to show random picture? - 3stripe - 06-04-2006

:-D :-D :-D




How to show random picture? - hellfish - 15-04-2006

thank you the publicity

I have some more plans to develop the plugin even further but time is very scarce over here.




How to show random picture? - pedant - 18-05-2006

hi all

i want to add this feature, i have a main page that i want to add this to, can someone post simply how to do it and what info i need to change to get it to work? I am new to this php stuff so im struggling a little!




How to show random picture? - climberusa - 07-06-2006

Has anyone managed to get this working properly yet? I've tried the above code but get mysql errors. I wonder if it's because I've upgraded to the latest release. Anyone????




How to show random picture? - thinkdreams - 07-06-2006

Climberusa-

I have managed to cobble together a bit of what you were looking for from this site. An example is at http://www.thinkdreams.com/zenphoto. The random image plugin (Zenshow) is working on my front page (running Wordpress 2.0.3 and zenphoto 1.0.3) at http://www.thinkdreams.com. I modified the stopdesign theme to my own color scheme, and added a functions.php with the random functionality. I also managed to get some exif functionality as well, outside of zenphoto, so if you upgrade, you won't lose any of the functions. I won't be releasing a theme on what I've done, since I just modified what others have already done. But I'd be glad to show anyone that asks what I did to get it to work. All information was either found on these forums, or done through copious amounts of research online. I love the zenphoto application, and I've already created 3 other converts to zenphoto including a photographer, a real estate agent, and possibly a baby boutique.

Craig.




How to show random picture? - Daxeno - 08-06-2006

ThinkDreams,

How did you integrate that function in the stopdesign theme? Do you mind sharing it with us?

Daxeno




How to show random picture? - thinkdreams - 08-06-2006

daxeno-

here is my custom functions.php file.




How to show random picture? - thinkdreams - 08-06-2006

Then all you need is this snippet from the module section in the stopdesign theme (replaces right module section)

        Random Image



How to show random picture? - thinkdreams - 08-06-2006

Don't forget to use a require at the top to call the function.

That way, any upgrades to zenphoto won't wipe out your custom work, and you're not modifying any of the core code.

Craig.




How to show random picture? - Daxeno - 08-06-2006

Thank You Very Much ThinkDreams... but there seems to be a problem with the database/MySQL. it says : MySQL Query ( SELECT images.filename, images.title, albums.folder FROM images INNER JOIN albums ON images.albumid = albums.id ORDER BY RAND() LIMIT 1 ) Failed. Error: Table 'daxeno.images' doesn't exist




How to show random picture? - thinkdreams - 08-06-2006

daxeno-

It could be that my query is not structured for the way your db is set up. Are you using a prefix (ie zen_ ) ?




How to show random picture? - Daxeno - 08-06-2006

yes. im using the prefix zen.




How to show random picture? - thinkdreams - 08-06-2006

Daxeno-

You might try looking in earlier posts in this thread. I'm by no means an expert, so it may be that script is failing since I set mine up with a separate MySql instance without the zen prefix. Anybody on this thread care to illuminate a bit better that I? I'll see what else I can find out online as well.

Thinkdreams.




How to show random picture? - thinkdreams - 08-06-2006

Daxeno-

Try:

  1. There is a function in functions-db.php that looks like this:

function prefix($tablename) {
return zp_conf('mysql_prefix').$tablename;
}

  1. Using a similar syntax: prefix("tablename") put that in place of images in the query. You can get a good idea of what a query might look like by looking in classes.php.

Does that make sense?

Thinkdreams.




How to show random picture? - Daxeno - 09-06-2006

TYVM again ThinkDreams. all i did is reset the DB and removed those prefixes and it works.

Daxeno




How to show random picture? - Daxeno - 09-06-2006

The only problem i encountered now is that i cant click on the image to view the whole photo.