I'm totally new to php, but ages ago back when TC2.0 and Pascal where the new hot thing, I actually coded as my job - just moved on to other mainly security & management related functions, for which basic bash/cli scripting sufficed
Now I'm preparing to start writing a few silly simple plugins just for fun, since I really like ZenPhoto and I want to really learn the innards and perhaps at some point come out with something cool.. or actually useable lol.
So, first practice.. I was thinking of writing a plugin which displays a 2nd image right beneath or next to the actual image that was requested. Of course based on the assumption that i have f.e. an array of known pages, and know which to trigger on and display what (also on site) image next to it or under it.. more like a book idea.. if page 2 is clicked, I want page 3 next to it, but instead of text.. we deal with images.
Shouldn't be too hard right ?
Well.. didnt sound too hard to me, up til the moment i started reading all the guides, function table, reading thru all the filters.. and now my head is spinning
I think I'm on the right track with filters.. but there's so many !
And the all sound legit, but the man page is just not clear enough to me if thats the one I want.
Who can point me in the correct direction ? Or hell.. if there's a simple example which already does this, to learn from : please share.
Thanks !
We can't guide you step by step. But if you want the next and/or previous image as thumbs functions for that already exist:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetNextImageThumb
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetPrevImageThumb
The Garland theme uses these for example.
You find an overview about all available functions, classes and methods here:
http://www.zenphoto.org/documentation/elementindex.html
Some quick links:
http://www.zenphoto.org/news/functions-documentation
For more advanced coding there is the object model base but that is maybe something for later.
thank you for the pointers.. I'm getting there.. I decided on just trying functions, see what they do, and adept accordingly
trial and error is still a good way to learn
Did you already find the theming tutorial? If not you should start with that:
http://www.zenphoto.org/news/theming-tutorial
yes.. but in there it's easy.. just editing image.php : i'm not looking to become a themer : i lack design skills, next to being colourblind
You are (of course) right.. walking along the code, I learned a great many of things already. I'm actually getting it, and already wrote some test plugins, that actually did what I intended :-)
Any third party plugin is welcome. We have a quick guide how to best provide them to the community. http://www.zenphoto.org/news/general-contributor-guidelines#providing-themes-and-plugins
the moment I come up with something that is actually useful and not merely a test, which makes absolutely no sense, I will of course