Moving the Admin & Mod Buttons To The Footer

Started by HerzeleidMeister, September 30, 2019, 01:19:20 AM

Previous topic - Next topic

HerzeleidMeister

Hello. I would like to move my admin & mod buttons to my footer out of the top menu. I have already edited the ./Sources/Subs.php file to make some changes to the some of the other tabs. What I need is to just put links to the admin area & the mod area as straight hyperlinks no buttons involved and have them only seen by admins or mods.

So basically I would want to footer to look like:

Admin | Mod (but as links)

I know what the URL'S will be for the links, I just do not know how to make these links seen only by the admins and/or mods. I do know that it involves this code:

'show' => $context['allow_admin'],

But I'm not sure how to add it without returning an error. Thanks.

Antechinus

if($context['user']['is_admin'])

echo ' <a href etc...

if ($context['can_moderate_forum'])

echo ' <a href etc...

HerzeleidMeister

That is not working. It only shows the Admin link and not the mod link. I also want them on the same line. Here is what I put.


if($context['user']['is_admin'])
echo ' <a href="http://myforum.com/admin/">Admin</a>';

if ($context['can_moderate_forum'])
echo ' <a href="http://myforum.com/moderate/">Mod</a>';

Antechinus

I thought you only wanted the conditionals. I assumed you knew how to write any markup and CSS yourself. If you want them on one line and they're just basic anchors they should automatically be inline. The only reason they might not be is if you set them to display: block;

Anyway, if that one doesn't work for the mod centre try:

if($context['allow_moderation_center'])
echo ' etc...

HerzeleidMeister


Advertisement: