Home
Scripts
Contributions
FAQ's
Downloads
Support Forum
  SnailSource.com [Logo]
Download CalLite
Download Gallery
Gallery FAQ
CalLite FAQ

Modifying phpBB2- Gallery AND Calendar Lite/Pro

This is intended as a guide on how to install The Gallery->phpBB2 integration along with Calendar Lite or Pro.

IMPORTANT: This is only intended as a guide so you can see where the commonalities lie and should serve to clarify any clashes between the
modifications suggested in each mod/hack.

You are recommended to check the modification instructions that come with the actual distribution you downloaded to ensure that you have all
the changes required as this document may not be completely up to date.

############################################################## 
## Mod Title: 	Calendar Pro/Lite & Gallery->phpBB2 file mods
##
## Mod Version: 1.0.0
## Author: 	WebSnail (Martin Smallridge)
## SUPPORT: 	http://www.snailsource.com/forum/ 
## Description: Add-on, plug-in Calendar for phpBB2 
## 
## Installation Level: 	moderate 
## Installation Time: 	15 Minutes 
##
## Files to edit for Lite & Pro (inc. Gallery):
##		  admin/admin_ug_auth.php
##		  includes/functions.php
##		  includes/sessions.php
##		  includes/page_header.php
##		  templates/xxx/overall_header.tpl
##		  templates/xxx/admin/auth_ug_body.tpl
##		  language/lang_english/lang_main.php
##
## Files to edit for Lite (inc. Gallery):
##		  admin/admin_db_utilities.php
##
## Files to edit for Pro (inc. Gallery):
##		  admin/admin_db_utilities.php
##		  viewonline.php
##		  admin/index.php
##
##
##		  
##############################################################
## This MOD is released under the GPL License. 
## Intellectual Property is retained by the MOD Author listed above 
############################################################## 
## 
## Please note that this MOD is NOT listed on phpBB.com's main
## site and should under no circumstances be trusted as secure
## and genuine unless downloaded from the Snailsource.com web
## site.
##
## Any download from 3rd party sites will not be supported.
##
##############################################################
 

IMPORTANT NOTES:
================

This instruction set details how to modify certain phpBB2 files to complete
an installation of either:
- Calendar Pro and Gallery integration
OR
- Calendar Lite and Gallery integration

The instructions are broken down into:
- common changes required by both types of installation 
- changes required by Calendar Lite only
- changes required by Calendar Pro only




############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up ALL Files Related To This MOD 
############################################################## 


# 
#-----[ OPEN admin/admin_ug_auth.php]------------------------------------------ 
#

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

$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');

while( list($var, $param) = @each($params) )
{
	if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )
	{
		$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];
	}
	else
	{
		$$var = "";
	}
}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv', 
	'callevel' => 'callevel', 'gallerylevel' => 'gallerylevel');

while( list($var, $param) = @each($params) )
{
	if ( isset($HTTP_POST_VARS[$param]) || isset($HTTP_GET_VARS[$param]) )
	{
		$$var = ( isset($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];
	}
	else
	{
		$$var = "";
	}
}



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

	if ( $mode == 'user' )
	{
		$t_username = $ug_info[0]['username'];
		$s_user_type = ( $is_admin ) ? '<select name="userlevel"><option value="admin" selected="selected">' .
	 		$lang['Auth_Admin'] . '</option><option value="user">' . $lang['Auth_User'] .
			 '</option></select>' : '<select name="userlevel"><option value="admin">' . $lang['Auth_Admin'] .
			 '</option><option value="user" selected="selected">' . $lang['Auth_User'] . '</option></select>';
	}
	else
	{
		$t_groupname = $ug_info[0]['group_name'];
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	// MOD Calendar
	// Query the appropriate table database re: group or user permissions.

	if ( $mode == 'user' )
	{
		// Check the Users record
		$sql = "SELECT user_calendar_perm FROM ". $table_prefix ."users WHERE user_id = $user_id";
	}
	else {
		// Check Group
		$sql = "SELECT group_calendar_perm FROM ". $table_prefix ."groups WHERE group_id = $group_id";
	}
	$result = $db->sql_query($sql);
	if (!$result) { 
	   message_die(GENERAL_MESSAGE, 'Could not access the Calendar Permission for User'); 
	} 
	$user_temp = $db->sql_fetchrow($result);
	if ($mode == 'user') {
		$cal_perm = $user_temp['user_calendar_perm'];
		}
	else {
		$cal_perm = $user_temp['group_calendar_perm'];
		}
	if (!$cal_perm && $cal_perm !='0')	{
		message_die(GENERAL_MESSAGE, 'Calendar Permissions Unavailable (ERR: ug_auth)');
		}
	$cal_levels[0] = $lang['no_public'];
	$cal_levels[1] = $lang['view_only'];
	$cal_levels[2] = $lang['view_suggest'];
	$cal_levels[3] = $lang['view_add'];
	$cal_levels[4] = $lang['view_edit_own'];
	$cal_levels[5] = $lang['cal_admin'];
	$s_cal_type = "<select name='callevel'>";
	for ($i=0; $i<=5; $i++) {
		$s_cal_type .="<option value='". $i;
		if ($i == $cal_perm) {
			$s_cal_type .="' selected='selected'>";
			}
		else {
			$s_cal_type .="'>";
			}
		$s_cal_type .= $cal_levels[$i] ."</option>";
		}
	$s_cal_type .="</select>";
	// End MOD Calendar

	// MOD Gallery Integration
	// Query the appropriate table database re: group or user permissions.

	if ( $mode == 'user' ) {
		// Check the Users record
		$sql = "SELECT user_gallery_perm FROM ". $table_prefix ."users WHERE user_id = $user_id";
	}
	else {
		// Check Group
		$sql = "SELECT group_gallery_perm FROM ". $table_prefix ."groups WHERE group_id = $group_id";
	}
	$result = $db->sql_query($sql);

	if (!$result) { 
		message_die(GENERAL_MESSAGE, 'Could not access the Gallery Permission for User'); 
	} 
	$user_temp = $db->sql_fetchrow($result);
	if ($mode == 'user') {
		$gallery_perm = $user_temp['user_gallery_perm'];
	}
	else {
		$gallery_perm = $user_temp['group_gallery_perm'];
	}
	if (!$gallery_perm && $gallery_perm !='0')	{
		message_die(GENERAL_MESSAGE, 'Gallery Permissions Unavailable (ERR: ug_auth)');
	}
	$gallery_levels[0] = $lang['View'];
	$gallery_levels[1] = $lang['Auth_User'];
	$gallery_levels[2] = $lang['Auth_Admin'];
	$s_gallery_type = "<select name='gallerylevel'>\n";
	for ($i=0; $i<=2; $i++) {
		$s_gallery_type .="<option value='". $i;
		if ($i == $gallery_perm) {
			$s_gallery_type .="' selected='selected'>";
		}
		else {
			$s_gallery_type .="'>";
		}
		$s_gallery_type .= $gallery_levels[$i] ."</option>\n";
	}
	$s_gallery_type .="</select>\n";
	// End MOD Gallery Integration


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

if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || ( $mode == 'group' && $group_id ) ) )
{
	$user_level = '';
	if ( $mode == 'user' )
	{
		//
		// Get group_id for this user_id
		//
		$sql = "SELECT g.group_id, u.user_level
			FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u, " . GROUPS_TABLE . " g
			WHERE u.user_id = $user_id 
				AND ug.user_id = u.user_id 
				AND g.group_id = ug.group_id 
				AND g.group_single_user = " . TRUE;
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not select info from user/user_group table', '', __LINE__, __FILE__, $sql);
		}

		$row = $db->sql_fetchrow($result);

		$group_id = $row['group_id'];
		$user_level = $row['user_level'];

		$db->sql_freeresult($result);
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	// 
	// MOD Calendar
	// Carry out update request for calendar
	if ( $mode == 'user' && ($callevel || $callevel == '0')) {
		$sql = "UPDATE ". USERS_TABLE ." SET user_calendar_perm = ". $callevel
			." WHERE user_id = $user_id";
		}
	if ( $mode == 'group' && ($callevel || $callevel == '0')) {
		$sql = "UPDATE ". GROUPS_TABLE ." SET group_calendar_perm = ". $callevel
			." WHERE group_id = $group_id";
		}
	if ( !($result = $db->sql_query($sql)) ) {
		message_die(GENERAL_ERROR, 'Could not update Calendar level', '', __LINE__, __FILE__, $sql);
		}
	// END Mod Calendar

	// MOD Gallery
	// Carry out update request for Gallery
	if ( $mode == 'user' && ($gallerylevel || $gallerylevel == '0')) {
		$sql = "UPDATE ". USERS_TABLE ." SET user_gallery_perm = ". $gallerylevel
			." WHERE user_id = $user_id";
	}
	if ( $mode == 'group' && ($gallerylevel || $gallerylevel == '0')) {
		$sql = "UPDATE ". GROUPS_TABLE ." SET group_gallery_perm = ". $gallerylevel
			." WHERE group_id = $group_id";
	}
	if ( !($result = $db->sql_query($sql)) ) {
		message_die(GENERAL_ERROR, 'Could not update Gallery level', '', __LINE__, __FILE__, $sql);
	}
	// END Mod Gallery



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

		$template->assign_vars(array(
			'USERNAME' => $t_username,
			'USER_LEVEL' => $lang['User_Level'] . " : " . $s_user_type,
			'USER_GROUP_MEMBERSHIPS' => $lang['Group_memberships'] . ' : ' . $t_usergroup_list)

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

		$template->assign_vars(array(
			'USERNAME' => $t_username,
			'USER_LEVEL' => $lang['User_Level'] . " : " . $s_user_type,
			'USER_CAL_LEVEL' => "Calendar Level : " . $s_cal_type,
			'USER_GALLERY_LEVEL' => "Gallery Level : " . $s_gallery_type,
			'USER_GROUP_MEMBERSHIPS' => $lang['Group_memberships'] . ' : ' . $t_usergroup_list)

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

		$template->assign_vars(array(
			'USERNAME' => $t_groupname,
			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
		);

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

		$template->assign_vars(array(
			'USERNAME' => $t_groupname,
			'USER_CAL_LEVEL' => "Calendar Level : " . $s_cal_type,
			'USER_GALLERY_LEVEL' => "Gallery Level : " . $s_gallery_type,
			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
		);



# 
#-----[ OPEN includes/functions.php]------------------------------------------ 
#

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

	if ( defined('IN_ADMIN') )
	{
		if( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) )
		{
			$board_config['default_lang'] = 'english';
		}

		include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

//
// MOD Load Calendar Language File
//
	if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_calendar.'.$phpEx)) ) 
	{ 
		$board_config['default_lang'] = 'english'; 
	} 

	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_calendar.' . $phpEx);

// End MOD



# 
#-----[ OPEN includes/sessions.php]------------------------------------------ 
#

#-----[ FIND ]------------------------------------------ 
#
 
		$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';

 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
 
		// MOD
		if(!isset($HTTP_GET_VARS['sid'])) {
			$session_id = ( isset($HTTP_POST_VARS['sid']) ) ? $HTTP_POST_VARS['sid'] : '';
		}
		// MOD end


# --- [ REPEAT!! (3 copies of code to edit) ] -------------------------------------



# 
#-----[ OPEN includes/page_header.php]------------------------------------------ 
#

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

else
{
	$u_login_logout = 'login.'.$phpEx;
	$l_login_logout = $lang['Login'];
}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

else
{
	// Mod Calendar
	if (isset($caluser)) {
		$u_login_logout = 'login.'.$phpEx.'?redirect=calendar.'.$phpEx;
		}
	else {
		$u_login_logout = 'login.'.$phpEx;
		}
	// End Mod for Calendar
	$l_login_logout = $lang['Login'];
}


#-----[ FIND ]------------------------------------------ 
#
 
	'T_SPAN_CLASS2' => $theme['span_class2'],
	'T_SPAN_CLASS3' => $theme['span_class3'],

 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
 
	'GALLERY_CODE' => $gallery_body,


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

	'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'), 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	'L_CALENDAR' => $lang['Calendar'],
	'L_GALLERY' => $lang['Gallery'],

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

	'U_MEMBERSLIST' => append_sid('memberlist.'.$phpEx),
	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	'U_CALENDAR' => append_sid('calendar.'.$phpEx),
	'U_GALLERY' => append_sid('modules.'.$phpEx.'?op=modload&name=gallery&file=index'),



# 
#-----[ OPEN templates/xxx/admin/auth_ug_body.tpl]------------------------------------------ 
#

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

<!-- BEGIN switch_user_auth -->
<p>{USER_LEVEL}</p>
<p>{USER_GROUP_MEMBERSHIPS}</p>
<!-- END switch_user_auth -->

<!-- BEGIN switch_group_auth -->
<p>{GROUP_MEMBERSHIP}</p>
<!-- END switch_group_auth -->

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<!-- BEGIN switch_user_auth -->
<p>{USER_LEVEL}</p>
<p>{USER_CAL_LEVEL}</p>	<!-- MOD Calendar 2.0.0 -->
<p>{USER_GALLERY_LEVEL}</p>	<!-- MOD Gallery -->
<p>{USER_GROUP_MEMBERSHIPS}</p>
<!-- END switch_user_auth -->

<!-- BEGIN switch_group_auth -->
<p>{USER_CAL_LEVEL}</p>	<!-- MOD Calendar 2.0.0 -->
<p>{USER_GALLERY_LEVEL}</p>	<!-- MOD Gallery -->
<p>{GROUP_MEMBERSHIP}</p>
<!-- END switch_group_auth -->

# 
#-----[ OPEN templates/xxx/overall_header.tpl]------------------------------------------ 
#

#-----[ FIND ]------------------------------------------ 
#
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
 
<link rel="stylesheet" href="modules/gallery/css/embedded_style.css.default" type="text/css">



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

<body bgcolor="{T_BODY_BGCOLOR}"  ..... 

 
#-----[ EDIT to include "{GALLERY_CODE}"  like this... ]--------------------- 

<body {GALLERY_CODE} bgcolor="{T_BODY_BGCOLOR}" .....


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

<img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

   <a href="{U_CALENDAR}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_calendar.gif" width="12" height="13" border="0" alt="{L_CALENDAR}" hspace="3" />{L_CALENDAR}</a>
 <a href="{U_GALLERY}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_GALLERY}" hspace="3" />{L_GALLERY}</a> 


# 
#-----[ OPEN language/lang_english/lang_main.php ]------------------------------------------ 
#

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

//
// That's all Folks!
// -------------------------------------------------

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// Added Gallery Integration mod
$lang['Gallery'] = "Gallery";

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

################################################
# END Calendar mods for BOTH Lite & Pro versions
################################################



###############################################################################
# Title: 	Calendar Lite only
# Desc:  	
#	This change is different for Calendar Lite compared with Calendar Pro
#	Please make sure you install the right version..
#
###############################################################################

# 
#-----[ OPEN admin/admin_db_utilities.php]------------------------------------------ 
#

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

$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 
	'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 
	'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 
	'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$tables = array('auth_access', 'banlist', 'cal_config', 'calendar', 'categories', 'config', 'disallow',
	'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 
	'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name',
	'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 


################################################
# END Calendar Lite mods.
################################################





###############################################################################
# Title: 	Calendar Pro mods only
# Desc:  	
#	These changes are only necessary if you are installing the Calendar Pro
#	Mod with Gallery. They are NOT supported by Calendar Lite.
#
###############################################################################

# 
#-----[ OPEN admin/admin_db_utilities.php]------------------------------------------ 
#

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

$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 
	'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 
	'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 
	'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$tables = array('auth_access', 'banlist', 'cal_categories', 'cal_config', 'cal_recur', 'calendar', 'categories',
	 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text',
	 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name',
	 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');



# 
#-----[ OPEN viewonline.php]------------------------------------------ 
#

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

include($phpbb_root_path . 'common.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

include_once($phpbb_root_path . 'cal_constants.inc');

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

				default:
					$location = $lang['Forum_index'];
					$location_url = "index.$phpEx";
			}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

// CalPro Mod additions
				case CAL_DEFAULT:
					$location = $lang['Calendar'];
					break;
				case CAL_YEAR_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view_year'];
					break;
				case CAL_MONTH_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view_month'];
					break;
				case CAL_WEEK_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view_week'];
					break;
				case CAL_DAY_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view_day'];
					break;
				case CAL_LIST_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view_list'];
					break;
				case CAL_VIEW:
					$location = $lang['Calendar'].' : '.$lang['view'];
					break;
				case CAL_ADD:
					$location = $lang['Calendar'].' : '.$lang['Cal_add_event'];
					break;
				case CAL_MODIFY:
					$location = $lang['Calendar'].' : '.$lang['Cal_mod_marked'];
					break;
				case CAL_COMMIT:
					$location = $lang['Calendar'].' : '.$lang['Cal_submit_event'];
					break;
				case CAL_DELETE:
					$location = $lang['Calendar'].' : '.$lang['Cal_del_marked'];
					break;
				case CAL_VALIDATE:
					$location = $lang['Calendar'].' : '.$lang['Validate'];
					break;
				case CAL_INSTALL:
					$location = $lang['Calendar'].' : '.$lang['Install'].'/'.$lang['Upgrade'];
					break;
				default:
					$location = $lang['Forum_index'];
					$location_url = "index.$phpEx";
			}
			$location_url = isset($location_url) ? $location_url : "cal_view_month.$phpExt";
// End CalPro additions




# 
#-----[ OPEN admin/index.php]------------------------------------------ 
#

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

require('./pagestart.' . $phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

include_once($phpbb_root_path . 'cal_constants.inc');

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

						default:
							$location = $lang['Forum_index'];
							$location_url = "index.$phpEx?pane=right";
					}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

// CalPro Mod additions
						case CAL_DEFAULT:
							$location = $lang['Calendar'];
							break;
						case CAL_YEAR_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view_year'];
							break;
						case CAL_MONTH_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view_month'];
							break;
						case CAL_WEEK_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view_week'];
							break;
						case CAL_DAY_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view_day'];
							break;
						case CAL_LIST_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view_list'];
							break;
						case CAL_VIEW:
							$location = $lang['Calendar'].' : '.$lang['view'];
							break;
						case CAL_ADD:
							$location = $lang['Calendar'].' : '.$lang['Cal_add_event'];
							break;
						case CAL_MODIFY:
							$location = $lang['Calendar'].' : '.$lang['Cal_mod_marked'];
							break;
						case CAL_COMMIT:
							$location = $lang['Calendar'].' : '.$lang['Cal_submit_event'];
							break;
						case CAL_DELETE:
							$location = $lang['Calendar'].' : '.$lang['Cal_del_marked'];
							break;
						case CAL_VALIDATE:
							$location = $lang['Calendar'].' : '.$lang['Validate'];
							break;
						case CAL_INSTALL:
							$location = $lang['Calendar'].' : '.$lang['Install'].'/'.$lang['Upgrade'];
							break;
						default:
							$location = $lang['Forum_index'];
							$location_url = "index.$phpEx?pane=right";
					}
					$location_url = isset($location_url) ? $location_url : "index.$phpEx?pane=right";
// End CalPro additions


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#