ZenphotoCMS Forum
Developers: Help brainstorm plugin hooks - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Developers: Help brainstorm plugin hooks (/thread-908.html)

Pages: 1 2 3 4


Developers: Help brainstorm plugin hooks - trisweb - 22-11-2006

This is something I'm going to need to do eventually, and I thought I'd get your input. We need to brainstorm and think of all the plugin hooks you could ever want in Zenphoto!

For those of you who don't know, a plugin hook is a function that always runs when some specific action happens in zenphoto, for example, there might be a hook called p_on_submit_comment (or something) that runs every time a comment is submitted, allowing a plugin author to, oh, I don't know, say, filter for spam (Yay! wooo! hooray!) or p_on_load_image, allowing you to do cool things to your images during processing. The possibilities are endless :-)

Other ideas off the top of my head:

[list]
[]Page load (album page, image page, any page, etc)
[
]Image load (specific to thumbnails, all images, etc.)
[]Submit comment
[
]?
[/list]
I'm not being very thorough, so go ahead and give me obvious ones too. Ready.... go!




Developers: Help brainstorm plugin hooks - Chilifrei64 - 25-11-2006

I would say
On image upload for preprocessing images(landscape, portrait, added meta data...)
On image process for manipulating the output of the image processor

That is all I can come up with right now...




Developers: Help brainstorm plugin hooks - DarrellD - 30-11-2006

How about:
On Thumbnail Generation (for some kind of run-time photo manipulation)
On Picture Generation (for embedding watermarks or so)

I guess these are similar to Chilifrei64's second suggestion.




Developers: Help brainstorm plugin hooks - trisweb - 30-11-2006

And my second bullet as well ;-) Believe me, I know image manipulation plugins will perhaps be like a "killer app."

Try to think of more general-use hooks that you might need.

It's probably easy to add new ones once everything's all set up though, I just want to provide the best set possible when it's launched.




Developers: Help brainstorm plugin hooks - DarrellD - 01-12-2006

On_LogIn
On_LogOut
On_Sort




Developers: Help brainstorm plugin hooks - trisweb - 01-12-2006

My own brainstorming... more as they come to me.

  • On Garbage Collection
  • On upload
  • On detection (album/image)
  • On download full-sized image?
  • On update (fieldname)
  • On delete (object)
  • On theme change
  • On plugin activation/deactivation



Developers: Help brainstorm plugin hooks - ashgrove - 01-12-2006

I [b]really, really[/b] like the suggestion to embed watermarks on picture generation. It would save so much time now spent preparing images for upload.

Once the hooks are defined, I just might consider developing the plugin. I know a couple of PHP libraries exist for EXIF manipulation. Pear has some for various image manipulations. I'll look thru them and see what I can find.

Lee Eschen




Developers: Help brainstorm plugin hooks - thinkdreams - 01-12-2006

Lee-

I already have a non-plugin version of the watermarking functionality working. This will at least tide you over until Tristan gets the plugin hooks done. Let me know and I'll be glad to show you how I did it.

You can see it in action either at:

http://www.photosbydaisy.com/zenphoto/The+Bush+Family/3a.jpg (that's me and my family BTW)
or
http://www.thinkdreams.com/zenphoto/karson/IMG_4000.JPG

Both of which should display the watermark in the lower right corner. The image is just a transparent 24-bit .png file you can make yourself with photoshop, and it just takes a few tweaks to the i.php and zp-config.php to make it work.

(This might give you a jump to your plugin as well once the hooks are in place).




Developers: Help brainstorm plugin hooks - thinkdreams - 12-12-2006

As I posted in another spot, DB hooks. Specifically toward custom fields in the DB, similar to the way Wordpress handles them so plugin authors can create custom fields via their plugins upon activation of the plugin. I'm not sure how deactivation would work (can it remove fields - thus losing data?) but it's a thought anyway.




Developers: Help brainstorm plugin hooks - misterbrandt - 20-12-2006

I would love some programmatic access to be able to limit users' access to each admin tab. So perhaps a hook after requesting (but before returning) each of those pages? and a hook before writing the HTML for the admin menu?

This would make it much easier to have a super-admin that has full editing and moderation of albums and comments, and then regular access so that users can add/edit their own albums, but not others' albums or any comments. (and then integrate the whole thing with Wordpress' roles/capabilities system)