CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#2329] Callbacks for admin pages

avatar
Created By: Henning Schaefer (hschaefer)
Date Submitted: 2008-06-10 06:34

Assigned To:
Resolution: Awaiting Response
State: Closed
Summary:
Callbacks for admin pages
Detailed Description:
The wordpress admin panel heavily uses so-called "callbacks" in the admin panel
which are comparable to the "events" in CMSMS, but are executed when an admin
page (or its contents) are rendered, not just on saving something.

Introducing something like that would give module authors great possibilities to
extend other modules' admin pages.

For example, for my Simple Tagging plugin, I need another input field on every
page where one can enter their tags. Currently, I'm doing this by adding another
{content} tag into the template. If there was an event to subscribe to when the
"pages" admin page is rendered, I could easily insert the necessary input box
into the admin page.

The implementation of this would be very simple, just enable the event callbacks
to return a value and insert this value into the admin page. I'm currently
thinking about two possibilities to implement this - the first, simpler version
would just call the event after the admin page is rendered and add it's return
values to the page, the second one would pass the whole page content to the
event handler, thus enabling other modules to partially override things in the
admin page, and output everything returned by the event handler.

Modules subscribing to such an event handler could easily fetch the contents
from the admin page by subscribing to one of its "PostEdit" events.

History

Updates

Updated: 2014-03-14 23:29
state: Open => Closed

Updated: 2011-03-04 15:06
resolution_id: => 10