How To Add AdminCP Link To Sidebar
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:
PHP Code:
|
There's this block of code from class_sidebar.php:
Quote:
|
I suppose that's a step in the right direction XD I need to figure out what to input so it can be in the template.tpl file... that just displays as text (might as well try it, eh? XD) and I need the code to somehow say 'if user is admin/uid=1, show this text'... I'm a bit lost still though XD I've tried a few things, but no luck so far!
|
Mysidia only uses smarty templates for the basic layout, it generates html contents using GUI objects. Its possible to do what you want by assigning smarty template variables, such as $isAdmin, which is the boolean value of ($mysidia->user instanceof Admin). It may be a bit complex for you though.
|
I did it! :D I opened class_template and put this in:
PHP Code:
PHP Code:
|
All times are GMT -5. The time now is 07:47 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.