[Mediawiki-l] Changing User: URL link
Alexis Moinet
alexis.moinet at fpms.ac.be
Fri Sep 7 13:49:08 UTC 2007
Paul Coghlan a écrit :
> I am thinking that the line marked with ** is the line to change but don¹t
> know what to insert in its place.
No, it's not that line
> <?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>
change
href="<?php
echo htmlspecialchars($item['href']) ?>"
to
href="/user/<?php global $wgUser;
echo $wgUser->getID ?>"
should do the trick (NB: non-logged in user have ID 0)
More information about the MediaWiki-l
mailing list