Page 1 of 1

I'm creating a plugin and need some help

Posted: Tue Mar 17, 2009 4:13 am
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

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

Posted: Tue Mar 17, 2009 11:13 am
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