Plugin replacement that extends regular postings

Creating and modifying plugins.
Post Reply
Guest

Plugin replacement that extends regular postings

Post by Guest »

I'm trying to figure out how to extend the funcionality of the basic core entries system. Take the simple example of a book review page:

- Need to add a few entry fields like title of book, cover image, author, ISBN, price and more info link.

Once this data is filled in, you'd want to display it in a certain HTML format, and the review would be the same as the blog entries.

This would need to be turned on and off somehow so as to reside peacefully with regular blog style entries.

Is this too ambitious, or does it seem possible? Would it actually be a plugin or must it be a core modification?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Plugin replacement that extends regular postings

Post by garvinhicking »

Yes, this is possible via plugin creation.

Plugins like the event_multilingual or event_entryproperties or event_custompermalinks already so something like this.

The basic idea is that you just store your additional fields in the table "serendipity_entryproperties". You can add as many key/value pairs to an entry you like.

Then inside your Template you can output the specific fields by using {$entry.properties.YourKeyName} (don't know the actual syntax, but you can look it up easily). Then you can show those fields with any Smarty markup you want.

No core modifications will be needed! :)

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