Page 1 of 1

event hooks

Posted: Wed Jul 26, 2006 12:20 pm
by AzRAeL
Hi, far far away from my previous "include serendipity in my page" problems i decided to turn 180 degrees and do it "the clean way".
So, i'm currently developing 3 plugins
  • easygallery (lists images of configurable folders, shows them in sidebar using various javascript eyecandy ;-) )
  • sidebarItemCollapse (the javascript solution for folding/unfolding sidbarItems (saw this requested here a while ago - now needed it for my page))
  • ajaxChat (small ajax-powered chat application which also can be connected to an IRC-Bot a friend currently codes, and so could be used as a web2irc gateway)
now my question:

i currently use the "frontend_display" event hook to unclude various javascript files. This also works, but because the scriptblock isn't generated in the HEAD of the resulting page - there is a short delay (which does NOT appear when the scripts are included in the head of the file). Is there any other / better / secret ( :) ) eventhook that could help me out here?

I first did this all in a new template i built, but i thought it would be cleaner to make plugins out of it - so also other people could make use of it ;)

tia

Bernd 'Azzy' Lackinger

Re: event hooks

Posted: Wed Jul 26, 2006 12:24 pm
by garvinhicking
Hi!

Uhm, you might want to look at existing plugins before re-inventing the wheel :)

Like serendipity_event_usergallery / mediagallery, serendipity_event_sidebarhider and serendipity_plugin_smiletag ? [all from spartacus.s9y.org]

Maybe it's better to extend those plugins to do what you want? :)

About the event hook, I suggest you to use the "frontend_header" event plugin. Have a look at the event hook listing here: http://www.s9y.org/116.html

Keep us posted about your progress or questions! Enhanced plugins would be awesome!

Best regards,
Garvin

thx

Posted: Wed Jul 26, 2006 12:31 pm
by AzRAeL
i'll try to do my best, but i didnt want do use some kind of gallery-software. i prefer uploading images whit serendipity or ftp and i also like coding myself (everyday something to learn) - maybe ill try to extend some of the plugins - but basically i try to keep it all as simple as possible ;-)

...i'll try the frontend_header now

thx for the FAAAAAAAST answer

Re: thx

Posted: Wed Jul 26, 2006 12:32 pm
by garvinhicking
Hi!

Yes! The usergallery plugin uses the builtin s9y media database!!! No external galleries are required, I agree that this should not be a goal. :)

Best regards,
Garvin

Posted: Wed Jul 26, 2006 7:51 pm
by mgroeninger
I'll also point out that the "Unified Sidebar Image Display" plugin (or serendipity_plugin_imagesidebar plugin) contains a sidebar plugin to display images from the media library, which might be more what you are looking for.