I'm using a smarty built sidebar that is created using the themes template.tpl file. What do I need to add to have the Admin Control Panel link only visible to admins? A bit like it is if you are using the normal method of having the sidebar. I have tried figuring it out but I can't XD All I have so far is this:
PHP Code:
<a href="{$home}admincp">Admin Control Panel</a>
And this is my whole file if anyone wants to see the way it is laid out:
PHP Code:
{include file="{$root}{$temp}{$theme}/header.tpl"}
<body>
<div id="wrapper">
<table cellspacing="3px" cellpadding="0px">
<tr><td colspan="2" id="image"><span><center><a href="{$path}index">{$site_name}</a></center></span></td></tr>
<tr><th colspan="2">{$menu}</th></tr>
<tr><td id="menu">
<b><p><u>{$smarty.now|date_format},
{$smarty.now|date_format:"%I:%M %p"}</u></p></b>
{if $logged_in}
<br><br><br><br><br><p><b>You are logged in as:</b></p>
<a href="{$home}profile/view/{$username}"><font size="4"><b>{$username}</b></font></a>
<p>{$avatar}</p>
<p>You have <i>{$cash} {$mysidia->settings->cost}</i>Credits!</p>
<a href="{$home}messages">{$messages} Messages</a>
<a href="{$home}login/logout">Log Out</a>
<a href="{$home}admincp">Admin Control Panel</a>{/if}
<br><br>
<br>{$sidebar}
<a href="{$home}online">{$online}</a><br><br>
</td><td id="content">
<h1>{$document_title}</h1>
<p>{$document_content}</p>
</td></tr>
<tr><td colspan="2" id="footer">{$footer}</td></tr>
</table>
</div>
</body>
</html>
Thank you!