Here's the link that I have uploaded to this site.
Please let me know if it works out for you.
http://www.phpbb.com/mods/downloads/upl ... d_copy.txt
Seems to be working for everyone that had asked so here it is.
UPDATE: the link is down since it was on the dead server, here's the code:
Code: Select all
#################################################################
## Mod Title: Daylight Savings Time (DST) MOD
## Mod Version: 1.1.0
## Author: blulegend
## Description: Allows users to turn DST on/off.
## Allows admin to change user settings as well.
## Current mode reflected in timezone text on each page.
## No table modification required! :)
##
## Installation Level: Moderately Easy.
## Installation Time: 15-30 Minutes
## Files To Edit: 9
## Included Files: None
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
## Simply make an announcement for users to change this option in their profiles.
## If you know MYSQL well enough you could change the settings for all users in certain timezones
## for them by making a simple query.
##
## IMPORTANT!!: Line numbers are for reference only so you can find the code faster.
## DO NOT RELY ON LINE NUMBERS ONLY.
## WATCH OUT FOR AFTER AND BEFORE ADDITIONS
## I HAVE TRIED TO LIMIT REPLACE ACTIONS AS MUCH AS POSSIBLE
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN /admin/admin_users.php ]------------------------------
#
#
#-----[ FIND around line 100 ]-----------------------------------
#
$attachsig = ( isset( $HTTP_POST_VARS['attachsig']) ) ? ( ( $HTTP_POST_VARS['attachsig'] ) ? TRUE : 0 ) : 0;
#
#-----[ AFTER, ADD ]-------------------------------------------
#
$dstime = ( isset($HTTP_POST_VARS['dstime']) ) ? ( ($HTTP_POST_VARS['dstime']) ? TRUE : 0 ) : 0; // DST MOD
#
#-----[ FIND around line 543 ]-----------------------------------
#
if( !$error )
{
if( $HTTP_POST_VARS['deleteuser'] )
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
if ( $dstime ) $user_timezone += 50; // DST MOD
#
#-----[ FIND around line 775 ]-----------------------------------
#
$viewemail = $this_userdata['user_viewemail'];
$notifypm = $this_userdata['user_notify_pm'];
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
$dstime = ( $userdata['user_timezone'] > 12 ) ? true : 0; // DST MOD
#
#-----[ FIND around line 790 ]-----------------------------------
#
$user_timezone = $userdata['user_timezone'];
#
#-----[ REPLACE WITH ]-------------------------------------------
#
// OLD $user_timezone = $userdata['user_timezone'];
$user_timezone = ( $userdata['user_timezone'] > 12 ) ? $userdata['user_timezone'] - 50 : $userdata['user_timezone']; // DST MOD
#
#-----[ FIND around line 900 ]-----------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", """, $signature) . '" />';
$s_hidden_fields .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="dstime" value="' . $dstime . '" />'; // DST MOD
#
#-----[ FIND around line 900 ]-----------------------------------
#
'L_DELETE_USER' => $lang['User_delete'],
'L_DELETE_USER_EXPLAIN' => $lang['User_delete_explain'],
'L_SELECT_RANK' => $lang['Rank_title'],
#
#-----[ AFTER, ADD ]-------------------------------------------
#
// DST MOD
'DSTIME_YES' => ( $dstime ) ? 'checked="checked"' : '',
'DSTIME_NO' => ( !$dstime ) ? 'checked="checked"' : '',
'L_DSTIME' => $lang['Daylight_savings_time'],
'L_DSTIME_EXPLAIN' => $lang['Daylight_savings_time_explain'],
// END MOD
#
#-----[ OPEN /includes/functions.php ]------------------------------
#
#
#-----[ FIND around line 90 ]-----------------------------------
#
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
#
#-----[ REPLACE WITH ]-------------------------------------------
#
// DST MOD
// OLD return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['user_timezone'] > 12 ) $row['user_timezone'] -= 50;
return $row;
}
else
{
return false;
}
// END MOD
#
#-----[ FIND around line 212 ]-----------------------------------
#
if ( isset($userdata['user_timezone']) )
{
#
#-----[ AFTER, ADD ]-------------------------------------------
#
// DST MOD
if ( $userdata['user_timezone'] > 12 )
{
$userdata['user_timezone'] = strval($userdata['user_timezone'] - 50);
$board_config['dstime'] = true;
}
// END MOD
#
#-----[ FIND around line 329 ]-----------------------------------
#
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
if ( $board_config['dstime'] ) $tz++; // DST MOD
#
#-----[ OPEN /includes/usercp_avatar.php ]------------------------------
#
#
#-----[ FIND around line 236 ]-----------------------------------
#
&$language, &$timezone, &$dateformat)
#
#-----[ REPLACE WITH ]-------------------------------------------
#
&$language, &$timezone, &$dateformat, &$dstime) // DST MOD
#
#-----[ FIND around line 312 ]-----------------------------------
#
'language', 'timezone', 'dateformat');
#
#-----[ REPLACE WITH ]-------------------------------------------
#
'language', 'timezone', 'dateformat', 'dstime'); // DST MOD
#
#-----[ OPEN /includes/page_header.php ]------------------------------
#
#
#-----[ FIND around line 500 ]-----------------------------------
#
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
#
#-----[ REPLACE WITH ]-------------------------------------------
#
// OLD 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]) . (( $board_config['dstime'] ) ? ' ' . $lang['DST_TEXT'] : ''), // DST MOD
#
#-----[ OPEN /includes/usercp_register.php ]------------------------------
#
#
#-----[ FIND around line 126 ]-----------------------------------
#
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
$popuppm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
#
#-----[ AFTER, ADD ]-------------------------------------------
#
$dstime = ( isset($HTTP_POST_VARS['dstime']) ) ? ( ($HTTP_POST_VARS['dstime']) ? TRUE : 0 ) : 0; // DST MOD
#
#-----[ FIND around line 385 ]-----------------------------------
#
if ( !$error )
{
if ( $avatar_sql == '' )
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
if ( $dstime ) $user_timezone += 50; // DST MOD
#
#-----[ FIND around line 668 ]-----------------------------------
#
$viewemail = $userdata['user_viewemail'];
$notifypm = $userdata['user_notify_pm'];
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
$dstime = ( $userdata['user_timezone'] > 12 ) ? true : 0; // DST MOD
#
#-----[ FIND around line 683 ]-----------------------------------
#
$user_timezone = $userdata['user_timezone'];
#
#-----[ REPLACE WITH ]-------------------------------------------
#
// OLD $user_timezone = $userdata['user_timezone'];
$user_timezone = ( $userdata['user_timezone'] > 12 ) ? $userdata['user_timezone'] - 50 : $userdata['user_timezone']; // DST MOD
#
#-----[ FIND around line 713 ]-----------------------------------
#
$user_lang, $user_timezone, $user_dateformat);
#
#-----[ REPLACE WITH ]-------------------------------------------
#
$user_lang, $user_timezone, $user_dateformat, $dstime); // DST MOD
#
#-----[ FIND around line 836 ]-----------------------------------
#
'L_CURRENT_PASSWORD' => $lang['Current_password'],
'L_NEW_PASSWORD' => ( $mode == 'register' ) ? $lang['Password'] : $lang['New_password'],
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
// DST MOD
'L_DSTIME' => $lang['Daylight_savings_time'],
'L_DSTIME_EXPLAIN' => $lang['Daylight_savings_time_explain'],
'DSTIME_YES' => ( $dstime ) ? 'checked="checked"' : '',
'DSTIME_NO' => ( !$dstime ) ? 'checked="checked"' : '',
// END MOD
#
#-----[ OPEN /language/lang_xxx/lang_admin.php ]------------------------------
#
#
#-----[ FIND around line 700 ]-----------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
// DST MOD
$lang['Daylight_savings_time'] = "Daylight Savings Time";
$lang['Daylight_savings_time_explain'] = "Selecting yes will advance all times by 1 hour";
//
#
#-----[ OPEN /language/lang_xxx/lang_main.php ]------------------------------
#
#
#-----[ FIND around line 980 ]-----------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]-------------------------------------------
#
// DST MOD
$lang['Daylight_savings_time'] = "Daylight Savings Time";
$lang['Daylight_savings_time_explain'] = "Selecting yes will advance all times by 1 hour";
$lang['DST_TEXT'] = "DST +1";
//
#
#-----[ OPEN /templates/subSilver/admin/user_edit_body.tpl ]------------------------------
#
#
#-----[ FIND around line 207 ]-----------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_TIMEZONE}</span></td>
<td class="row2">{TIMEZONE_SELECT}</td>
</tr>
#
#-----[ AFTER, ADD ]-------------------------------------------
#
<!-- DST MOD begin -->
<tr>
<td class="row1"><span class="gen">{L_DSTIME}:</span><br /><span class="gensmall">{L_DSTIME_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="dstime" value="1" {DSTIME_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="dstime" value="0" {DSTIME_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<!-- DST MOD end -->
#
#-----[ OPEN /templates/subSilver/profile_add_body.tpl ]------------------------------
#
#
#-----[ FIND around line 216 ]-----------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
<td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
</tr>
#
#-----[ AFTER, ADD ]-------------------------------------------
#
<!-- DST MOD begin -->
<tr>
<td class="row1"><span class="gen">{L_DSTIME}:</span><br /><span class="gensmall">{L_DSTIME_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="dstime" value="1" {DSTIME_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="dstime" value="0" {DSTIME_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<!-- DST MOD end -->
#
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
# EoM