Jump to content

Admin Header Manual Frozen\Fixed


zitu4life

Recommended Posts

Hi all

Is there possible to frozen\fixed the admin header to keep it fixed when we scroll down admin page? can be done with some hook? @brian!

Also, is there possible to have a way to show there currently Staff name on this header. So if accidentally new staff uses same PC, will know if it is not their login and logged out.

image.thumb.png.ae91ee7ef1c4cc3b316b8adcbeca8df5.png

or fixed\frozen entire

image.png.4b4870536d903e4b7f2f03acbb970021.png

regards

Edited by zitu4life
Link to comment
Share on other sites

47 minutes ago, zitu4life said:

Is there possible to frozen\fixed the admin header to keep it fixed when we scroll down admin page? can be done with some hook? @brian!

you mean a Sticky Header?

that usually requires both css & js changes... I think to do it justice, and especially if you wanted to move the entire header block, you'd have to slightly tweak the divs in header.tpl and put everything into a div that you could then manipulate with css.

a quick fix to make the menu tabs only sticky could be done purely with a css hook - although if the admin area had it's own custom.css, this hook wouldn't be necessary...

<?php

# Quick Admin Sticky Header Hook
# Written by brian!

function admin_sticky_menu_hook($vars) {

	return '<style>#menu {position: fixed; z-index:1000; width=100%;}</style>';
}
add_hook("AdminAreaFooterOutput",1,"admin_sticky_menu_hook");

this should work on both Blend or v4... not pretty, but it gets the job done without editing the templates. 🙂

JVRL7pB.png

1 hour ago, zitu4life said:

Also, is there possible to have a way to show there currently Staff name on this header. So if accidentally new staff uses same PC, will know if it is not their login and logged out.

the easiest way would be to just edit header.tpl and add {$adminFullName} wherever you wanted to show the logged in admin's name...

ng5mXX6.png

if you used an admin headoutput hook, it will mess with the layout...

YhzVxoo.png

and using jQuery to add the text to an existing element would likely be possible, but looks like overkill to me - it'd be easier to edit the template! 🙂

Link to comment
Share on other sites

1 hour ago, brian! said:

the easiest way would be to just edit header.tpl and add {$adminFullName} wherever you wanted to show the logged in admin's name...

ng5mXX6.png

Hi @brian!

Was exactly what looking for, and editing tpl files are fine for me and also i can do it myself. I have used  {$adminFullName} . will now see a way to change it collor Brian!| Tuesday, 23 July 2019, 16:22

 

3 hours ago, zitu4life said:

image.thumb.png.ae91ee7ef1c4cc3b316b8adcbeca8df5.png

By the way only fixing top header is enough.

regards

Link to comment
Share on other sites

4 hours ago, zitu4life said:

By the way only fixing top header is enough.

then you could use...

return '<style>.topbar {position: fixed; z-index:1000; width: 100%;}</style>';

though I think it would cause an issue with the stats... but if you're going to edit the template, you could move the stats onto the header and do the css inline.

4 hours ago, zitu4life said:

will now see a way to change it collor Brian!| Tuesday, 23 July 2019, 16:22

the left hand side are all links, so that would be one quick way.... or just add more css styling to them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated