Member
Member
vincent3569   24-03-2014, 12:07
#1

hi

the printAdminToolbox() function has been deprecated (since 1.4.5).
now, the AdminToolbox link is generated by zp_apply_filter('theme_body_close');

is there another way to add this AdminToolbox, and the link provided ?
for example, I wish to add it in the footer of my theme, or in the header.
maybe, use a specific icon with popover, to login, register and access to some tools, as the links provided by AdminToolbox)

Administrator
Administrator
acrylian   24-03-2014, 13:04
#2

Not without removing the filter. The idea behind this is that you don't need to care about the toolbox as it is not direclty part of the theme but the backend. The original plan was to have even standard CSS styles for it just like the tool bar on WordPress.

Member
Member
vincent3569   24-03-2014, 14:31
#3

what other things are doing by this filter zp_apply_filter('theme_body_close');?

If I supress it, how can I access to admintoolbox links ?

Administrator
Administrator
acrylian   24-03-2014, 14:41
#4

Plugins or theme functions can use it. There is no fixed usage for filters by definition. I don't remember off hand which official plugin does use them right now but for sure my preloadImage plugin does.

What is the problem with the tool box being fixed on the corner? No normal visitor sees it anyway.

Member
Member
vincent3569   24-03-2014, 17:30
#5

in my previous release of zpBoostrap, the link was included in the footer.
it is no longer possible with the next release of zenphoto, and I have to change my theme accordingly.

Administrator
Administrator
acrylian   24-03-2014, 19:31
#6

No, we thought it makes more sense to do it this way. One thing less you have to think of when doing a theme especially since it is not really theme functionality but admin. The admin toolbox was of course never just "a" link ;-)

Member
Member
vincent3569   25-03-2014, 14:56
#7

what other things are doing by this filter zp_apply_filter('theme_body_close');?
in other words, if the only thing is to a add the admintoolbox, can I insert this filter anywhere in my code (in my header for example)?

Administrator
Administrator
acrylian   25-03-2014, 16:02
#8

I think I already answered that. It may currently only the tool box but whatever we will do will rely on the filter being in the right place. You therefore should not place it anywhere else because also other plugins may rely on it. The name is for a reason, you know.

Of course it is your theme so you "can" place it anywhere or even remove it else but then you may have to deal with complains if things may not work as expected.

Sorry, Vincent, I really don't understand why this is so important, The toolbox is a admin helper and not part of the theme actually.

Member
Member
mrskhris   25-03-2014, 21:07
#9

Here is what I did in my (currently in process of development) theme:
Add the following to your css file:
`

admin, #admin_data {


display: none;

}
`
Now you have divs with id #admin and #admin_data in body of your page, but they're not visible. You can now do whatever you want with that div - provided you're not afraid to use javascript

Member
Member
sbillard   25-03-2014, 21:26
#10

Or, you can remove that filter:
zp_remove_filter('theme_body_close', 'adminToolbox');

On the admin overview page there is a list of filters. This will show you which are registered. (Be sure you are on the 1.4.6 release since prior to that some filters were not properly shown.)

Member
Member
vincent3569   25-03-2014, 23:00
#11

Quote:Sorry, Vincent, I really don't understand why this is so important, The toolbox is a admin helper and not part of the theme actually.
as the theme is responsive, with collapsing menu items, I want to manage this link

Administrator
Administrator
acrylian   26-03-2014, 12:32
#12

@vincent: Ok, I just wanted to know. But since the display of the tool box is CSS styled you can do that via mediaqueries. Usually it is fixed postioned but of course that does not work on all mobile devices.

@sbillard: Ah, I somehow always forget you can do that…

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.