Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2212

Extension Requests • Re: MCP link on all pages

$
0
0
That code will display the MCP link to guests, which is not optimal. I don't know if it also displays it to bots.

You may need an extra condition. Something like:

Code:

<!-- IF S_REGISTERED_USER and U_MODCP -->
But even bots can be registered users, so maybe...

Code:

<!-- IF S_REGISTERED_USER and not S_IS_BOT and U_MODCP -->

ETA: I messed around with it a bit. This seems to work. It's not visible to guests or normal registered members, but stays visible on every page when I am using my admin account. It doesn't seem to need U_MODCP. It works with U_MCP as far as I can tell.

The link is still visible when I'm inside MCP. I haven't tried it on extension pages, but it stops the default behaviour of losing the link inside MCP (which I always thought was very silly).

Code:

<!-- IF not S_IS_BOT --><!-- IF S_REGISTERED_USER and U_MCP --><li><a href="{U_MCP}" title="{L_MCP}" role="menuitem"><i class="icon fa-gavel fa-fw" aria-hidden="true"></i><span>{L_MCP_SHORT}</span></a></li><!-- ENDIF --><!-- ENDIF -->
And yes I know its not in Twig syntax, but hey - pay peanuts, get monkeys. :P
Tks, bro.
Amazing!

Statistics: Posted by henrique.seven2011 — Wed Mar 05, 2025 11:16 pm



Viewing all articles
Browse latest Browse all 2212

Trending Articles