Änderungen

Wechseln zu: Navigation, Suche

NLPedia:Einstellungen

90 Byte hinzugefügt, 22:20, 3. Apr. 2006
/* Time zone adjust */
Add the following lines in LocalSettings.php after this line: require_once( "includes/DefaultSettings.php" ); Result of the configuration will be: users cannot create their own account and cannot read/edit documents without logging in to the system.
<nowiki>
$wgGroupPermissions[’*’ ][’createaccount’] = false; <br>
$wgGroupPermissions[’*’ ][’edit’] = false; <br>
<nowiki>$wgWhitelistRead = array( "Special:Userlogin" ); </nowiki><br>
$wgGroupPermissions[’*’ ][’read’] = false; <br>
</nowiki>#
To allow browsing only from particular ip address (e.g. office lan only) insert the following lines to .htaccess file:
allow from "Office LAN IP" <br>
</Limit> <br>
 
== Eliminating index.php from url ==
== Time zone adjust ==
If you want to set the default timezone offset according to local timezone and handle daylight savings time automatically, you can do this ugly trick. Edit LocalSettings.php and add the following code: <br>
$wgLocaltimezone="Europe/Berlin"; <br>
$oldtz = getenv("TZ"); <br>
$wgLocalTZoffset = date("Z") / 3600; <br>
putenv("TZ=$oldtz"); <br>
 
Actually, resetting it probably isn't necessary, I think that's leftover from before we switched to the proper time functions. This should do (untested): <br>
$wgLocaltimezone="Europe/Berlin"; <br>
putenv("TZ=$wgLocaltimezone"); <br>
$wgLocalTZoffset = date("Z") / 3600; <br>
 
For that matter if your server is already in the local timezone you want, this might work: <br>
$wgLocalTZoffset = date("Z") / 3600; <br>
 
Or (CEST): <br>
$wgLocalTZoffset = 2;
 
Note: This timezone will be used in: