Page MenuHomePhabricator

Support rel=me on non-user pages
Closed, ResolvedPublicFeature

Description

One use case I'd like to see supported is for organisational profiles to be able to have rel="me" as well. For example, a Contact page on a wiki should be able to link with [https://social.example.org/@account @account@social.example.org] and have it get the rel attribute. I guess these site-wide URLs would be defined in LocalSettings.php.

Event Timeline

So this is kind of what I tried in https://www.mediawiki.org/wiki/Extension:RelMicroformat, except I only implemented it for the sidebar.

That said, do you really want the link to have rel=me sitewide? Would you be fine with just specific pages?

$wgRealMeLinks = [
    'https://social.example.org/@account' => [ 'Contact', 'Main_Page' ],
];

When you mentioned this initially, I was thinking of stuff like https://wikis.world/@wikisignpost linking to https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost - but you wouldn't want that to have rel=me on every page that links to the Signpost.

You're quite right. It shouldn't be necessary to have rel=me on every link, and certainly it wouldn't be good to mix it with links on user pages. I like your suggestion of a map for the config.

Regarding the sidebar links, it'd presumably be problematic if they are given rel=me when viewing user pages which also have their own rel=me links.

taavi renamed this task from Support site-wide rel=me on certain links to Support rel=me on non-user pages.Mar 19 2023, 6:38 PM

Change 924768 had a related patch set uploaded (by Legoktm; author: Legoktm):

[mediawiki/extensions/RealMe@master] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/924768

I spent a while going back and forth on whether this should be a sysadmin-level config setting or just a on-wiki admin wiki page. I settled on the latter because 1) expecting sysadmins to manually approve/check each account to verify patches doesn't scale and seems like a giant waste of time and 2) in the theoretical case of a rogue admin trying to hijack or misrepresent something...they could just hijack the wiki page itself. Possibly this is a bit more subtle way of doing so, but that seems to be at the appropriate level of things we trust admins with.

Other things I noted in the commit message:

  • URLs are validated pre-save using the same validity and protocol checks as Special:Preferences
  • This does not require the link be used on the wiki page
  • It cannot be used on User/User talk pages

The on-wiki config sounds like a good idea. I'm guessing a common config would be something like:

{
    "Main Page": [
        "https://example.com/foobar",
        "https://example.org/baz"
    ]
}

Change 924768 merged by jenkins-bot:

[mediawiki/extensions/RealMe@master] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/924768

Legoktm added a project: User-notice.
Legoktm added a subscriber: taavi.

Thanks @taavi and @Samwilson for reviewing! Started documentation at https://www.mediawiki.org/wiki/Help:Extension:RealMe#Verifying_a_link_on_non-user_pages - please improve :)

Thanks!

Unfortunately, I forgot to test on 1.39, and it's no longer compatible:

TypeError: Argument 1 passed to MediaWiki\Extension\RealMe\Hooks::getLinksFromConfig() must be an instance of MediaWiki\Title\Title, instance of Title given, called in /var/www/mediawiki/extensions/RealMe/src/Hooks.php on line 223

Change 926553 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/RealMe@master] extension.json: Bump required MW version

https://gerrit.wikimedia.org/r/926553

Change 926804 had a related patch set uploaded (by Reedy; author: Legoktm):

[mediawiki/extensions/RealMe@REL1_40] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/926804

Change 926804 merged by jenkins-bot:

[mediawiki/extensions/RealMe@REL1_40] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/926804

Change 926856 had a related patch set uploaded (by Reedy; author: Legoktm):

[mediawiki/extensions/RealMe@REL1_39] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/926856

Change 926856 merged by jenkins-bot:

[mediawiki/extensions/RealMe@REL1_39] Support non-user pages through MediaWiki:realme-config.json

https://gerrit.wikimedia.org/r/926856

Tests unbroken on REL1_39, features in master backported to REL1_39 and REL1_40.

As per https://www.mediawiki.org/wiki/Extension:RealMe, the relevant branch should be used with the corresponding MW core branch

Snapshots releases along with MediaWiki. Master is not backward compatible.

The requires in extension.json still needs bumping (patch above), as the tests in master won't pass on the apparent supported version...

Change 926553 merged by jenkins-bot:

[mediawiki/extensions/RealMe@master] extension.json: Bump required MW version

https://gerrit.wikimedia.org/r/926553

Added to the next Tech News as

The RealMe extension now allows administrators to verify URLs for any page, for Mastodon and similar software. [3]

Please edit directly if tweaks are needed, within the next ~22 hours. Thanks!

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy