event hooks

Creating and modifying plugins.
Post Reply
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

event hooks

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: event hooks

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

thx

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: thx

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

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