Kommentare

Extended Properties for Entries: Custom Fields

Garvin am um :

I'm replying here in english, hope you don't mind.

Rembrandt asked, that it would be great if you could associate external plugins with the new CustomFields.

This is already possible! Your plugin can just hook into one of the events where entries are fetched ('entrydisplay' or 'frontenddisplay' or even 'frontend_entryproperties') and then just set your $eventData property index to what you want to be displayed later on.

However, this was already possible even before CustomFields got invented. You can add your very own plugin hooks easily into the entries.tpl template, like this:

{serendipityhookPlugin hook="customnow_playing" hookAll=true"}

Then just let your plugin to all the work. http://www.s9y.org/78.html describes this as well.

Regards, Garvin

Rembrandt am um :

Thx for your reply (reading English is much easier for me than writing it (correctly) ;)!

So I'll have a closer look to hooks and the "magical stuff" behind them.

so long... Rembrandt

MySchizoBuddy am um :

ok let me know if this is corect.

1) in the Extended properties for entries plugin page. i change customfield1 to "Now listening to;" 2) when i make a post i type in "NIrvana" 3) inside my entries.tpl file I place this "Now listening to: {$entry.properties.ep_Listening}"

and then {$entry.properties.ep_Listening} is replaced by NIrvana

Is this how it is supposed to work. the place where i enter the word NIrvana, does it take html or simple text.

Garvin am um :

No, this is wrong. The description of the field says "don't use spaces in the field name". So "NowListeningto" would work instead.

The input field takes any HTML code.