Brianna Laugher wrote:
On 29/10/2007, River Tarnell river@wikimedia.org wrote:
Brianna Laugher:
How is it that a link to Special:Emailuser appears in the toolbox for pages in the user namespace if you are logged in, but the link doesn't appear if you are logged out?
you can't use it if you're logged out, so the useless link isn't shown.
I realise that, but I meant code-wise.
In MonoBook.php there is this block of code:
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
if($this->data['nav_urls'][$special]) { ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) ?>"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li> <?php } }
that controls wether or not it is displayed or not. I haven't examined it in detail but I presume $this->data['nav_urls'][$special] is an object and the link is only displayed if that object returns true (?). As far as I can tell the same should be happening to the upload link (as you can see from the array in the above code) but it is not. You would have to examine the sites configuration for more details though.
Why doesn't the same happen for Special:Upload?
it does. the upload link doesn't show to logged out users.
I can see the upload link on en.wikiversity, internalwiki, boardwiki... just to pick a handful of wikis I don't have accounts for.
This could be a problem wither their configuration, unfoutunatley since they are some of the newer wikis their files probably aren't on noc. To find out you'd have to ask a sysadmin.
MinuteElectron.