Mod Version updated. See first post for new download.
Version 1.1.2 phpBB3.0.1 Compatible











Jamonte wrote:Can i change this mod for this period of time
6:00AM ~ 12:00PM
12:00PM ~ 18:00PM
18:00PM ~ 6:00AM
????
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_first', 'Good Afternoon');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_second', 'Good morning, you're up early');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_third', 'Good evening');//--Welcome_Mod--get the hour number---------------------------------
$date = $user->format_date(time(), 'H');
switch (true)
{
case ($date == 0):
// If the hour is '0' it is midnight
$s_welcome = $config['time_late'];
break;
case ($date < 4):
// if the hour is 1-3 am
$s_welcome = $config['time_late'];
break;
case ($date < 8):
// if the hour is 4-7 am
$s_welcome = $config['time_early'];
break;
case ($date < 12):
// if the hour is 8-11 am
$s_welcome = $config['time_morning'];
break;
case ($date < 18):
// if the hour is 12-5pm (12-17)
$s_welcome = $config['time_afternoon'];
break;
case ($date < 24):
// if the hour is 6pm-11pm (18-23_
$s_welcome = $config['time_evening'];
break;
//--Welcome_Mod--get the hour number---------------------------------
$date = $user->format_date(time(), 'H');
switch (true)
{
case ($date == 13):
// If the hour is '6am-12pm' it is midnight
$s_welcome = $config['time_first'];
break;
case ($date < 19):
// if the hour is 1pm-1800
$s_welcome = $config['time_second'];
break;
case ($date < 6):
// if the hour is 1900-5am
$s_welcome = $config['time_third'];
break;
//Welcome_Mod Variables-------------------------------------------------------------->
'TIME_AFTERNOON' => $config['time_afternoon'],
'TIME_EARLY' => $config['time_early'],
'TIME_EVENING' => $config['time_evening'],
'TIME_LATE' => $config['time_late'],
'TIME_MORNING' => $config['time_morning'],
//Welcome_Mod Variables------------------------------------------------------------->//Welcome_Mod Variables-------------------------------------------------------------->
'TIME_FIRST' => $config['time_first'],
'TIME_SECOND' => $config['time_second'],
'TIME_THIRD' => $config['time_third'],
//Welcome_Mod Variables------------------------------------------------------------->//If other mods are installed you may have to change legend3 to the next available legend number.
//--Welcome_Mod Legend----------------------------------------------------------------------------------------------------------------------------------------
'legend3' => 'TIME_OF_DAY_MESSAGE',
'time_afternoon' => array('lang' => 'TIME_AFTERNOON', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_early' => array('lang' => 'TIME_EARLY', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_evening' => array('lang' => 'TIME_EVENING', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_late' => array('lang' => 'TIME_LATE', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_morning' => array('lang' => 'TIME_MORNING', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
//--End-Welcome_Mod Legend-------------------------------------------------------------------------------------------------------------------------------------
//If other mods are installed you may have to change legend3 to the next available legend number.
//--Welcome_Mod Legend----------------------------------------------------------------------------------------------------------------------------------------
'legend3' => 'TIME_OF_DAY_MESSAGE',
'time_first' => array('lang' => 'TIME_FIRST', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_second' => array('lang' => 'TIME_SECOND', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'time_third' => array('lang' => 'TIME_THIRD', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
//--End-Welcome_Mod Legend-------------------------------------------------------------------------------------------------------------------------------------
//Welcome_Mod language settings------------------------------------------------------------------------------------->
'TIME_OF_DAY_MESSAGE' => 'Time of day Messages',
'TIME_AFTERNOON' => 'Time afternoon',
'TIME_AFTERNOON_EXPLAIN' => 'Message to be displayed to users between the hours of 12:00PM ~ 5:59PM',
'TIME_EARLY' => 'Time Early',
'TIME_EARLY_EXPLAIN' => 'Message to be displayed to users between the hours of 5:00AM ~ 7:59AM',
'TIME_EVENING' => 'Time Evening',
'TIME_EVENING_EXPLAIN' => 'Message to be displayed to users between the hours of 6:00PM ~ 11:59PM',
'TIME_LATE' => 'Time Late',
'TIME_LATE_EXPLAIN' => 'Message to be displayed to users between the hours of 12:00AM ~ 4:59AM',
'TIME_MORNING' => 'Time Morning',
'TIME_MORNING_EXPLAIN' => 'Message to be displayed to users between the hours of 8:00AM ~ 11:59AM',
//End-Welcome_Mod language settings--------------------------------------------------------------------------------->
//Welcome_Mod language settings------------------------------------------------------------------------------------->
'TIME_OF_DAY_MESSAGE' => 'Time of day Messages',
'TIME_FIRST' => 'Time first',
'TIME_FIRST_EXPLAIN' => 'Message to be displayed to users between the hours of 6:00AM ~ 12:00PM',
'TIME_' => 'Time second',
'TIME_SECOND_EXPLAIN' => 'Message to be displayed to users between the hours of 12:00PM ~ 18:00PM',
'TIME_THIRD' => 'Time third',
'TIME_THIRD_EXPLAIN' => 'Message to be displayed to users between the hours of 18:00PM ~ 6:00AM',
//End-Welcome_Mod language settings--------------------------------------------------------------------------------->


Good Job!



I will try it on the other two styles I have at some point this week when I have more time.





Return to Miscellaneous MODs, Hacks and Downloads
Users browsing this forum: Baidu [spider], Bingbot and 7 guests