Page MenuHomePhabricator

A function {{#ifloggedin:1|2}}
Closed, DeclinedPublic

Description

There's only one way to allow anons and users to see different content -- create two pages in MediaWiki namespace (e.g. sitenotice and anonnotice, noarticletext and noarticletextanon). This method prevents from inventing personae-oriented content and limits the ways of creating/developing it (1. a so-called Message has to be defined at a 2. quite high level that isn't likely to be watched by ordinary users who develop such content).

Examples of use:

  • related to T112724 -- let's allow anons to see a more newbie-oriented version of "my talkpage" message like: 'It's a place where anybody can write a message to an anon user {{BASEPAGENAME}}. Registered users are provided with additional useful tools like Notifications, [...]'. Oh, wait, while creating this, I found out there's noarticletextanon. Who and when created this and why I know nothing about the thing?
  • help, welcome etc. pages -- users don't have to be encouraged to create an account. Anons don't have to be bothered with some kind of tips or instructions, and can be informed at the top of some pages: 'these tips are helpful only for registered users. If you want to make use of it, create an account first'. Users don't have to see this in the reading mode.

Event Timeline

tarlocesilion raised the priority of this task from to Needs Triage.
tarlocesilion updated the task description. (Show Details)
tarlocesilion added subscribers: tarlocesilion, matmarex.
Jackmcbarn claimed this task.
Jackmcbarn subscribed.

No, for all the same reasons as T6196.

@Jackmcbarn That doesn't convince me. We only have two versions to split
the cache into here, not infinitely many.

There's only one way to allow anons and users to see different content -- create two pages in MediaWiki namespace (e.g. sitenotice and anonnotice, noarticletext and noarticletextanon).

In MediaWiki:Common.css add .hideforloggedout { display: none } and MediaWiki:Group-user.css add .hideforloggedout { display: inline } or whatever. Then just wrap whatever you want to show/hide in a div tag with the right class.

I'm not a fan of splitting the parser cache further unless there is a really good reason to. This doesn't seem like all that compelling of a reason to.