Mailing List Archive

magic variable {{LOGGED-IN}} or similar?
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/
Re: magic variable {{LOGGED-IN}} or similar? [ In reply to ]
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/
>


--
Amir (he/him)
Re: magic variable {{LOGGED-IN}} or similar? [ In reply to ]
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/
Re: magic variable {{LOGGED-IN}} or similar? [ In reply to ]
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/