Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-05-08 22:32:52
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Pluggable admin footer
Is there a pluggable_ui for the footer?
I’m using the inject method to add some links just above the popup/Carver image/Textpattern version/Logout bit at the bottom the standard admin page but it would be nice to be able to “pluggable_ui” it instead.
Offline
Re: Pluggable admin footer
Not in those themes which are part of the current development version. In general, due to their theme dependency it’s advisable to package such changes into an admin theme, like so:
// put this into [...]/textpattern/theme/my/my.php
if (!defined('txpinterface')) die('txpinterface is undefined.');
theme::based_on('classic');
class my_theme extends classic_theme
{
// change ad lib.
function footer()
{
return graf(href('foo', '#')).parent::footer();
}
// use classic styling
function html_head()
{
return '<link href="./theme/classic/textpattern.css" rel="stylesheet" type="text/css" />'.n;
}
}
Offline
#3 2009-05-11 12:40:06
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Pluggable admin footer
wet wrote:
In general, due to their theme dependency it’s advisable to package such changes into an admin theme
Thanks for the reply. I don’t want the plugin to be theme dependent so I guess the next question is: Is there an alternative option of adding markup to admin pages that’ll work on all themes?
I picked the <div id="end_page">
because it’s on every page … but maybe that’s only the case with the Classic theme (& Remora)?
Offline
#4 2009-05-20 05:36:54
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Pluggable admin footer
I guess I’ll stick with the inject method – combining functionality with themes doesn’t sound the right way to go.
Offline
Re: Pluggable admin footer
gomedia wrote:
Thanks for the reply. I don’t want the plugin to be theme dependent so I guess the next question is: Is there an alternative option of adding markup to admin pages that’ll work on all themes?
- All those callback_events.
- JavaScript inserts.
- Old-school injections.
- theme class.
I picked the
<div id="end_page">
because it’s on every page … but maybe that’s only the case with the Classic theme (& Remora)?
It’s part of the theme output, so yes.
I guess I’ll stick with the inject method – combining functionality with themes doesn’t sound the right way to go.
I’m staying with em too.
Offline
#6 2009-05-20 08:57:26
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Pluggable admin footer
I wrote:
… but maybe that’s only the case with the Classic theme (& Remora)?
and A_bit_blue too.
Gocom wrote:
Old-school injections.
Something to scare children with?
Anyway, pluggable header would be great too!
Offline
#7 2009-05-20 12:10:28
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Pluggable admin footer
gomedia:
Can you give a little guidance about how you are adding that capability to the header/footer. I think it is something that could be useful to a project I am working on.
Thanks.
progre55
Offline
#8 2009-05-21 12:22:26
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Pluggable admin footer
progre55 wrote:
Can you give a little guidance about how you are adding that capability to the header/footer. I think it is something that could be useful to a project I am working on.
That comment about the header was wishful thinking – I’m currently adding markup into the footer in the latest adi_notes, and I’ve had a request to do the same under the page header but haven’t yet.
The best way to work out how to do it is to have a look at the source code. Contact me via email if you need any pointers.
Offline
Re: Pluggable admin footer
r3255 introduces theme-independent events for header and footer.
Offline
#10 2009-07-25 21:37:43
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Pluggable admin footer
wet wrote:
r3255 introduces theme-independent events for header and footer.
All good things come to those who wait.
Thanks Robert … and nice to see you in the flesh!
Offline