Pages (2): 1 2   
Member
Member
OldskoolOrion   08-11-2015, 11:12
#1

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 !

Administrator
Administrator
acrylian   08-11-2015, 12:09
#2

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.

Member
Member
OldskoolOrion   08-11-2015, 21:39
#3

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

Administrator
Administrator
acrylian   08-11-2015, 23:20
#4

Did you already find the theming tutorial? If not you should start with that:
http://www.zenphoto.org/news/theming-tutorial

Member
Member
OldskoolOrion   09-11-2015, 05:13
#5

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

Administrator
Administrator
acrylian   09-11-2015, 11:08
#6

Any customization, design nor not, is theming. You have to add many plugins respectively their functions to a theme to be able to use them. So knowing what theme page does what is fundamental basics ;-)

Member
Member
OldskoolOrion   11-11-2015, 14:27
#7

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 :-)

Administrator
Administrator
fretzl   11-11-2015, 16:15
#8

Great! A new developer ;-)
Please share any plugins you come up with.

Administrator
Administrator
acrylian   11-11-2015, 16:53
#9

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

Member
Member
OldskoolOrion   11-11-2015, 19:45
#10

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

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