If you have the desire and need to restrict editing of the wiki, version 1.5 has nice features.
However, if you want to allow uploading of files, you set a global variable. However, this now shows the upload link to all viewers. It should only show the link if you are logged in and have rights.
Adding the following snippet to the "toolbox" code:
<?php global $wgUser; if( $wgUser->isAllowed( 'upload' ) ) { $TmpLinksArray = array('contributions', 'emailuser', 'upload', 'specialpages'); } else { $TmpLinksArray = array('contributions', 'emailuser', 'specialpages'); } ?> <?php foreach( $TmpLinksArray as $special ) { ?>
In place of the line:
<?php foreach( array('contributions', 'emailuser', 'upload', 'specialpages') as $special ) { ?>
now will only show the upload link when appropriate. You will no longer be showing a link to those people that cannot use it.
I am not sure if the additional test for blocked is needed/required for completeness. If it is, then of course my logic needs to be inverted and the test should be:
if( !$wgUser->isAllowed( 'upload' ) || $wgUser->isBlocked() )
Or am I missing the point somewhere? I would love to know if this is the kind of thing you want fed back to you or not ... I am well past 48 hours on the migration from 1.4 to 1.5 ... Not that 1.5 is bad, just that so many options have been added and the old way of doing things has changed. Of course, the deaths, database configuration issues, normal stuff that comes up when you try to do anything real ...
Other than that, and a change to enable Google searching ...
Paul