Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Adding to existing admin pages via Plugin
Poking around some of the admin side plugins and I haven’t seen any examples of what I want to do.
As part of my pnh_mf plugin I’d like to add some tag generators w/ popups along the lines of the “Useful tags” items in the presentation admin panels. I’ve poked around the source a bit and I didn’t see any easy hooks into the page or article templates that build those admin side pages.
Does anyone have any ideas for a good / clean way to add a block of markup on those pages? Trying to keep this within the plugin context if I can.
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
Re: Adding to existing admin pages via Plugin
I’m in the same boat as you for developing a plugin. There are two options you can completely re-write the presentation page, but that takes more effort and is probably too much for your plugin. The other option I’ve been told is that you can edit the dom on the fly. Do a search for “edit dom javascript” and you’ll find some examples that might help you out. Not the easiest way…but it works.
Offline
Re: Adding to existing admin pages via Plugin
thanks for the reply
I’m very hesitant to redo the entire page and then overload all of the functions needed for that to happen because then my plugin would have serious portability issues if any of the code I copied changed in the code install. That’s also the reason I’m avoiding writing an entirely new tab with a different editing interface.
As for changing the page on the fly with DOM insertions – from a technical standpoint i’ve got NO problem doing that at all, as long as I can get my foot in the door so to speak and get code into the tempate to trigger the scripts and calls needed to do it.
Anyone have an idea for the best place to tie into the admin templates so that a script would run on the admin pages? Either in the specific templates or a more global spot?
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
Re: Adding to existing admin pages via Plugin
ahh… after poking around some more admin side plugins i see the light that is register_callback
and all is right in the world again.
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline