[Mediawiki-l] Customized Skins & User Prefs

Alistair Johnson JohnsonA at rembrandt.co.nz
Wed Apr 27 01:11:51 UTC 2005


We use the following script to apply standard settings across our user base:

$name is the username that we're using to copy the settings from.

      mysql_connect($wgDBserver,$wgDBuser,$wgDBpassword);
      @mysql_select_db($wgDBname) or die( "Error");
      $query="SELECT * FROM " . $wgDBprefix . "user WHERE LOWER(user_name) =
'" . strtolower($name) . "'";
      $result = mysql_query($query);
      $row = mysql_fetch_array($result, MYSQL_ASSOC);
      mysql_close();

      echo "<b>setting all users' preferences to be the same as:" . $name .
"</b>";
      echo "<br>";
      echo $row[user_options];
      
      mysql_connect($wgDBserver,$wgDBuser,$wgDBpassword);
      @mysql_select_db($wgDBname) or die( "Error");
      $query="UPDATE " . $wgDBprefix . "user SET user_options = '" .
$row[user_options] . "'";
      $result = mysql_query($query);
      mysql_close(); 

This allows us to enforce standard skins, search settings etc.  It's
appropriate for our Intranet use, but perhaps not so relevant for an
Internet site.

Al.
-----Original Message-----
From: Jamie Bliss [mailto:astronouth7303 at gmail.com] 

Yes. Move all the files in the skins directory to the disabled directory.
The one you can't remove is standard, and you're just stuck with that.

On 4/26/05, Wolfe, Jeff <Jeff_Wolfe at intuit.com> wrote:
> Like a lot of folks, I'm making some modifications to the skin I want 
> my site to use.  I'm only moderately concerned about what this will 
> mean for upgrading.  I'm concerned about the user's ability to swap 
> skins.  In so doing, they can switch right off my skin which has 
> various implications.  Is anyone doing anything about this in their 
> site?  Can I remove the user's ability to select their own skin?



More information about the MediaWiki-l mailing list