|
From: FlorinCB <ory...@us...> - 2008-09-08 00:07:35
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3437 Modified Files: mx_install.php Log Message: This fix is majore, and will allow installing mxp with any phpBB forum available :)))))))))))))))))) Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** mx_install.php 5 Sep 2008 16:23:49 -0000 1.103 --- mx_install.php 8 Sep 2008 00:07:28 -0000 1.104 *************** *** 583,586 **** --- 583,601 ---- @define('PORTAL_BACKEND', $portal_backend); + switch (PORTAL_BACKEND) + { + case 'internal': + + case 'phpbb2': + + $tplEx = 'tpl'; + break; + + case 'phpbb3': + + $tplEx = 'html'; + break; + } + if ($mx_request_vars->is_post('phpbb')) { *************** *** 906,916 **** $sql[] = "INSERT INTO " . $mx_table_prefix . "column_block VALUES('3', '8', '10')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('8', '30', 'phpBB Index', 'phpBB Index Block', 'mx_forum.php', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('14', '30', 'MXP Polls', 'MXP Polls', 'mx_poll.php', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('2', '30', 'phpBB Announcements', 'phpBB Announcements Block', 'mx_announce.php', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('31', '30', 'Last Posts', 'phpBB Last Posts Function', 'mx_last_msg.php', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('41', '30', 'Statistics', 'Site Statistics Function', 'mx_statistics.php', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "page VALUES('2', 'Forum', 'This is the phpBB Forum startpage', '0', '', '20', 'icon_forum.gif', '', '', '', '', '1', '0', '0', '0', '-1', '-1', '', '', '', '0', 'a:1:{i:0;s:0:\"\";}', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "page VALUES('4', 'Sitestats', 'Sitestats page', '0', '', '40', 'icon_stats.gif', '', '', '', '', '1', '0', '0', '0', '-1', '-1', '', '', '', '0', 'a:1:{i:0;s:0:\"\";}', '-1')"; --- 921,931 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "column_block VALUES('3', '8', '10')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('8', '30', 'phpBB Index', 'phpBB Index Block', 'mx_forum." . $phpEx . "', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('14', '30', 'MXP Polls', 'MXP Polls', 'mx_poll." . $phpEx . "', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('2', '30', 'phpBB Announcements', 'phpBB Announcements Block', 'mx_announce." . $phpEx . "', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('31', '30', 'Last Posts', 'phpBB Last Posts Function', 'mx_last_msg." . $phpEx . "', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "function VALUES('41', '30', 'Statistics', 'Site Statistics Function', 'mx_statistics." . $phpEx . "', '')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "page VALUES('2', 'Forum', 'This is the phpBB Forum startpage', '0', '', '20', 'icon_forum.gif', '', '', '', '', '1', '0', '0', '0', '-1', '-1', 'overall_header_navigation_phpbb." . $tplEx . "', '', '', '0', 'a:1:{i:0;s:0:\"\";}', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "page VALUES('4', 'Sitestats', 'Sitestats page', '0', '', '40', 'icon_stats.gif', '', '', '', '', '1', '0', '0', '0', '-1', '-1', '', '', '', '0', 'a:1:{i:0;s:0:\"\";}', '-1')"; *************** *** 1109,1112 **** --- 1124,1128 ---- // If not, we'll try to search from our own directory. // + print_r("Warning: Access to our parent directory is restricted."); $phpbb_search_path = $mx_absolute_path; } *************** *** 1190,1199 **** // Now, list all phpBB backend options available // ! for( $i = 0; $i < $files_cnt; $i++ ) { // // Get the phpBB base dir (computed from the document root), for example /phpBB/, /forum/ or /... // ! $phpbb_base_path = '/' . ( empty($files_ary[$i]) ? '' : ( $files_ary[$i] . '/' ) ); // --- 1206,1215 ---- // Now, list all phpBB backend options available // ! for($i = 0; $i < $files_cnt; $i++) { // // Get the phpBB base dir (computed from the document root), for example /phpBB/, /forum/ or /... // ! $phpbb_base_path = '/' . (!$files_ary[$i] ? '' : $files_ary[$i] . '/'); // *************** *** 1244,1250 **** if( !isset($phpbb_info['dbms']) || !array_key_exists($phpbb_info['dbms'], $available_dbms) ) { ! continue; } ! // // Try to Connect to this phpBB Database --- 1260,1266 ---- if( !isset($phpbb_info['dbms']) || !array_key_exists($phpbb_info['dbms'], $available_dbms) ) { ! //continue; } ! // // Try to Connect to this phpBB Database *************** *** 1259,1263 **** // Get the phpBB URL // ! $phpbb_url = get_phpbb_url($phpbb_info['table_prefix']); // --- 1275,1279 ---- // Get the phpBB URL // ! $phpbb_url = get_phpbb_url($phpbb_info['table_prefix'], $portal_backend); // |