Hello,
I have maintained Extension:Realnames for the last 7 years. It is used to add the realname to username links and mentions.
In Vector (legacy skin) and MonoBook the PersonalUrls hook allows me to modify the userpage link text to add the realname, making it so the logged in user's realname is displayed in the top right.
In the new official Timeless skin, the username is hardwired in (link to code line) and no hook is provided that can modify it.
I would like it if the line of code could please be changed from:
$dropdownHeader = $userName; ... $headerMsg = [ 'timeless-loggedinas', $user->getName() ];
to:
$userNameLinkTextBackup = $personalTools['userpage']['links'][0]['text']; // before the re-label ... $dropdownHeader = $userNameLinkTextBackup; ... $headerMsg = [ 'timeless-loggedinas', $userNameLinkTextBackup ];
Or perhaps it could use an optional key if present, $userName otherwise. That way, any work I do in the PersonalUrls hook to modify the text of the user link would be carried over into the Timeless skin.
Alternatively, a new hook could be introduced, but it seems kind of niche usage. I also thought I could potentially use BeforePageDisplay hook to modify the HTML, however that doesn't include the top right header HTML. It could be there is another hook that I'm not aware of that gives me access to the HTML of the page after TimelessTemplate::execute, but the bottom of the function is an echo() so it would have to be ob_start() somewhere else then hooked.
Since I'm maintaining an extension for people to install, I'd like to solve this in the general extension case, not with a core hack, now that Timeless is an official skin. To be sure this is not a bug, not a support request, but a feature request on the Timeless skin.
Thanks,
Finlay