Is there a magic variable {{LOGGED-IN}} or a similar mechanism that could be used to detected from within the wiki markup, CSS or Extension:Widgets?
Background: Creating menus / content which is different for anonymous visitors and logged in users (mostly wiki administrators).
Cheers, Patrick
There is nothing AFAIK but it would mess with ParserCache so if someone needs to implement it, it means they have to fragment parser cache based on status of logged in or logged out which can be quite expensive in large places (like Wikipedia)
HTH
On Tue, Jan 11, 2022 at 5:42 PM Patrick Schleizer via MediaWiki-l < mediawiki-l@lists.wikimedia.org> wrote:
Is there a magic variable {{LOGGED-IN}} or a similar mechanism that could be used to detected from within the wiki markup, CSS or Extension:Widgets?
Background: Creating menus / content which is different for anonymous visitors and logged in users (mostly wiki administrators).
Cheers, Patrick _______________________________________________ MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
There are some extensions that implement similar things:
https://www.mediawiki.org/wiki/Extension:RightFunctions https://www.mediawiki.org/wiki/Extension:UserFunctions
I haven't used either of them, but it looks like they both can do this job.
Why not just do it in Javascript/CSS and use the MediaWiki:Group-<group>.js /CSS pages?
On Tue, Jan 11, 2022 at 12:09 PM Bartosz Dziewoński matma.rex@gmail.com wrote:
There are some extensions that implement similar things:
https://www.mediawiki.org/wiki/Extension:RightFunctions https://www.mediawiki.org/wiki/Extension:UserFunctions
I haven't used either of them, but it looks like they both can do this job.
-- Bartosz Dziewoński _______________________________________________ MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
mediawiki-l@lists.wikimedia.org