We have a custom skin that includes the personal URLs and a link to the User: page in the format:
www.domain.com/wiki/index.php?title=User:XXX with the hyperlink appearing as the username, XXX¹ in this example.
We would like to retain the link but point it instead to:
www.domain.com/user/YY
Where YY is not the username but instead the uid. The hyperlink should remain as-is but point to the new destination.
I am not a PHP expert but have found this in our custom skin php file.
I am thinking that the line marked with ** is the line to change but don¹t know what to insert in its place.
Can anyone help out?
Many thanks, Paul
<?php foreach($this->data['personal_urls'] as $key => $item) { ?> <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php global $wgTitle, $wgUser; $item['active'] = $item['active'] || $item['href']==$wgTitle->getLocalURL() || ** $item['href']==$wgTitle->getLocalURL().'/'.$wgUser->getName(); if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php if(!empty($item['class'])) { ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
mediawiki-l@lists.wikimedia.org