Event hooks in entries?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Thomas
Regular
Posts: 130
Joined: Tue Sep 21, 2004 2:00 pm
Location: Stockerau/NÖ/A
Contact:

Event hooks in entries?

Post by Thomas »

Hi,

is it possible to place an event hook also in an entry (for instance in the extended field? This might be a silly question but for some reason it is of interest for plugins.

To explain it more detailed:
I post an article and want to add a gallery (plugin still not written yet). I add a code like <serendipity event_hook something blablabla...> and with the given data a gallery is added.
Or is this just used in templates?

Regards, Thomas

P.S.: BTW, I still miss an overview of all existing hooks in 0.8.4 and a description, what they're used for. ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Event hooks in entries?

Post by garvinhicking »

You can't put event hooks into the entry, because this is PHP code, and it would need to get executed.

What you can do, is write wrapping plugins. Examples for that is the smartymarkup and includeentry plugins.
P.S.: BTW, I still miss an overview of all existing hooks in 0.8.4 and a description, what they're used for. ;)
Then please help us to document those! Gather all hooks and I'll tell you what they are for and insert them in those documents:

http://www.s9y.org/index.php?node=43
http://www.s9y.org/index.php?node=102
# 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/
Post Reply