I'm creating a plugin and need some help

Creating and modifying plugins.
Post Reply
MrPotatoes
Regular
Posts: 5
Joined: Mon Mar 09, 2009 2:21 pm

I'm creating a plugin and need some help

Post by MrPotatoes »

I'm looking to manage the front page. There are some things that I need/want to know and the documentation is far from complete.

I have a link:
(...) serendipity_admin.php?serendipity[adminModule]=event_display&serendipity[adminAction]=frontpagemanager

It tells me that the [adminModule]=event_display
and that the serendipity [adminAction]=frontpagemanager

The second part I know because I put it there. I want to know what the significance of the adminModule is; Event Display. How do I know what to put in the admin module section, can I change it to something different, where can I find information on the adminModule? The forums aren't helping much and grepping isn't producing much that I would need.

Currently in my event_hooks funciton I have a case (in a switch) that is "backend_sidebar_entries_event_display_frontpagemanager". As far as I know it's a concat of the adminModule and the adminAction. How do I figure out thebackend_sidebar_entries part?

Thank you for your help
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: I'm creating a plugin and need some help

Post by garvinhicking »

Hi!

I'm afraid you start too early. I presume you are creating an event plugin?

"event_display" is the required adminModule to instruct the s9y backend to wrap the contents that a serendipity event plugin hooks into for.

Easy examples on how to do that is the serendipity_event_adminnotes plugin.

As for backend_sidebar hooks: Have a look at serendipity_admin.php and search for "backend_sidebar_" - each search result will show you a possible sidebar hook, this is where your event plugin can hook in and emit <li><a>...</a></li> links into the sidebar, and then use the hook backend_sidebar_entries_event_display_[ADMINACTION]. The prefix backend_sidebar_entries_event_display_ is fixed; it does not realte to the sidebar, only to point people off to the possible sidebar integration of their menu links.

HTH,
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