Topic on Project:Support desk

Add "statistic" to Special:CreateAccount

8
Summary by MacFan4000

Not currently without removing one that is defined in the mediawiki messages linked below.

Reception123 (talkcontribs)

Currently when seeing Special:CreateAccount you see the number of edits, pages and "recent contributors". I would like to you some hook (or anything) to add one more statistic (<nowiki>{{NUMBEROFWIKIS}}</nowiki>) to add to that page. Could someone please tell me how that would be possible?

Shirayuki (talkcontribs)
Reception123 (talkcontribs)

@Shirayuki I know about those, but I would need a -benefit-head4 and body4 so I can add a completely new statistic.

Reception123 (talkcontribs)

Bump

TheDJ (talkcontribs)

You can only do this by modifying the source code (be careful with updates etc, which will likely override these).

The page in question is includes/specialpage/LoginSignupSpecialPage.php function getPageHtml().

Reception123 (talkcontribs)

We generally prefer not to edit source code if it is not really necessary, mostly for the reasons you have listed above. Is there no other way to override this somehow?

Reception123 (talkcontribs)

There are extensions for modifying MediaWiki core, so that's why I'm wondering if there isn't a way to do this.

TheDJ (talkcontribs)

As far as I can tell, there is no hook that will allow an extension to make modifications here.

There are some hooks like beforepagedisplay where you can access the raw html text, but modifying that seems equally unmaintainable to me really.