############################################################## 
## MOD Title: IM Portal - EM Friendly
## MOD Author: masterdavid < webmaster@integramod.com > (Ronald John David) 
##             http://www.integramod.com 
## MOD Description:  Flexible and full-featured portal management addon for phpBB (forum-wide integration)
##                   Multiple-page version with cache system
## MOD Version: 1.2.0
## 
## Installation Level: Intermediate
## Installation Time:  10 Minutes 
## Files To Edit:  
##                 login.php
## 		 		   includes/constants.php
##		   		   includes/page_header.php
##		  		   includes/page_tail.php
##                 language/lang_english/lang_admin.php
##                 language/lang_english/lang_main.php
##		   		   templates/subSilver/overall_header.tpl
##		   		   templates/subSilver/overall_footer.tpl
## Included Files: many (under phpbbroot directory of the package)
############################################################## 
## Author Notes: Backup first your files and database before proceeding with the installation.
##############################################################
##
## MOD History: 
##
##   2004-05-29 - Version 1.2.0
##	- beta period ended with no bug reports :) just a repackaged version
##      - planned IM Portal addons will be made available separately
##      - IM Portal Manual is also made available separately
##
##   2004-05-25 - Version 1.1.1 beta
##	- per portal page permission (user level)
##      - usergroups permission for each block and for each portal page
##      - automatic block position tags using a config file for each layout
##      - automatic block variables in Portal Configuration per installed block 
##	  using a config file
##      - complete control of the cache system through the Portal Configuration in ACP
##      - blocks with or without border, with or without titlebar and with or without background
##
##   2004-05-09 - Version 1.1.0a
##      - add missing procedures in install file to make it forum_wide
##
##   2004-05-02 - Version 1.1.0
##      - minor changes
##      - changes in blocks to enable duplicate blocks in a page
##	- add some debugging code for problems not showing forum-wide blocks
##
##   2004-04-30 - Version 1.0.3 beta
##      - cache system using Cache Lite class with the choice to enable system-wide caching of data; 
##	  administrators can also choose which blocks to cache and the life of cached blocks in seconds
##      - fix minor bugs in some default blocks
##	- requirement for eXtreme Styles mod removed; now, it can be used with the standard
##	  templating system
##
##   2004-04-26 - Version 1.0.2 beta
##      - multi-page portal where each page can have a different layout (you can have extra pages with
##        different information/blocks and layout per page (read readme.txt for usage)
##      - tight integration of layouts, block position tags and blocks in the ACP
##      - confirmation dialog for all delete actions
##      - use of either HTML or BBCode for Text Content for the blocks with standard post capability
##        of phpBB using BBCode
##      - centralization of functions to a file: includes/function_portal.php
##      - portal pages with choice of displaying or not displaying forum-wide blocks
##      - block variables localization through the use of block functions
##
##   2004-04-18 - Version 1.0.1 beta
##      - forum-wide integration of the portal engine
##      - each block now has its own language file
##      - removed the user selection of layout because of the planned multi-page portal
##
##   2004-03-27 - Version 1.0.0
##      - first complete release of portal engine
##      - includes 7 blocks
##      - includes 2 layouts
##
##   2004-03-23 - Version 0.1.0 
##      - first release 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ DIY INSTUCTIONS ]------------------------------------------ 
#
Create directory var_cache under your phpbb root directory and CHMOD it to 777.

Optional:  You can create a link in your header to point to portal.php by editing page_header.php and overall_header.tpl

For a detailed information on using IM Portal, please visit http://www.integramod.com and go the knowledgebase section of the site and check the IM Portal Information category.  For questions/suggestions/requests/bug reports/downloads, go to http://www.integramod.com.  IM Portal manual is now also available at the download section of the site.

Please support the site by checking the ads.  Thanks! :)
# 
#-----[ COPY ]------------------------------------------ 
#
copy phpbbroot/*.php to *.php
copy phpbbroot/admin/*.php to admin/*.php
copy phpbbroot/blocks/*.* to blocks/*.*
copy phpbbroot/blocks/language/*.* to blocks/language/*.*
copy phpbbroot/blocks/language/lang_english/*.* to blocks/language/lang_english/*.*
copy phpbbroot/includes/*.php to includes/*.php
copy phpbbroot/templates/subSilver/*.tpl to templates/subSilver/*.tpl
copy phpbbroot/templates/subSilver/admin/*.tpl to templates/subSilver/admin/*.tpl
copy phpbbroot/templates/subSilver/blocks/*.* to templates/subSilver/blocks/*.*
copy phpbbroot/templates/subSilver/layout/*.* to templates/subSilver/layout/*.*
# 
#-----[ SQL ]------------------------------------------ 
#
CREATE TABLE phpbb_block_position (
  bpid int(10) NOT NULL auto_increment,
  pkey varchar(30) NOT NULL default '',
  bposition char(1) NOT NULL default '',
  layout int(10) NOT NULL default '1',
  PRIMARY KEY  (bpid)
) TYPE=MyISAM;

INSERT INTO phpbb_block_position VALUES (1, 'header', '@', 0);
INSERT INTO phpbb_block_position VALUES (2, 'footer', '*', 0);
INSERT INTO phpbb_block_position VALUES (3, 'right', 'r', 1);
INSERT INTO phpbb_block_position VALUES (4, 'center', 'c', 1);
INSERT INTO phpbb_block_position VALUES (5, 'center', 'c', 2);
INSERT INTO phpbb_block_position VALUES (6, 'center', 'c', 3);

CREATE TABLE phpbb_block_variable (
  bvid int(10) NOT NULL auto_increment,
  label varchar(30) NOT NULL default '',
  sub_label varchar(255) default NULL,
  config_name varchar(30) NOT NULL default '',
  field_options varchar(255) default NULL,
  field_values varchar(255) default NULL,
  type tinyint(1) NOT NULL default '0',
  block varchar(255) default NULL,
  PRIMARY KEY  (config_name),
  KEY bvid (bvid)
) TYPE=MyISAM;

INSERT INTO phpbb_block_variable VALUES (1, 'Number of news on portal', '', 'md_num_news', '', '', 1, 'forum');
INSERT INTO phpbb_block_variable VALUES (2, 'Length of news', 'Number of characters displayed', 'md_news_length', '', '', 1, 'forum');
INSERT INTO phpbb_block_variable VALUES (3, 'Poll Bar Length', 'decrease/increase the value for 1 vote bar length', 'md_poll_bar_length', '', '', 1, 'poll');
INSERT INTO phpbb_block_variable VALUES (4, 'News Forum ID(s)', 'comma delimited', 'md_news_forum_id', '', '', 1, 'forum');
INSERT INTO phpbb_block_variable VALUES (5, 'Poll Forum ID(s)', 'comma delimited', 'md_poll_forum_id', '', '', 1, 'poll');
INSERT INTO phpbb_block_variable VALUES (6, 'Number of recent topics', 'number of topics displayed', 'md_num_recent_topics', '', '', 1, 'recent_topics');
INSERT INTO phpbb_block_variable VALUES (7, 'Approve MOD installed?', 'tick if Approve MOD is installed', 'md_approve_mod_installed', '', '', 4, 'recent_topics');
INSERT INTO phpbb_block_variable VALUES (8, 'Recent Topics Style', 'choose static display or scrolling display', 'md_recent_topics_style', 'Scroll,Static', '1,0', 3, 'recent_topics');
INSERT INTO phpbb_block_variable VALUES (9, 'Search option text', 'Text displayed as the default option', 'md_search_option_text', '', '', 1, 'search');
INSERT INTO phpbb_block_variable VALUES (10, 'Header width', 'Width of forum-wide left column in pixels', 'header_width', '', '', 1, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (11, 'Footer width', 'Width of forum-wide right column in pixels', 'footer_width', '', '', 1, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (12, 'Cache File Locking', 'can avoid cache corruption under bad circumstances', 'md_cache_file_locking', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (13, 'Cache Write Control', 'detect some corrupt cache files', 'md_cache_write_control', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (14, 'Cache Read Control', 'a control key is embeded in cache file', 'md_cache_read_control', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (15, 'Cache Read Control Type', 'Type of read control (only if read control is enabled)', 'md_cache_read_type', 'md5 hash control, crc32 hash control, length only test', 'md5,crc32,strlen', 2, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (16, 'Cache File Name Protection', '', 'md_cache_filename_protect', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable VALUES (17, 'Cache Automatic Serialization', 'Enable / disable automatic serialization', 'md_cache_serialize', '', '', 4, '@Portal Config');

CREATE TABLE phpbb_blocks (
  bid int(10) NOT NULL auto_increment,
  title varchar(60) NOT NULL default '',
  content text NOT NULL,
  bposition char(1) NOT NULL default '',
  weight int(10) NOT NULL default '1',
  active tinyint(1) NOT NULL default '1',
  blockfile varchar(255) NOT NULL default '',
  view tinyint(1) NOT NULL default '0',
  layout int(10) NOT NULL default '1',
  cache tinyint(1) NOT NULL default '0',
  cache_time int(10) NOT NULL default '0',
  block_bbcode_uid varchar(10) default NULL,
  type tinyint(1) NOT NULL default '1',
  border tinyint(1) NOT NULL default '1',
  titlebar tinyint(1) NOT NULL default '1',
  background tinyint(1) NOT NULL default '1',
  local tinyint(1) NOT NULL default '0',
  groups tinytext NOT NULL,
  PRIMARY KEY  (bid)
) TYPE=MyISAM;

INSERT INTO phpbb_blocks VALUES (1, 'Board Navigation', '<table width="100%" cellpadding="0" cellspacing="1" border="0">\r\n<tr>\r\n<td align="left"><span class="genmed" style="line-height: 150%">\r\n<a href="portal.php">Home</a><br />\r\n<a href="index.php">Forum</a><br />\r\n<a href="memberlist.php">Memberlist</a><br />\r\n<a href="faq.php">FAQ</a><br />\r\n<a href="search.php">Search</a><br />\r\n</span></td>\r\n</tr>\r\n</table>', '@', 2, 1, '', 0, 0, 0, 0, '', 0, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (2, 'Statistics', '', 'r', 3, 1, 'blocks_imp_statistics', 0, 1, 1, 43200, '', 1, 1, 1, 1, 0, '5');
INSERT INTO phpbb_blocks VALUES (3, 'Links', '<table width="100%" cellpadding="0" cellspacing="1" border="0">\r\n<tr>\r\n<td class="row1" align="center"><a href="http://phpbbintegramod.sourceforge.net" target="_blank" class="gen">IntegraMOD</a></td>\r\n</tr>\r\n</table>', 'r', 2, 1, '', 0, 1, 0, 0, '', 0, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (4, 'Welcome to IM Portal', '<table cellspacing="0" cellpadding="0" border="0" width="100%">\r\n<tr>\r\n<td align="center"><span class="gen">\r\nWelcome to IM Portal<br /><br />For questions, comments and suggestions, please visit <a href="http://www.integramod.com">IntegraMOD</a>\r\n</span>\r\n</td>\r\n</tr>\r\n</table>', 'c', 2, 1, '', 0, 1, 0, 0, '', 0, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (5, 'News', '', 'c', 3, 1, 'blocks_imp_forum', 0, 1, 0, 0, '', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (6, 'User Block', '', '@', 3, 1, 'blocks_imp_user_block', 0, 0, 0, 0, '', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (7, 'Who is Online', '', '@', 4, 1, 'blocks_imp_online_users', 0, 0, 1, 300, '', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (8, 'Poll', 'hkghk', 'r', 4, 1, 'blocks_imp_poll', 0, 1, 0, 0, '', 0, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (9, 'Recent Topics', '', 'r', 1, 1, 'blocks_imp_recent_topics', 0, 1, 1, 300, '', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (10, 'Search', '', '@', 5, 1, 'blocks_imp_search', 0, 0, 1, 1000000000, '', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (11, 'sample block', '[size=12:81ef439b94][b:81ef439b94][color=red:81ef439b94]This is just a sample block[/color:81ef439b94][/b:81ef439b94] showing the capabilities of [b:81ef439b94][color=green:81ef439b94]IM Portal[/color:81ef439b94][/b:81ef439b94] with the use of BBCodes.[/size:81ef439b94] \r\n\r\n :lol:  8)  :o  :( \r\n[quote:81ef439b94]This version of IM Portal uses a multi-page feature to create more than one page for your portal.  Try visiting this address: [b:81ef439b94]http://www.myforum.com/portal.php?page=2[/b:81ef439b94]. Replace www.myforum.com with the correct location[/quote:81ef439b94]The block below (Welcome to IM Portal) is an example of a block using HTML.', 'c', 1, 1, '', 0, 1, 0, 0, '81ef439b94', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (12, 'Sample 1', 'This page shows an example of the multi-page feature of IM Portal.  This page also displays the forum-wide blocks.\r\n\r\n[code:1:82bdfbd9b5]Try to visit&#58; http&#58;//www.myforum.com/portal.php?page=3[/code:1:82bdfbd9b5]', 'c', 1, 1, '', 0, 2, 0, 0, '82bdfbd9b5', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (13, 'Sample 6', 'This block also shows the [b:0c6a883c90][color=orange:0c6a883c90]multi-page feature of IM Portal[/color:0c6a883c90][/b:0c6a883c90].  But this time, it does not display the forum-wide blocks.\r\n\r\nYou can now proceed to the [b:0c6a883c90][color=blue:0c6a883c90]ACP[/color:0c6a883c90][/b:0c6a883c90] and delete the sample layouts/pages in the layout management page.', 'c', 1, 1, '', 0, 3, 0, 0, '0c6a883c90', 1, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (14, 'News', '', 'c', 4, 1, 'blocks_imp_forum', 0, 3, 0, 0, '', 0, 1, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (15, 'Sample 2', 'This is the new feature of IM Portal which enables a block with the following options:[list:8466b58e05][*:8466b58e05]with or without titlebar\r\n[*:8466b58e05]with or without border\r\n[*:8466b58e05]with or without background[/list:u:8466b58e05]\r\nThis block is without a titlebar, border and background', 'c', 2, 1, '', 0, 2, 0, 0, '8466b58e05', 1, 0, 0, 0, 0, '');
INSERT INTO phpbb_blocks VALUES (16, 'Sample 3', 'Without titlebar only  :o', 'c', 3, 1, '', 0, 2, 0, 0, '7e13fbbacc', 1, 1, 0, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (17, 'Sample 4', 'Without background only  :wink:', 'c', 4, 1, '', 0, 2, 0, 0, '5b8176554c', 1, 1, 1, 0, 0, '');
INSERT INTO phpbb_blocks VALUES (18, 'Sample 5', 'Without border  :arrow:  :idea:  :arrow:', 'c', 5, 1, '', 0, 2, 0, 0, 'ed31156971', 1, 0, 1, 1, 0, '');
INSERT INTO phpbb_blocks VALUES (19, 'Sample 7', 'Take note that pages and blocks can have different permissions.  There are 2 kinds of permissions to set, per user level and per usergroups.  It is allowed to mix permissions but it is wise to set the user level to registered when usergroups are used (e.g. making a page only accessible for a specific usergroup)  :wink:', 'c', 2, 1, '', 0, 3, 0, 0, '16703bc74c', 1, 1, 0, 0, 0, '');
INSERT INTO phpbb_blocks VALUES (20, 'Sample 8', 'To support localization for IM Portal, titlebars can also be localized so titles being displayed, instead of being retrieved from the database will be retrieved from the language files.  This only applies for those blocks which has a language file.  :shock:  8)', 'c', 3, 1, '', 0, 3, 0, 0, '48d2dd24ac', 1, 0, 1, 0, 0, '');

CREATE TABLE phpbb_layout (
  lid int(10) unsigned NOT NULL auto_increment,
  name varchar(100) NOT NULL default '',
  template varchar(100) NOT NULL default '',
  forum_wide tinyint(1) NOT NULL default '1',
  view tinyint(1) NOT NULL default '0',
  groups tinytext NOT NULL,
  PRIMARY KEY  (lid)
) TYPE=MyISAM;

INSERT INTO phpbb_layout VALUES (1, 'IM Portal Default', 'portal_body.tpl', 1, 0, '');
INSERT INTO phpbb_layout VALUES (2, 'Sample 1', 'layout1.tpl', 1, 0, '');
INSERT INTO phpbb_layout VALUES (3, 'Sample 2', 'layout1.tpl', 0, 0, '');

CREATE TABLE phpbb_portal_config (
  id int(10) unsigned NOT NULL auto_increment,
  config_name varchar(255) NOT NULL default '',
  config_value varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

INSERT INTO phpbb_portal_config VALUES (1, 'default_portal', '1');
INSERT INTO phpbb_portal_config VALUES (2, 'portal_header', '1');
INSERT INTO phpbb_portal_config VALUES (3, 'portal_tail', '0');
INSERT INTO phpbb_portal_config VALUES (4, 'cache_enabled', '1');
INSERT INTO phpbb_portal_config VALUES (5, 'md_news_length', '250');
INSERT INTO phpbb_portal_config VALUES (6, 'md_news_forum_id', '1');
INSERT INTO phpbb_portal_config VALUES (7, 'md_num_news', '5');
INSERT INTO phpbb_portal_config VALUES (8, 'md_search_option_text', 'IM Portal');
INSERT INTO phpbb_portal_config VALUES (9, 'md_num_recent_topics', '10');
INSERT INTO phpbb_portal_config VALUES (10, 'md_approve_mod_installed', '0');
INSERT INTO phpbb_portal_config VALUES (11, 'md_recent_topics_style', '0');
INSERT INTO phpbb_portal_config VALUES (12, 'md_poll_bar_length', '40');
INSERT INTO phpbb_portal_config VALUES (13, 'md_poll_forum_id', '1');
INSERT INTO phpbb_portal_config VALUES (14, 'header_width', '150');
INSERT INTO phpbb_portal_config VALUES (15, 'footer_width', '');
INSERT INTO phpbb_portal_config VALUES (16, 'md_cache_file_locking', '1');
INSERT INTO phpbb_portal_config VALUES (17, 'md_cache_write_control', '1');
INSERT INTO phpbb_portal_config VALUES (18, 'md_cache_read_control', '1');
INSERT INTO phpbb_portal_config VALUES (19, 'md_cache_read_type', 'md5');
INSERT INTO phpbb_portal_config VALUES (20, 'md_cache_filename_protect', '0');
INSERT INTO phpbb_portal_config VALUES (21, 'md_cache_serialize', '1');

# 
#-----[ OPEN ]------------------------------------------ 
#
includes/constants.php
# 
#-----[ FIND ]------------------------------------------ 
#
?>
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
//
// IM Portal http://www.integramod.com
//
define('BLOCKS_TABLE', $table_prefix.'blocks');
define('BLOCK_POSITION_TABLE', $table_prefix.'block_position');
define ('LAYOUT_TABLE',$table_prefix.'layout');
define ('PORTAL_CONFIG_TABLE',$table_prefix.'portal_config');
define ('BLOCK_VARIABLE_TABLE',$table_prefix.'block_variable');

# 
#-----[ OPEN ]------------------------------------------ 
#
includes/page_header.php
# 
#-----[ FIND ]------------------------------------------ 
#
define('HEADER_INC', TRUE);
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

//
// IM Portal http://www.integramod.com
//
if(!defined('PORTAL_INIT'))
{
	include($phpbb_root_path . 'includes/functions_portal.' . $phpEx);
	portal_config_init($portal_config);
	include_once($phpbb_root_path . 'includes/lite.'.$phpEx);
	$options = array(
		'cacheDir' => $phpbb_root_path . 'var_cache/',
		'fileLocking' => $portal_config['md_cache_file_locking'],
		'writeControl' => $portal_config['md_cache_write_control'],
		'readControl' => $portal_config['md_cache_read_control'],
		'readControlType' => $portal_config['md_cache_read_type'],
		'fileNameProtection' => $portal_config['md_cache_filename_protect'],
		'automaticSerialization' => $portal_config['md_cache_serialize']
	);
	$var_cache = new Cache_Lite($options);
	define('PORTAL_INIT', TRUE);
}
# 
#-----[ FIND ]------------------------------------------ 
#
$template->pparse('overall_header');
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
//
// IM Portal http://www.integramod.com
//

// debug forum wide Portal
/*if($layout_forum_wide_flag)
	$temp_debug = 1;
else
	$temp_debug = 0;
die('debug: ' . strval(empty($gen_simple_header)) . ' | ' . strval($temp_debug) . ' | ' . strval($portal_config['portal_header']) . ' | ' . strval(defined('HAS_DIED')) . ' | ' . strval(defined('IN_LOGIN')));*/
// debug forum wide Portal

if(empty($gen_simple_header))
{
	if(!$layout_forum_wide_flag&&$portal_config['portal_header']&&(!defined('HAS_DIED'))&&(!defined('IN_LOGIN')))
	{
		$template->set_filenames(array(
			'portal_header'         => 'portal_page_header.tpl')
		);
		portal_parse_blocks($portal_config['default_portal'], TRUE, 'header');
		$template->assign_var('HEADER_WIDTH', $portal_config['header_width']);
		$template->assign_var('PORTAL_HEADER', portal_assign_var_from_handle($template, 'portal_header'));
	}
}

# 
#-----[ OPEN ]------------------------------------------ 
#
includes/page_tail.php
# 
#-----[ FIND ]------------------------------------------ 
#
$template->pparse('overall_footer');
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
//
// IM Portal http://www.integramod.com
//

// debug forum wide Portal
/*if($layout_forum_wide_flag)
	$temp_debug = 1;
else
	$temp_debug = 0;
die('debug: ' . strval($temp_debug) . ' | ' . strval($portal_config['portal_tail']) . ' | ' . strval(defined('HAS_DIED')) . ' | ' . strval(defined('IN_LOGIN')));*/
// debug forum wide Portal

if(!$layout_forum_wide_flag&&$portal_config['portal_tail']&&(!defined('HAS_DIED'))&&(!defined('IN_LOGIN')))
{
	$template->set_filenames(array(
		'portal_tail'         => 'portal_page_tail.tpl')
	);
	portal_parse_blocks($portal_config['default_portal'], TRUE, 'tail');
	$template->assign_var('FOOTER_WIDTH', $portal_config['footer_width']);
	$template->assign_var('PORTAL_TAIL', portal_assign_var_from_handle($template, 'portal_tail'));
}

# 
#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_main.php
# 
#-----[ FIND ]------------------------------------------ 
#
?>
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
//
// IM Portal http://www.integramod.com
//
$lang['Home'] = 'Home';

# 
#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_admin.php
# 
#-----[ FIND ]------------------------------------------ 
#
?>
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
//
// IM Portal http://www.integramod.com
//
$lang['BP_Title'] = 'Blocks Position Tag';
$lang['BP_Explain'] = 'From this control panel, you can add, edit or delete blocks position that can be used in IM Portal.  The default positions are \'header\', \'footer\', \'right\' and \'center\'.  These positions corresponds to the layout being used for a specific portal page.  Only existing positions per portal page must be added here. Position keys that are not existing in the specified layout will not appear in the portal page.  Each position tag key and character must be unique per portal page.';
$lang['BP_Position'] = 'Position character';
$lang['BP_Key'] = 'Position Tag Key';
$lang['BP_Layout'] = 'Portal Page';
$lang['BP_Add_Position'] = 'Add New Position';
$lang['No_bp_selected'] = 'No position selected for editing';
$lang['BP_Edit_Position'] = 'Edit block position';
$lang['Must_enter_bp'] = 'You must enter a position tag key, position character and portal page';
$lang['BP_updated'] = 'Block position updated';
$lang['BP_added'] = 'Block position added';
$lang['Click_return_bpadmin'] = 'Click %sHere%s to return to Blocks Position Administration';
$lang['BP_removed'] = 'Block position removed';
$lang['Portal_wide'] = 'Portal Wide';

$lang['No_layout_selected'] = 'No portal page selected for editing';
$lang['Layout_Title'] = 'Portal Page';
$lang['Layout_Explain'] = 'From this control panel, you can add, edit or delete layout information for your portal pages.  Multiple portal pages can use the same layout.  The layout template file selected must reside in the layout directory under your forum template directory.  You are not allowed to delete the forum default portal page.  Deleting a portal page also deletes the corresponding block positions for that page and all the blocks assigned to it';
$lang['Layout_Name'] = 'Name';
$lang['Layout_Template'] = 'Template File';
$lang['Layout_Edit'] = 'Edit portal page';
$lang['Layout_Page'] = 'Page ID';
$lang['Layout_View'] = 'View by';
$lang['Layout_Forum_wide'] = 'Forum-wide blocks?';
$lang['Must_enter_layout'] = 'You must enter a name and a template file';
$lang['Layout_updated'] = 'Portal Page Updated';
$lang['Click_return_layoutadmin'] = 'Click %sHere%s to return to Portal Page Administration';
$lang['Layout_added'] = 'Portal Page added';
$lang['Layout_removed'] = 'Portal Page removed';
$lang['Layout_Add'] = 'Add Portal Page';
$lang['Layout_BP_added'] = 'Layout Config file available: Block Position Tags automatically inserted';
$lang['Layout_default'] = 'Default';
$lang['Layout_make_default'] = 'Make Default';

$lang['Blocks_Title'] = 'Blocks Management';
$lang['Blocks_Explain'] = 'From this control panel, you can add, edit, delete and move blocks for each available portal page.  A block template must exist for every block file added.  When a block file is specified, the content filed is being disregarded by the portal engine.';
$lang['Choose_Layout'] = 'Choose portal page';
$lang['B_Title'] = 'Block Title';
$lang['B_Position'] = 'Block Position';
$lang['B_Active'] = 'Active?';
$lang['B_Display'] = 'Content';
$lang['B_HTML'] = 'HTML';
$lang['B_BBCode'] = 'BBCode';
$lang['B_Type'] = 'Type';
$lang['B_Border'] = 'Show Border';
$lang['B_Titlebar'] = 'Show Titlebar';
$lang['B_Background'] = 'Show BG';
$lang['B_Local'] = 'Localize Titlebar';
$lang['B_Cache'] = 'Cache?';
$lang['B_Cachetime'] = 'Cache Duration';
$lang['B_Groups'] = 'Usergroups';
$lang['B_All'] = 'All';
$lang['B_Guests'] = 'Guests Only';
$lang['B_Reg'] = 'Registered Users';
$lang['B_Mod'] = 'Moderators';
$lang['B_Admin'] = 'Administrators';
$lang['B_None'] = 'None';
$lang['B_Layout'] = 'Portal Page';
$lang['B_Page'] = 'Page ID';
$lang['B_Add'] = 'Add Blocks';
$lang['Yes'] = 'Yes';
$lang['No'] = 'No';
$lang['B_Text'] = 'Text';
$lang['B_File'] = 'Block File';
$lang['B_Move_Up'] = 'Move Up';
$lang['B_Move_Down'] = 'Move Down';
$lang['B_View'] = 'View By';
$lang['No_blocks_selected'] = 'No block selected';
$lang['B_Content'] = 'Content';
$lang['B_Blockfile'] = 'Block File';
$lang['Block_Edit'] = 'Block Edit';
$lang['Block_updated'] = 'Block updated';
$lang['Must_enter_block'] = 'You must enter a block title';
$lang['Block_added'] = 'Block added';
$lang['Click_return_blocksadmin'] = 'Click %sHere%s to return to Blocks Management';
$lang['Block_removed'] = 'Block removed';
$lang['B_BV_added'] = 'Block Config file available: Block Variables automatically inserted';

$lang['BV_Title'] = 'Blocks Variables';
$lang['BV_Explain'] = 'From this control panel, you can add, edit or delete blocks config variables that are used in blocks in IM Portal.  These variables can then be configured through the Portal Configuration page to personalize your portal.';
$lang['BV_Label'] = 'Field Label';
$lang['BV_Sub_Label'] = 'Field Info';
$lang['BV_Name'] = 'Config Name';
$lang['BV_Options'] = 'Options';
$lang['BV_Values'] = 'Field Values';
$lang['BV_Type'] = 'Control Type';
$lang['BV_Block'] = 'Block';
$lang['BV_Add_Variable'] = 'Add Block Variable';
$lang['No_bv_selected'] = 'No block variable selected';
$lang['BV_Edit_Variable'] = 'Edit block variable';
$lang['Must_enter_bv'] = 'You must enter a field label and config name';
$lang['BV_updated'] = 'Block variable updated';
$lang['BV_added'] = 'Block variable added';
$lang['Click_return_bvadmin'] = 'Click %sHere%s to return to Blocks Variables Administration';
$lang['Config_Name_Explain'] = 'Must have no space';
$lang['Field_Options_Explain'] = 'Mandatory for dropdown lists and<br />radio buttons (comma delimited).';
$lang['Field_Values_Explain'] = 'Mandatory for dropdown lists and<br />radio buttons (comma delimited).';
$lang['BV_removed'] = 'Block variable removed';

$lang['Config_updated'] = 'Portal configuration updated';
$lang['Click_return_config'] = 'Click %sHere%s to return to Portal Configuration';
$lang['Portal_Config'] = 'IM Portal Configuration';
$lang['Portal_Explain'] = 'From this control panel, you can set all the configurations needed for your portal.  Block variables listed in this page can be created/updated in Blocks Variables configuration page';
$lang['Portal_General_Config'] = 'General Configuration';
$lang['Default_Portal'] = 'Default Portal Page';
$lang['Default_Portal_Explain'] = 'Homepage of the forum';
$lang['Cache_Enabled'] = 'Enable cache system';
$lang['Cache_Enabled_Explain'] = 'For faster loading of portal related information';
$lang['Portal_Header'] = 'Enable system-wide portal header';
$lang['Portal_Header_Explain'] = 'Always show the left block panel';
$lang['Portal_Tail'] = 'Enable system-wide portal footer';
$lang['Portal_Tail_Explain'] = 'Always show the right block panel';
$lang['Confirm_delete_item'] = 'Are you sure you want to delete this item?';
$lang['Cache_cleared'] = 'Cache files removed';

$lang['bbcode_b_help'] = 'Bold text: [b]text[/b]  (alt+b)';
$lang['bbcode_i_help'] = 'Italic text: [i]text[/i]  (alt+i)';
$lang['bbcode_u_help'] = 'Underline text: [u]text[/u]  (alt+u)';
$lang['bbcode_q_help'] = 'Quote text: [quote]text[/quote]  (alt+q)';
$lang['bbcode_c_help'] = 'Code display: [code]code[/code]  (alt+c)';
$lang['bbcode_l_help'] = 'List: [list]text[/list] (alt+l)';
$lang['bbcode_o_help'] = 'Ordered list: [list=]text[/list]  (alt+o)';
$lang['bbcode_p_help'] = 'Insert image: [img]http://image_url[/img]  (alt+p)';
$lang['bbcode_w_help'] = 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]  (alt+w)';
$lang['bbcode_a_help'] = 'Close all open bbCode tags';
$lang['bbcode_s_help'] = 'Font color: [color=red]text[/color]  Tip: you can also use color=#FF0000';
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';

$lang['Emoticons'] = 'Emoticons';
$lang['More_emoticons'] = 'View more Emoticons';

$lang['Font_color'] = 'Font colour';
$lang['color_default'] = 'Default';
$lang['color_dark_red'] = 'Dark Red';
$lang['color_red'] = 'Red';
$lang['color_orange'] = 'Orange';
$lang['color_brown'] = 'Brown';
$lang['color_yellow'] = 'Yellow';
$lang['color_green'] = 'Green';
$lang['color_olive'] = 'Olive';
$lang['color_cyan'] = 'Cyan';
$lang['color_blue'] = 'Blue';
$lang['color_dark_blue'] = 'Dark Blue';
$lang['color_indigo'] = 'Indigo';
$lang['color_violet'] = 'Violet';
$lang['color_white'] = 'White';
$lang['color_black'] = 'Black';

$lang['Font_size'] = 'Font size';
$lang['font_tiny'] = 'Tiny';
$lang['font_small'] = 'Small';
$lang['font_normal'] = 'Normal';
$lang['font_large'] = 'Large';
$lang['font_huge'] = 'Huge';

$lang['Close_Tags'] = 'Close Tags';
$lang['Styles_tip'] = 'Tip: Styles can be applied quickly to selected text.';

# 
#-----[ OPEN ]------------------------------------------ 
#
login.php
# 
#-----[ FIND ]------------------------------------------ 
#
redirect(append_sid("index.$phpEx", true));
# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
				redirect(append_sid("portal.$phpEx", true));
# 
#-----[ FIND ]------------------------------------------ 
#
$url = ( !empty($HTTP_POST_VARS['redirect'])
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
index
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
#
portal
# 
#-----[ FIND ]------------------------------------------ 
#
redirect(append_sid("index.$phpEx", true));
# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
			redirect(append_sid("portal.$phpEx", true));
# 
#-----[ FIND ]------------------------------------------ 
#
$url = ( !empty($HTTP_POST_VARS['redirect'])
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
index
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
#
portal
# 
#-----[ FIND ]------------------------------------------ 
#
redirect(append_sid("index.$phpEx", true));
# 
#-----[ REPLACE ]------------------------------------------ 
#
		redirect(append_sid("portal.$phpEx", true));
# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/overall_header.tpl
# 
#-----[ FIND ]------------------------------------------ 
#
</table></td>
</tr>
</table>
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
	 {PORTAL_HEADER}
	 <td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
	 <td valign="top">
# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/overall_footer.tpl
# 
#-----[ FIND ]------------------------------------------ 
#
<div
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	 {PORTAL_TAIL}
	 <td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
</tr>
</table>
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 