############################################################## 
## MOD Title:		Topic calendar - Part 1 (common to all setup)
## MOD Author:		Ptirhiik < ptirhiik@clanmckeen.com > (Pierre) http://rpgnet.clanmckeen.com
## MOD Description:
##			This mod adds a calendar to your board, working with natural phpBB auth.
##
## MOD Version:		1.0.1
## 
## Installation Level:	Easy
## Installation Time:	25 Minutes
## Files To Edit:
##			posting.php
##			search.php
##			viewforum.php
##			viewtopic.php
##
##			includes/auth.php
##			includes/constants.php
##			includes/functions.php
##			includes/functions_post.php
##			includes/page_header.php
##			includes/topic_review.php
##
##			templates/subSilver/overall_header.tpl
##			templates/subSilver/posting_body.tpl
##			templates/subSilver/subSilver.cfg
##
## Included Files:
##			calendar.php
##			calendar_scheduler.php
##
##			functions_calendar.php
##			toggle_display.js
##			mod_calendar.php
##
##			lang_extend_topic_calendar.php
##
##			calendar_body.tpl
##			calendar_box.tpl
##			calendar_overview_profil.tpl
##			calendar_overview_topic.tpl
##			calendar_scheduler_body.tpl
##
##				--- graphics ---
##			graph.gif/folder_calendar.gif
##			graph.gif/icon_calendar.gif
##			graph.gif/icon_mini_calendar.gif
##			graph.gif/icon_tiny_profile.gif
##			graph.gif/icon_tiny_topic.gif
##			graph.gif/icon_down_arrow.gif
##			graph.gif/icon_up_arrow.gif
##
##				--- mods settings ---
##			mod-mods_settings/admin_board_extend.php
##			mod-mods_settings/functions_mods_settings.php
##			mod-mods_settings/board_config_extend_body.tpl
##			mod-mods_settings/lang_extend_mods_settings.php
##
##				--- lang settings ---
##			mod-lang_settings/lang_extend_mac.php
##
##				--- topics list ---
##			mod-topics_list/functions_topics_list.php
##			mod-topics_list/topics_list_box.tpl
##
##			mod-topics_list/graph.gif/folder_announce_own.gif
##			mod-topics_list/graph.gif/folder_announce_new_own.gif
##			mod-topics_list/graph.gif/folder_own.gif
##			mod-topics_list/graph.gif/folder_new_own.gif
##			mod-topics_list/graph.gif/folder_hot_own.gif
##			mod-topics_list/graph.gif/folder_new_hot_own.gif
##			mod-topics_list/graph.gif/folder_lock_own.gif
##			mod-topics_list/graph.gif/folder_lock_new_own.gif
##			mod-topics_list/graph.gif/folder_sticky_own.gif
##			mod-topics_list/graph.gif/folder_sticky_new_own.gif
##
############################################################## 
## 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: 
##
##	o part 1 is common to all setups
##	o part 2 is required if you haven't Split topic type v 2 or greater installed
##	o part 3 is required if you haven't Categories hierarchy v 2.0.4 or greater
##	o part 4 is required if you have Categories hierarchy v 2.0.4 or greater
##
##	o This mod was originaly based on ModjavLinux's mycalendar 2.2.6, but differs now in so
##	many points that it can't be qualified as an evolution, but rather a brand new way to
##	manage events with a calendar. Anyway, it wouldn't have been fair to not mentioned the
##	old-timer as the grand-father of this one :).
##
##	o The javascript included in calendar_box.tpl comes from Mojavlinux's MyCalendar 2.2.6 
##	( http://www.mojavelinux.com/ )
##
##	o For those using the Profile Control Panel, the calendar will also display the birthday
##	of your users.
##
##	o This mod uses mods settings mod (also included with the pack) to manage configuration values.
##	If you whish to grant your users the ability to customize their setting, install it too :).
##
##	o This mod can be installed using Nutzzy's EasyMOD v 0.0.10a ( http://phpbb.com/phpBB/viewtopic.php?t=125071 ),
##	on a phpBB 2.0.4, 2.0.5 and 2.0.6
## 
############################################################## 
## MOD History:
##
##   2003-11-11 - Version 1.0.1
##	- no changes to the mod, only the installation description has been enhance to ease the
##	installation with Categories hierarchy v 2.0.4 or greater
##
##   2003-10-30 - Version 1.0.0
##      - fix a bug on DST date change in scheduler
##	- fix the -1 issue in preview post
##	- cut off softer the message in the overview event window
##
##   2003-09-14 - Version 1.0.0 beta 1.5
##	- fix empty auths
##	- various little design fixes
##	- add forum selection
##	- add prec/next month
##	- upgrade mod-topics_list version
##
##   2003-09-09 - Version 1.0.0 beta 1.4
##	- split the mod in two part for those having or planing to install the split topic type mod
##	- adapt the mod to post icon mod
##	- fix a collision between send email input field and events on flying windows
##	- remove the jumbox on calendar view
##	- fix overview window width and right position with mozilla
##	- fix an error on days shown moved with events in little month box
##	- add a link to return from schedular to calendar
##
##   2003-09-05 - Version 1.0.0 beta 1.3
##	- fix the birthday issue on some server (DST active issue with mktime())
##	- add default icons (in prevision for posts icon mod)
##
##   2003-08-26 - Version 1.0.0 beta 1.2
##	- enhancement of the scheduler
##      - getting various type events modularization
##
##   2003-08-28 - Version 1.0.0 beta 1.0a
##      - first beta
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
ALTER TABLE phpbb_topics ADD topic_calendar_time INT(11);
ALTER TABLE phpbb_topics ADD topic_calendar_duration INT(11);
ALTER TABLE phpbb_topics ADD INDEX (topic_calendar_time);

ALTER TABLE phpbb_auth_access ADD auth_cal TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_forums ADD auth_cal TINYINT(2) DEFAULT '0' NOT NULL;
UPDATE phpbb_auth_access SET auth_cal = auth_sticky;
UPDATE phpbb_forums SET auth_cal = auth_sticky;
#
#-----[ SQL ]-------------------------------------------------
#
# This part is optional : do it only if you want your users to be able to choose their setup
#	if you want so, you'll have to install the MOD-mods_settings mod included in the pack
#
ALTER TABLE phpbb_users ADD user_calendar_display_open TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_users ADD user_calendar_header_cells TINYINT(1) DEFAULT '7' NOT NULL;
ALTER TABLE phpbb_users ADD user_calendar_week_start TINYINT(1) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_users ADD user_calendar_nb_row TINYINT(2) UNSIGNED DEFAULT '5' NOT NULL;
ALTER TABLE phpbb_users ADD user_calendar_birthday TINYINT(1) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_users ADD user_calendar_forum TINYINT(1) DEFAULT '1' NOT NULL;
#
#-----[ COPY ]------------------------------------------------
#
copy calendar.php to calendar.php
copy calendar_scheduler.php to calendar_scheduler.php
copy functions_calendar.php to includes/functions_calendar.php
copy toggle_display.js to includes/toggle_display.js
copy mod_calendar.php to includes/mods_settings/mod_calendar.php
copy lang_extend_topic_calendar.php to language/lang_english/lang_extend_topic_calendar.php

copy calendar_body.tpl to templates/subSilver/calendar_body.tpl
copy calendar_box.tpl to templates/subSilver/calendar_box.tpl
copy calendar_overview_profil.tpl to templates/subSilver/calendar_overview_profil.tpl
copy calendar_overview_topic.tpl to templates/subSilver/calendar_overview_topic.tpl
copy calendar_scheduler_body.tpl to templates/subSilver/calendar_scheduler_body.tpl

copy graph.gif/folder_calendar.gif to templates/subSilver/images/folder_calendar.gif
copy graph.gif/icon_calendar.gif to templates/subSilver/images/icon_calendar.gif
copy graph.gif/icon_mini_calendar.gif to templates/subSilver/images/icon_mini_calendar.gif
copy graph.gif/icon_tiny_profile.gif to templates/subSilver/images/icon_tiny_profile.gif
copy graph.gif/icon_tiny_topic.gif to templates/subSilver/images/icon_tiny_topic.gif
copy graph.gif/icon_down_arrow.gif to templates/subSilver/images/icon_down_arrow.gif
copy graph.gif/icon_up_arrow.gif to templates/subSilver/images/icon_up_arrow.gif
#
#-----[ COPY ]------------------------------------------------
#
# this part comes from lang settings mod, and is required for topic calendar mod
#
copy mod-lang_settings/lang_extend_mac.php to includes/lang_extend_mac.php
#
#-----[ COPY ]------------------------------------------------
#
# this part comes from mods settings mod, and is required for topic calendar mod
#
copy mod-mods_settings/admin_board_extend.php to admin/admin_board_extend.php
copy mod-mods_settings/board_config_extend_body.tpl to templates/subSilver/admin/board_config_extend_body.tpl
copy mod-mods_settings/functions_mods_settings.php to includes/functions_mods_settings.php
copy mod-mods_settings/lang_extend_mods_settings.php to language/lang_english/lang_extend_mods_settings.php
#
#-----[ COPY ]------------------------------------------------
#
# this part is relative to the topics list mod
#
copy mod-topics_list/functions_topics_list.php to includes/functions_topics_list.php
copy mod-topics_list/topics_list_box.tpl to templates/subSilver/topics_list_box.tpl

copy mod-topics_list/graph.gif/folder_announce_own.gif to templates/subSilver/images/folder_announce_own.gif
copy mod-topics_list/graph.gif/folder_announce_new_own.gif to templates/subSilver/images/folder_announce_new_own.gif
copy mod-topics_list/graph.gif/folder_own.gif to templates/subSilver/images/folder_own.gif
copy mod-topics_list/graph.gif/folder_new_own.gif to templates/subSilver/images/folder_new_own.gif
copy mod-topics_list/graph.gif/folder_hot_own.gif to templates/subSilver/images/folder_hot_own.gif
copy mod-topics_list/graph.gif/folder_new_hot_own.gif to templates/subSilver/images/folder_new_hot_own.gif
copy mod-topics_list/graph.gif/folder_lock_own.gif to templates/subSilver/images/folder_lock_own.gif
copy mod-topics_list/graph.gif/folder_lock_new_own.gif to templates/subSilver/images/folder_lock_new_own.gif
copy mod-topics_list/graph.gif/folder_sticky_own.gif to templates/subSilver/images/folder_sticky_own.gif
copy mod-topics_list/graph.gif/folder_sticky_new_own.gif to templates/subSilver/images/folder_sticky_new_own.gif
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
include_once($phpbb_root_path . 'includes/functions_calendar.'.$phpEx);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
$year	= ( !empty($HTTP_POST_VARS['topic_calendar_year']) ) ? intval($HTTP_POST_VARS['topic_calendar_year']) : '';
$month	= ( !empty($HTTP_POST_VARS['topic_calendar_month']) ) ? intval($HTTP_POST_VARS['topic_calendar_month']) : '';
$day	= ( !empty($HTTP_POST_VARS['topic_calendar_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_day']) : '';
$hour	= ( !empty($HTTP_POST_VARS['topic_calendar_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_hour']) : '';
$min	= ( !empty($HTTP_POST_VARS['topic_calendar_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_min']) : '';
$d_day	= ( !empty($HTTP_POST_VARS['topic_calendar_duration_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_day']) : '';
$d_hour	= ( !empty($HTTP_POST_VARS['topic_calendar_duration_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_hour']) : '';
$d_min	= ( !empty($HTTP_POST_VARS['topic_calendar_duration_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_min']) : '';
if ( empty($year) || empty($month) || empty($day) )
{
	$year = '';
	$month = '';
	$day = '';
	$hour = '';
	$min = '';
	$d_day = '';
	$d_hour = '';
	$d_min = '';
}
if (empty($hour) && empty($min))
{
	$hour = '';
	$min = '';
	$d_hour = '';
	$d_min = '';
}

// start event
$topic_calendar_time = 0;
if (!empty($year))
{
	$topic_calendar_time = mktime( intval($hour), intval($min), 0, intval($month), intval($day), intval($year) );
}

// duration
$topic_calendar_duration = 0;
$d_dur = $d_day . $d_hour . $d_min;
if ( !empty($topic_calendar_time) && !empty($d_dur) )
{
	$topic_calendar_duration = intval($d_day) * 86400 + intval($d_hour) * 3600 + intval($d_min) * 60;
	if ($topic_calendar_duration < 0)
	{
		$topic_calendar_duration = 0;
	}
}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$is_auth = array();
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
$is_auth_type = '';
$is_auth_type_cal = '';
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
			$is_auth_type = 'auth_post';
		}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		if (!empty($topic_calendar_time))
		{
			$is_auth_type_cal = 'auth_cal';
		}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	case 'poll_delete':
		if ( empty($post_id) )
		{
			message_die(GENERAL_MESSAGE, $lang['No_post_id']);
		}
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
		$select_sql = ( !$submit ) ? ", t.topic_title
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, t.topic_calendar_time, t.topic_calendar_duration
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, t.topic_title
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, t.topic_calendar_time, t.topic_calendar_duration
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	$forum_name = $post_info['forum_name'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
	if (!empty($post_info['topic_calendar_duration']))
	{
		$post_info['topic_calendar_duration']++;
	}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		$post_data['topic_type'] = $post_info['topic_type'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		$post_data['topic_calendar_time'] = $post_info['topic_calendar_time'];
		$post_data['topic_calendar_duration'] = $post_info['topic_calendar_duration'];
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
if ( !$is_auth[$is_auth_type]
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	 || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
$is_auth[$is_auth_type]
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
 || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		if (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
		{
			message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type_cal], $is_auth[$is_auth_type_cal . "_type"]));
		}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
			$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
			$topic_calendar_time = ( $topic_calendar_time != $post_data['topic_calendar_time'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_time'] : $topic_calendar_time;
			if (empty($topic_calendar_time)) $topic_calendar_time = 0;
			$topic_calendar_duration = ( $topic_calendar_duration != $post_data['topic_calendar_duration'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_duration'] : $topic_calendar_duration;
			if ( !empty($topic_calendar_duration) )
			{
				$topic_calendar_duration--;
			}
			if (empty($topic_calendar_time) || empty($topic_calendar_duration)) $topic_calendar_duration = 0;
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
			prepare_post($mode
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we have added
//	, $topic_calendar_time, $topic_calendar_duration
//-- modify prepare_post only
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
)
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $topic_calendar_time, $topic_calendar_duration
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
				submit_post($mode
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, $topic_calendar_time, $topic_calendar_duration
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $topic_calendar_time, $topic_calendar_duration
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
			'preview' => 'posting_preview.tpl')
		);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		if (!empty($topic_calendar_time))
		{
			$topic_calendar_duration_preview = $topic_calendar_duration-1;
			if ($topic_calendar_duration_preview < 0)
			{
				$topic_calendar_duration_preview = 0;
			}
			$preview_subject .= get_calendar_title($topic_calendar_time, $topic_calendar_duration_preview);
		}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
$hidden_form_fields = '<input type="hidden"
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
//
// Calendar type selection
//
$topic_type_cal = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
	if( $is_auth['auth_cal'])
	{
		$template->assign_block_vars('switch_type_cal', array());
		$months = array( 
			' ------------ ',
			$lang['datetime']['January'], 
			$lang['datetime']['February'], 
			$lang['datetime']['March'],
			$lang['datetime']['April'],
			$lang['datetime']['May'],
			$lang['datetime']['June'],
			$lang['datetime']['July'],
			$lang['datetime']['August'],
			$lang['datetime']['September'],
			$lang['datetime']['October'],
			$lang['datetime']['November'],
			$lang['datetime']['December'],
		);

		// get the date
		$topic_calendar_time = ( !isset($HTTP_POST_VARS['topic_calendar_year']) || (($topic_calendar_time != intval($post_data['topic_calendar_time'])) && !$is_auth['auth_cal']) ) ? intval($post_data['topic_calendar_time']) : $topic_calendar_time;
		$topic_calendar_duration = ( (!isset($HTTP_POST_VARS['topic_calendar_duration_day']) && !isset($HTTP_POST_VARS['topic_calendar_duration_hour']) && !isset($HTTP_POST_VARS['topic_calendar_duration_min']) ) || (($topic_calendar_duration != intval($post_data['topic_calendar_duration'])) && !$is_auth['auth_cal']) ) ? intval($post_data['topic_calendar_duration']) : $topic_calendar_duration;

		// get the components of the event date
		$year	= '';
		$month	= '';
		$day	= '';
		$hour	= '';
		$min	= '';
		if (!empty($topic_calendar_time))
		{
			$year	= intval( date('Y', $topic_calendar_time) );
			$month	= intval( date('m', $topic_calendar_time) );
			$day	= intval( date('d', $topic_calendar_time) );
			$hour	= intval( date('H', $topic_calendar_time) );
			$min	= intval( date('i', $topic_calendar_time) );
		}

		// get the components of the duration
		$d_day	= '';
		$d_hour	= '';
		$d_min	= '';
		if ( !empty($topic_calendar_time) && !empty($topic_calendar_duration) )
		{
			$d_dur = intval($topic_calendar_duration);
			$d_day = intval($d_dur / 86400);
			$d_dur = $d_dur - 86400 * $d_day;
			$d_hour = intval($d_dur / 3600);
			$d_dur = $d_dur - 3600 * $d_hour;
			$d_min = intval($d_dur / 60);
		}

		// raz if no date
		if ( empty($year) || empty($month) || empty($day) )
		{
			$year	= '';
			$month	= '';
			$day	= '';
			$hour	= '';
			$min	= '';
			$d_day	= '';
			$d_hour	= '';
			$d_min	= '';
		}

		// day list
		$s_topic_calendar_day = '<select name="topic_calendar_day">';
		for ($i=0; $i <= 31; $i++)
		{
			$selected = ( intval($day) == $i) ? ' selected="selected"' : '';
			$s_topic_calendar_day .= '<option value="' . $i . '"' . $selected . '>' . ( ($i == 0) ? ' -- ' : str_pad($i, 2, '0', STR_PAD_LEFT) ) . '</option>';
		}
		$s_topic_calendar_day .= '</select>';

		// month list
		$s_topic_calendar_month = '<select name="topic_calendar_month">';
		for ($i=0; $i <= 12; $i++)
		{
			$selected = ( intval($month) == $i ) ? ' selected="selected"' : '';
			$s_topic_calendar_month .= '<option value="' . $i . '"' . $selected . '>' . $months[$i] . '</option>';
		}
		$s_topic_calendar_month .= '</select>';

		// year list
		$s_topic_calendar_year = '<select name="topic_calendar_year">';

		$selected = empty($year) ? ' selected="selected"' : '';
		$s_topic_calendar_year .= '<option value="0"' . $select . '> ---- </option>';

		$start_year = ( (intval($year) > 1971 ) && (intval($year) <= date('Y', time())) ) ? intval($year)-1 : date('Y', time())-1;
		for ($i = $start_year; $i <= date('Y', time())+10; $i++)
		{
			$selected = ( intval($year) == $i) ? ' selected="selected"' : '';
			$s_topic_calendar_year .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
		}
		$s_topic_calendar_year .= '</select>';

		// time
		if (empty($hour) && empty($min))
		{
			$hour = '';
			$min = '';
		}
		$topic_calendar_hour	= $hour;
		$topic_calendar_min		= $min;

		// duration
		if ( empty($topic_calendar_hour) && empty($topic_calendar_min) )
		{
			$d_hour = '';
			$d_min = '';
		}
		if ( empty($d_day) && empty($d_hour) && empty($d_min) )
		{
			$d_day = '';
			$d_hour = '';
			$d_min = '';
		}
		$topic_calendar_duration_day	= $d_day;
		$topic_calendar_duration_hour	= $d_hour;
		$topic_calendar_duration_min	= $d_min;
	}
}
//-- fin mod : calendar ----------------------------------------------------------------------------

#
#-----[ FIND ]------------------------------------------------
#
	'S_HTML_CHECKED' => ( !$html_on ) ? 'checked="checked"' : '',
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
	'L_CALENDAR_TITLE'			=> $lang['Calendar_event'],
	'L_TIME'					=> $lang['Event_time'],
	'L_CALENDAR_DURATION'		=> $lang['Calendar_duration'],
	'L_DAYS'					=> $lang['Days'],
	'L_HOURS'					=> $lang['Hours'],
	'L_MINUTES'					=> $lang['Minutes'],
	'L_TODAY'					=> $lang['Today'],

	'TODAY_DAY'					=> date('d', time()),
	'TODAY_MONTH'				=> date('m', time()),
	'TODAY_YEAR'				=> date('Y', time()),

	'S_CALENDAR_YEAR'			=> $s_topic_calendar_year,
	'S_CALENDAR_MONTH'			=> $s_topic_calendar_month,
	'S_CALENDAR_DAY'			=> $s_topic_calendar_day,

	'CALENDAR_HOUR'				=> $topic_calendar_hour,
	'CALENDAR_MIN'				=> $topic_calendar_min,
	'CALENDAR_DURATION_DAY'		=> $topic_calendar_duration_day,
	'CALENDAR_DURATION_HOUR'	=> $topic_calendar_duration_hour,
	'CALENDAR_DURATION_MIN'		=> $topic_calendar_duration_min,
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
include_once($phpbb_root_path . 'includes/functions_calendar.'.$phpEx);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
				$template->assign_block_vars("searchresults", array(
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
				if (!empty($searchset[$i]['topic_calendar_time']) && ($searchset[$i]['post_id'] == $searchset[$i]['topic_first_post_id']))
				{
					$post_subject .= '</a></b>' . get_calendar_title($searchset[$i]['topic_calendar_time'], $searchset[$i]['topic_calendar_duration']);
				}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
$s_auth_can .= ( ( $is_auth['auth_cal'] ) ? $lang['Rules_calendar_can'] : $lang['Rules_calendar_cannot'] ) . '<br />';
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
include_once($phpbb_root_path . 'includes/functions_calendar.'.$phpEx);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full lines are longer
#
$sql = "SELECT t.topic_id, t.topic_title
	FROM " . TOPICS_TABLE
	WHERE 
		AND f.forum_id =
		$order_sql
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, t.topic_first_post_id, t.topic_calendar_time, t.topic_calendar_duration
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, t.topic_last_post_id
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, t.topic_first_post_id, t.topic_calendar_time, t.topic_calendar_duration
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$topic_time = $forum_topic_data['topic_time'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
$topic_first_post_id = intval($forum_topic_data['topic_first_post_id']);
$topic_calendar_time = intval($forum_topic_data['topic_calendar_time']);
$topic_calendar_duration = intval($forum_topic_data['topic_calendar_duration']);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	//
	// Again this will be handled by the templating
	// code at some point
	//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
	if (!empty($topic_calendar_time) && ($postrow[$i]['post_id'] == $topic_first_post_id))
	{
		$post_subject .= get_calendar_title($topic_calendar_time, $topic_calendar_duration);
	}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/auth.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
			$a_sql = 'a.auth_view, a.auth_read, a.auth_post
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, a.auth_cal
// and
//	, 'auth_cal'
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, a.auth_delete
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, a.auth_cal
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
			$auth_fields = array('auth_view', 'auth_read', 'auth_post'
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, 'auth_delete'
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, 'auth_cal'
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		case AUTH_DELETE:
			$a_sql = 'a.auth_delete';
			$auth_fields = array('auth_delete');
			break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		case AUTH_CAL:
			$a_sql = 'a.auth_cal';
			$auth_fields = array('auth_cal');
			break;
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
define('AUTH_CAL', 20);
define('POST_BIRTHDAY', 9);
define('POST_CALENDAR', 10);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- mod : mods settings ---------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	if ( $userdata['user_id'] != ANONYMOUS )
	{
		if ( !empty($userdata['user_lang']))
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : mods settings ---------------------------------------------------------------------------
//-- add
	global $db, $mods, $list_yes_no, $userdata;

	//	get all the mods settings
	$dir = @opendir($phpbb_root_path . 'includes/mods_settings');
	while( $file = @readdir($dir) )
	{
		if( preg_match("/^mod_.*?\." . $phpEx . "$/", $file) )
		{
			include_once($phpbb_root_path . 'includes/mods_settings/' . $file);
		}
	}
	@closedir($dir);
//-- fin mod : mods settings -----------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	//
	// Set up style
	//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
	include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------

#
#-----[ FIND ]------------------------------------------------
#
		}

		if ( empty($template) )
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
			include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
function prepare_post(&$mode, &$post_data, &$bbcode_on
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we have added
//	, $topic_calendar_time = 0, $topic_calendar_duration = 0
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
)
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $topic_calendar_time = 0, $topic_calendar_duration = 0
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
	//
	// check calendar date
	//
	if ((!empty($topic_calendar_time)) && ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])))
	{
		$year	= intval(date( 'Y', $topic_calendar_time));
		$month	= intval(date( 'm', $topic_calendar_time));
		$day	= intval(date( 'd', $topic_calendar_time));
		if (!checkdate($month, $day, $year))
		{
			$error_msg .= (!empty($error_msg) ? '<br />' : '') . sprintf($lang['Date_error'], $day, $month, $year);
		}
	}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
function submit_post($mode, &$post_data, &$message
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we have added
//	, $topic_calendar_time = 0, $topic_calendar_duration = 0
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
)
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $topic_calendar_time = 0, $topic_calendar_duration = 0
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we have added
//	, topic_calendar_time, topic_calendar_duration
//	, $topic_calendar_time, $topic_calendar_duration
// and
//	, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, topic_status, topic_type
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, topic_calendar_time, topic_calendar_duration
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, " . TOPIC_UNLOCKED . ", $topic_type
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, $topic_calendar_time, $topic_calendar_duration
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
, topic_type = $topic_type
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$template->pparse('overall_header');
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
if (!defined('IN_CALENDAR'))
{
	if ( intval($board_config['calendar_header_cells']) > 0 )
	{
		include_once($phpbb_root_path . './includes/functions_calendar.' . $phpEx);
		display_calendar('CALENDAR_BOX', intval($board_config['calendar_header_cells']));
	}
}
$template->assign_vars(array(
	'L_CALENDAR'	=> $lang['Calendar'],
	'I_CALENDAR'	=> $images['menu_calendar'],
	'U_CALENDAR'	=> append_sid("./calendar.$phpEx"),
	)
);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/topic_review.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full-line is longer
#
		$sql = "SELECT t.topic_title
			FROM 
			WHERE t.topic_id = 
				AND f.forum_id = 
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, t.topic_calendar_time, t.topic_calendar_duration, t.topic_first_post_id
//-- modify
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
t.topic_title
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, t.topic_calendar_time, t.topic_calendar_duration, t.topic_first_post_id
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
		$topic_title = $forum_row['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		$topic_calendar_time = intval($forum_row['topic_calendar_time']);
		$topic_first_post_id = intval($forum_row['topic_first_post_id']);
		$topic_calendar_duration = intval($forum_row['topic_calendar_duration']);
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
			//
			// Again this will be handled by the templating
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
			if (!empty($topic_calendar_time) && ($topic_first_post_id == $row['post_id']))
			{
				$post_subject .= get_calendar_title($topic_calendar_time, $topic_calendar_duration);
			}
//-- fin mod : calendar ----------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- mod : calendar -->
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN switch_enable_pm_popup -->
#
#-----[ BEFORE, ADD ]-----------------------------------------
# this line may already exists ; if so, just ignore it
<script language="JavaScript" type="text/javascript" src="includes/toggle_display.js"></script>

#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full-line is longer
#
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}"
#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
<a href="{U_FAQ}"
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
<a href="{U_CALENDAR}" class="mainmenu"><img src="{I_CALENDAR}" width="12" height="13" border="0" alt="{L_CALENDAR}" hspace="3" />{L_CALENDAR}</a>&nbsp; &nbsp;
#
#-----[ FIND ]------------------------------------------------
#
		</table>

		<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
		{CALENDAR_BOX}
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<script language="JavaScript" type="text/javascript">
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- mod : calendar -->
#
#-----[ FIND ]------------------------------------------------
#
		  <!-- BEGIN switch_type_toggle -->
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
		  <!-- BEGIN switch_type_cal -->
		  <tr><td colspan="2"><hr /></td></tr>
		  <tr>
			<td></td>
			<td valign="top">
				<table cellpadding="2" cellspacing="0" width="100%" border="0">
				<tr>
					<td align="right" nowrap="nowrap"><span class="gen"><b>{L_CALENDAR_TITLE}&nbsp;:</b></span></td>
					<td align="left" width="100%">
						<span class="genmed">
							{S_CALENDAR_DAY}{S_CALENDAR_MONTH}{S_CALENDAR_YEAR}&nbsp;
							<a href="#" name="#" class="genmed" onClick="document.post.topic_calendar_day.value={TODAY_DAY};document.post.topic_calendar_month.value={TODAY_MONTH};document.post.topic_calendar_year.value={TODAY_YEAR};" />{L_TODAY}</a>
						</span>
					</td>
				</tr>
				<tr>
					<td align="right" nowrap="nowrap"><span class="gen"><b>{L_TIME}&nbsp;:</b></span></td>
					<td align="left" width="100%">
						<span class="genmed">
							<input name="topic_calendar_hour" type="post" maxlength="2" size="3" value="{CALENDAR_HOUR}" />&nbsp;{L_HOURS}&nbsp;&nbsp;
							<input name="topic_calendar_min" type="post" maxlength="2" size="3" value="{CALENDAR_MIN}" />&nbsp;{L_MINUTES}
						</span>
					</td>
				</tr>
				<tr><td></td><td><hr /></td></tr>
				<tr>
					<td align="right" nowrap="nowrap"><span class="gen"><b>{L_CALENDAR_DURATION}&nbsp;:</b></span></td>
					<td align="left" width="100%">
						<span class="genmed">
							<input name="topic_calendar_duration_day" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_DAY}" />&nbsp;{L_DAYS}&nbsp;&nbsp;
							<input name="topic_calendar_duration_hour" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_HOUR}" />&nbsp;{L_HOURS}&nbsp;&nbsp;
							<input name="topic_calendar_duration_min" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_MIN}" />&nbsp;{L_MINUTES}
						</span>
					</td>
				</tr>
				</table>
			</td>
		  </tr>
		  <tr><td colspan="2"><hr /></td></tr>
		  <!-- END switch_type_cal -->
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : topics list -----------------------------------------------------------------------------
//-- mod : calendar --------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#

//-- mod : calendar --------------------------------------------------------------------------------
//-- add
$images['icon_calendar']		= "$current_template_images/icon_calendar.gif";
$images['menu_calendar']		= "$current_template_images/icon_mini_calendar.gif";
$images['icon_tiny_topic']		= "$current_template_images/icon_tiny_topic.gif";
$images['icon_tiny_profile']	= "$current_template_images/icon_tiny_profile.gif";
$images['folder_birthday']		= "$current_template_images/folder_calendar.gif";

$images['up_arrow']				= "$current_template_images/icon_up_arrow.gif";
$images['down_arrow']			= "$current_template_images/icon_down_arrow.gif";
//-- fin mod : calendar ----------------------------------------------------------------------------

//-- mod : topics list -----------------------------------------------------------------------------
//-- add
$images['folder_global_announce']		= "$current_template_images/folder_announce.gif";
$images['folder_global_announce_new']		= "$current_template_images/folder_announce_new.gif";
$images['folder_global_announce_own']		= "$current_template_images/folder_announce_own.gif";
$images['folder_global_announce_new_own']	= "$current_template_images/folder_announce_new_own.gif";
$images['folder_own']				= "$current_template_images/folder_own.gif";
$images['folder_new_own']			= "$current_template_images/folder_new_own.gif";
$images['folder_hot_own']			= "$current_template_images/folder_hot_own.gif";
$images['folder_hot_new_own']			= "$current_template_images/folder_new_hot_own.gif";
$images['folder_locked_own']			= "$current_template_images/folder_lock_own.gif";
$images['folder_locked_new_own']		= "$current_template_images/folder_lock_new_own.gif";
$images['folder_sticky_own']			= "$current_template_images/folder_sticky_own.gif";
$images['folder_sticky_new_own']		= "$current_template_images/folder_sticky_new_own.gif";
$images['folder_announce_own']			= "$current_template_images/folder_announce_own.gif";
$images['folder_announce_new_own']		= "$current_template_images/folder_announce_new_own.gif";
//-- fin mod : topics list -------------------------------------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM