[Mediawiki-l] Changing User: URL link
Paul Coghlan
pcoghlan at usa.net
Fri Sep 7 12:34:56 UTC 2007
Apologies for re-posting essentially the same post but this is just a final
attempt to get some input on what seems to be a very specific issue.
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 (i.e. XXX) 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? Is this is something better posted in a PHP forum?
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>
More information about the MediaWiki-l
mailing list