Page MenuHomePhabricator

Anonymous users' signatures should link to contribs page
Closed, ResolvedPublic

Description

Author: matthew.britton

Description:
Anonymous users almost never have userpages, especially on those wikis where they are not allowed to create non-talk pages. Since an anonymous user is just an IP address, the concept of an "anonymous user page" is rather a strange one.

Anyway, right now when an anonymous user signs a comment, the resulting link points to their user page; this almost never exists and thus shows a not-very-useful red link to where their userpage would be.

The user's talk page, on the other hand, is far more likely to exist, and their contributions list is, if they have signed an edit, guaranteed to contain at least one item.

Linking anonymous users' signatures to either of these things would be much more useful than the current arrangement. It would also somewhat parallel the situation with page histories, where anonymous users have a contributions link in the place a registered user has a user page link.


Version: unspecified
Severity: enhancement

Details

Reference
bz11315

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:57 PM
bzimport set Reference to bz11315.
bzimport added a subscriber: Unknown Object (MLST).

matthew.britton wrote:

After some thought, the contribs page rather than the talk page is the most logical and least confusing place to link it to (to be consistent with page histories). Though perhaps a separate talk link could be added as well, like many registered users do with their signatures.

Anyway, the important thing is that anything other than the current situation is vastly preferable...

matthew.britton wrote:

patch

attachment parser.patch ignored as obsolete

matthew.britton wrote:

patch

oops, ignore that previous one

attachment parser.patch ignored as obsolete

robchur wrote:

SpecialPage::getTitleFor() returns a Title object, not a string.

matthew.britton wrote:

It does? See, that's how little MediaWiki I know. :/

I'll go find how to turn that into a string, then... or you could always just fix it. :)

matthew.britton wrote:

patch

This one might work. though I'm not making any guarantees in that respect.

Remind me never to try to fix things myself again. Or at least to learn PHP first (it's a bit like JavaScript only with $s, right?)

attachment parser.patch ignored as obsolete

cbm.wikipedia wrote:

*** Bug 11913 has been marked as a duplicate of this bug. ***

cbm.wikipedia wrote:

Updated patch, includes signature pattern in mediawiki namespace and different behavior for anon and registered users

Here is an updated patch that includes the patch from 11913. It is tested and works on my mediawiki install.

Both MediaWiki:signature and MediaWiki:signature-ip need to default to "[[$1|$2]] ([[$3|$4]])" to make this work; I'm not too familiar with the language files.

Attached:

(In reply to comment #8)

Both MediaWiki:signature and MediaWiki:signature-ip need to default to
"[[$1|$2]] ([[$3|$4]])" to make this work; I'm not too familiar with the
language files.

To clarify:
$1 is the name of your userpage ("User:Catrope")
$2 is your username ("Catrope")
$3 is the name of your talk page ("User talk:Catrope")
$4 is MediaWiki:Talk ("Talk", "Overleg", "Diskussion", whatever)

Effectively, this means the default sig format will change from <Catrope> to <Catrope> (<Talk>). Since this is not a big deal, I'm gonna commit it anyway (I will have to copypaste the same line to 100+ language files. Ah well...)

Fixed in r27473. I didn't have to change all 100+ language files, thank God for fallbacks.

cbm.wikipedia wrote:

Ironically, MediaWiki:Talk is 'Discussion' on English wikipedia. But the project can override this by editing the signature message. I just wanted to have something acceptable and internationalized as the default.

(In reply to comment #11)

Ironically, MediaWiki:Talk is 'Discussion' on English wikipedia.

It uses MediaWiki:Talkpagelinktext, which is 'Talk' on ENWP. My mistake.

Changed a bit in r27512 to simplify a bit and make the messages more flexible -- the link destination is no longer hardcoded.

Additionally I've taken out the (talk) links for the moment, but they can be trivially re-added in the message.