Wow, that was super easy! Thanks.
BTW, why did you say I was stuck with Standard? I moved it and it seemed to
operate as desired. It only showed the one skin I wanted the user to see.
Is there some other more insidious issue I just haven't seen?
Thanks,
Jeff
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Jan Steinman
Sent: Tuesday, April 26, 2005 11:20 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Customized Skins & User Prefs
On 26 Apr 2005, at 18:00, Jamie Bliss wrote:
> 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.
Doh! Why didn't I think of that before I hacked the Preferences page to not
allow changing skins? :-)
:::: fas-cism (fash'iz'em) n. A system of government that exercises a
dictatorship of the extreme right, typically through the merging of state
and business leadership, together with belligerent nationalism.
-- American Heritage Dictionary, 1983 (reference to "business" was removed
in later editions)
:::: Jan Steinman <http://www.Bytesmiths.com>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Just in case, that you do not watch this bugzilla:
http://bugzilla.wikipedia.org/show_bug.cgi?id=454
The new version adds optional notification on _new_ pages; "(last seen)"
links for watched pages; E-mail address confirmation sends a link with a
token to unconfirmed address; "you have new messages on your user and/or
user_talk page" (new) including "(last seen)" links; new option for
recent changes "show only current revision of pages in Recent view" and
perhaps more I forgot here .... but what is in .....
.... the documentation http://meta.wikipedia.org/wiki/Enotif
Euer/your Wikinaut
I kindly asked for code review and to commit everything (which is
admittedly a lot) into CVS HEAD.
I posted info on how to do this back at the end of March (based on info
posted by David Cameron) . Below is the modification I made to User.php to
achieve this. You need to enable Windows authentication in IIS to make this
work.
You can also look at AuthPlugin to seamlessly create mediawiki users based
on another authentication mechanism, but as far as I can tell that didn't
also offer automatic logon which the below will do for you.
Al.
function loadFromSession() {
global $wgMemc, $wgDBname;
if ( isset( $_SESSION['wsUserID'] ) ) {
if ( 0 != $_SESSION['wsUserID'] ) {
$sId = $_SESSION['wsUserID'];
} else {
return new User();
}
} else if ( isset( $_COOKIE["{$wgDBname}UserID"] ) ) {
$sId = IntVal( $_COOKIE["{$wgDBname}UserID"] );
$_SESSION['wsUserID'] = $sId;
} else if ( isset($_SERVER["AUTH_USER"])) {
//modification to allow logon via authentication
information
//passed from IIS
global $wgUser;
global $wgDeferredUpdateList;
//get the username
$temp = explode('DOMAINNAME', $_SERVER["AUTH_USER"]); //remove the
domain name from AUTH_USER
if ($temp[1] == "") {
$name = $temp[0];
} else {
$name = $temp[1];
}
//pull in the usernames and passwords we'll need for the database
lookup
global $wgDBprefix;
global $wgDBuser;
global $wgDBpassword;
global $wgDBserver;
global $wgDBname;
//we'll use PHP's MYSQL module to access the mediawiki database as
it's Q&D
$link = mysql_connect($wgDBserver,$wgDBuser,$wgDBpassword);
@mysql_select_db($wgDBname, $link) or die( "Unable to select user
database for NTLM authentication");
$query="SELECT * FROM " . $wgDBprefix . "user WHERE LOWER(user_name) =
'" . strtolower($name) . "'";
$result = mysql_query($query, $link);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
mysql_close($link);
//set the variables we need to transparently authenticate
$sId = $row['user_id'];
$_SESSION['wsUserID'] = $row['user_id'];
$_SESSION['wsUserName'] = $row['user_name'];
$_SESSION['wsToken'] = $row['user_token'];
//set cookies with this info to make life easier for us in the future
global $wgCookieExpiration, $wgCookiePath, $wgCookieDomain,
$wgDBname;
setcookie( $wgDBname.'UserID', $row['user_id'], 0,
$wgCookiePath, $wgCookieDomain );
setcookie( $wgDBname.'UserName', $row['user_name'], 0,
$wgCookiePath, $wgCookieDomain );
setcookie( $wgDBname.'Token', $row['user_token'], 0,
$wgCookiePath, $wgCookieDomain );
} else {
return new User();
}
if ( isset( $_SESSION['wsUserName'] ) ) {
$sName = $_SESSION['wsUserName'];
} else if ( isset( $_COOKIE["{$wgDBname}UserName"] ) ) {
$sName = $_COOKIE["{$wgDBname}UserName"];
$_SESSION['wsUserName'] = $sName;
} else {
return new User();
}
$passwordCorrect = FALSE;
$user = $wgMemc->get( $key = "$wgDBname:user:id:$sId" );
if($makenew = !$user) {
wfDebug( "User::loadFromSession() unable to load
from memcached\n" );
$user = new User();
$user->mId = $sId;
$user->loadFromDatabase();
} else {
wfDebug( "User::loadFromSession() got from cache!\n"
);
}
if ( isset( $_SESSION['wsToken'] ) ) {
$passwordCorrect = $_SESSION['wsToken'] ==
$user->mToken;
} else if ( isset( $_COOKIE["{$wgDBname}Token"] ) ) {
$passwordCorrect = $user->mToken ==
$_COOKIE["{$wgDBname}Token"];
} else {
return new User(); # Can't log in from session
}
if ( ( strtolower($sName) == strtolower($user->mName) ) &&
$passwordCorrect ) { //modified to allow for case differences between
mediawiki and NTLM usernames
if($makenew) {
if($wgMemc->set( $key, $user )) {
wfDebug( "User::loadFromSession()
successfully saved user\n" );
} else {
wfDebug( "User::loadFromSession()
unable to save to memcached\n" );
}
}
$user->spreadBlock();
return $user;
}
return new User(); # Can't log in from session
}
-----Original Message-----
From: Toscano, Ashley [mailto:atoscano@edmunds.com]
Sent: Thursday, 28 April 2005 7:49 a.m.
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] How to require Sign In
Is there a way to hook the Sign In function to Active Directory on a
corporate Windows network? Also, how do I require that users sign in before
updating content on the wiki?
- Ashley Toscano Office: 310-309-6431
Edmunds.com "where smart car buyers start"
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Is there a way to hook the Sign In function to Active Directory on a
corporate Windows network? Also, how do I require that users sign in
before updating content on the wiki?
- Ashley Toscano Office: 310-309-6431
Edmunds.com "where smart car buyers start"
I'd like to let users select their preferred interface language from
the Main Page (from a drop-down list below the search box)...
Has anyone done this before?
Also is it possible to do this without a user signing in?
Anything else I should think about?
Thanks.
Paul
Hi all,
I got the solution for myself. We need to edit corresponding skin files to do that.
Regards
Vijay
vijay kalghatgi <vijaysk_84(a)yahoo.com> wrote:
Hi all,
Can anybody tell me how to remove Search tool n toolbox from the mediawiki? Which .php or .css files are to be modified?
Please Help! Its urgent!!
Regards
Vijay
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi all,
Can anybody tell me how to remove Search tool n toolbox from the mediawiki? Which .php or .css files are to be modified?
Please Help! Its urgent!!
Regards
Vijay
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
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?
Thanks,
Jeff
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@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(a)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?