Pages (4): 1 2 3 4   
Developer
Developer
trisweb   22-11-2006, 18:17
#1

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!

Member
Member
Chilifrei64   25-11-2006, 16:20
#2

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...

Member
Member
DarrellD   30-11-2006, 11:19
#3

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.

Developer
Developer
trisweb   30-11-2006, 23:51
#4

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.

Member
Member
DarrellD   01-12-2006, 01:43
#5

On_LogIn
On_LogOut
On_Sort

Developer
Developer
trisweb   01-12-2006, 02:04
#6

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
Member
Member
ashgrove   01-12-2006, 04:39
#7

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

Member
Member
thinkdreams   01-12-2006, 04:46
#8

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

Member
Member
thinkdreams   12-12-2006, 21:12
#9

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.

Member
Member
misterbrandt   20-12-2006, 02:35
#10

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)

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