$GLOBALS['gallery']->getActiveUser() ,??

schlimmest

Joined: 2007-01-20
Posts: 15
Posted: Sat, 2007-01-20 18:59

Hi,
I'd like to show the sidebar.tpl _only_ when logged in as admin, not when a random person browsing the site..
I've tried to modify this in album.tpl

Quote:
{if (! $GLOBALS['gallery']->getActiveUser())}
<td id="gsSidebarCol">
{g->theme include="sidebar.tpl"}
</td>
{/if}

but it doesnt work...
Hopefully someone can help :)

Thanks,
schlimmest.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-01-20 19:54

{if $user.isAdmin}
....
{/if}

http://codex.gallery2.org/index.php/Gallery2:Tpl_Reference#User_Information
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!

 
schlimmest

Joined: 2007-01-20
Posts: 15
Posted: Sat, 2007-01-20 20:08

awsome,
thanks alot!