But now, I really need to install another hack with name "Today / Yesterday" and he have an conflict with Birthday Mod...
Today / Yesterday Autor have a fix to this, but I can´t find the line that he says to change...
Can you help me?
This is the hack:
- Code: Select all
##############################################################
## MOD Title: Today / Yesterday
## MOD Author: quazi < nomail@nospam.com > ( Rumata ) http://forum.dklab.ru/users/Rumata/
## MOD Description: This MOD allows to see 'Today at' or 'Yesterday at' in the any location of the phpBB forum
## MOD Version: 1.0.0 Beta
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: (3) includes/page_header.php, includes/functions.php, language/lang_english/lang_main.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This Mod is slightly integrated with other modifications in original phpBB code but it might work standalone.
## The questionable lines are marked and commented by //
##
##############################################################
## MOD History:
## 2005-04-26 - Version 1.0.0 Beta
## - First release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#----[ OPEN ]-------
#
includes/page_header.php
#
#----[ FIND ]-------
#
$s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : '';
#
#----[ REPLACE WITH ]----
#
$s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone'], true) : '';
#
#----[ FIND ]-------
#
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
#
#----[ REPLACE WITH ]----
#
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'], false)),
#
#----[ OPEN ]-------
#
includes/functions.php
#
#----[ FIND ]-------
#
function create_date($format, $gmepoch, $tz)
{
global $board_config, $lang;
static $translate;
if ( empty($translate) && $board_config['default_lang'] != 'english' )
{
@reset($lang['datetime']);
while ( list($match, $replace) = @each($lang['datetime']) )
{
$translate[$match] = $replace;
}
}
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
}
#
#----[ REPLACE WITH ]----
#
function create_date($format, $gmepoch, $tz, $calcDelta=true)
{
global $board_config, $lang;
static $translate;
if ( !$gmepoch )
{
// The next line integrated with the 'Last Visit' MOD (my own thing, unpublished)
return $lang['datetime']['Hidden_time'];
}
$time = $gmepoch + (3600 * $tz);
if ( $calcDelta ) {
$midnight = gmmktime(0, 0, 0);
$delta = $time - $midnight;
if ($delta >= 0 && $delta < 86400)
{
return $lang['datetime']['Today'] . gmdate('H:i', $time);
}
else
if ($delta < 0 && $delta > - 86400)
{
return $lang['datetime']['Yesterday'] . gmdate('H:i', $time);
}
}
$pre_format = @gmdate($format, $time);
if ( empty($translate) && $board_config['default_lang'] != 'english' )
{
@reset($lang['datetime']);
while ( list($match, $replace) = @each($lang['datetime']) )
{
$translate[$match] = $replace;
}
}
return ( !empty($translate) ) ? strtr($pre_format, $translate) : $pre_format;
}
#
#----[ OPEN ]-------
#
language/lang_english/lang_main.php
#
#----[ FIND ]-------
#
$lang['datetime']['Dec'] = 'Dec';
#
#----[ AFTER, ADD ]-
#
$lang['datetime']['Today'] = 'Today at ';
$lang['datetime']['Yesterday'] = 'Yesterday at ';
// $lang['datetime']['Last_visit'] = 'Last visit '; // LastVisit MOD (unpublished)
$lang['datetime']['Hidden_time'] = 'Obscured by darkness';
# EoM
I have installed but my Birthday MOD goes crazy!
Autor MOD says that:
quazirumata wrote:it had been found and checked one problem of compatibility with the 'Brithday MOD'.
This problem is solving by the modification of the 'Birthday MOD' lines containing the 'create_date' function call.
Find all lines (10 lines) in the original 'Birthday MOD' text or all lines of one inserted to the forum scripts
- Code: Select all
create_date( any_param_1, any_param_2, any_param_3 )
and change them by
- Code: Select all
create_date( any_param_1, any_param_2, any_param_3, false )
all any_paramX are some parameters to function
But I can´t find any any_param
Please, can someone be more specific?
Here is my Birthday MOD version:
http://www.divertidos.net/Birthday%20Mod.zip
Thanks and sorry my poor english

