Dabei werden zwei Punkte beachtet.
1.) Der User kommt aus einer Betroffenen Zeitzone (1.00)
2.) Das Board liegt in der Zeitzone (1)
Da das Script prüft, ob eine umstellung erfolgte, oder ob diese erwünscht ist, kann man es DIREKT in die index.php, portal.php, oder in dem man es zu einer function umschreibt, in die "/includes/function.php" einbauen.
Code: Alles auswählen
function auth_dst_switch()
{
HIER HINN DER 2. CODE
return true;
}
Code: Alles auswählen
<?php
/**
*
* @package phpBB3
* @version $Id: magic_auth_dst_switch.php,v 1.0.0 2008/03/30 12:35:00 yoserv Exp $
* @copyright (c) 2008 phpbb3-magic.de
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (date("m",strtotime("5 sunday", mktime(0,0,0,3,1,date("y")))) == 3)
{
if (date("m") == date("n",strtotime("5 sunday", mktime(0,0,0,3,1,date("y"))))
&& date("d") == date("j", strtotime("5 sunday", mktime(0,0,0,3,1,date("y"))))
OR (date("m") == date("n",strtotime("4 sunday", mktime(0,0,0,3,1,date("y"))))
&& date("d") == date("j", strtotime("4 sunday", mktime(0,0,0,3,1,date("y"))))))
{
if ($config['board_timezone'] == 1 && $config['board_dst'] == 0)
{
set_config('board_dst', '1');
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_dst = '1'
WHERE user_timezone = '1.00'";
$db->sql_query($sql);
}
}
}
if (date("m",strtotime("5 sunday", mktime(0,0,0,10,1,date("y")))) == 3)
{
if (date("m") == date("n",strtotime("5 sunday", mktime(0,0,0,10,1,date("y"))))
&& date("d") == date("j", strtotime("5 sunday", mktime(0,0,0,10,1,date("y"))))
OR (date("m") == date("n",strtotime("4 sunday", mktime(0,0,0,10,1,date("y"))))
&& date("d") == date("j", strtotime("4 sunday", mktime(0,0,0,10,1,date("y"))))))
{
if ($config['board_timezone'] == 1 && $config['board_dst'] == 1)
{
set_config('board_dst', '0');
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_dst = '0'
WHERE user_timezone = '1.00'";
$db->sql_query($sql);
}
}
}
?>