sidebar visible/not visible based on user login
internetgardener
Joined: 2004-09-10
Posts: 5 |
![]() |
Hi Everyone, Would it be possible to make sidebar.tpl 'user dependant'? For example: When you went to the top level gallery (or any sub gallery) the sidebar would not be present unless the user was logged in? Further to that, could you can make the options on the sidebar user dependant? What I would like is to have sidebar not 'on' unless the user was admin. Thoughts? CW |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
We're going to redo the layouts a little bit to downplay the value of the sidebar, and at that time we can surely make this possible. Might not happen until after B2 though. |
|
internetgardener
Joined: 2004-09-10
Posts: 5 |
![]() |
Thanks bharat. I am just trying to figure out a 'nice' way to hide the sidebar when it is not the admin who is logged in. Thought that it would make logical sense to be able to do a check on the user then decided to display or not display. Any other ideas? Regards, |
|
buss
Joined: 2005-09-26
Posts: 7 |
![]() |
Quote:
I am just trying to figure out a 'nice' way to hide the sidebar when it is not the admin who is logged in. Thought that it would make logical sense to be able to do a check on the user then decided to display or not display. I have the exact same issue. Has any progress been made on this since the last post? I hide the sidebar by just removing the following lines from album.tpl, modules.tpl, and photo.tpl: But I would still like to display the sidebar when admin is logged in, because as it stands now, the admin can't do a thing without the sidebar. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
The theme system was completely rewritten. There's no need to do any of that. If you search the forums there is a way to display the sidbar if logged in as admin. You just need to wrap it with a bit of code see this page at the bottom: http://codex.gallery2.org/index.php/Gallery2:Tpl_Reference#User_Information If you don't want to display it for anyone, then just remove all of the blocks in the sidebar from Something like: {if $user.isAdmin} {if !empty($theme.params.sidebarBlocks)} <td id="gsSidebarCol"> {g->theme include="sidebar.tpl"} </td> {/if} {/if} ____________________________________________ |
|
buss
Joined: 2005-09-26
Posts: 7 |
![]() |
Fantastic, thank you! If I had started this thread I would mark it resolved, but alas... :P |
|