|
From: Jon O. <jon...@us...> - 2008-07-12 20:21:22
|
Update of /cvsroot/mxbb/core/contrib/CategoriesHierarchyMod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20202 Added Files: mx_functions_ch.php readme.txt Log Message: moved to contrib folder --- NEW FILE: mx_functions_ch.php --- <?php /** * * @package CH * @version $Id: mx_functions_ch.php,v 1.1 2008/07/12 20:21:14 jonohlsson Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * @internal * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // // This code is part of common.php in Categories Hierarchy 2.1.0 // $starttime = microtime(); $trc_loc_start = $trc_loc_end = 0; // include basic classes def include($phpbb_root_path . 'includes/class_config.' . $phpEx); include($phpbb_root_path . 'includes/class_groups.' . $phpEx); // get config $config = new config_class(); if ( !$config->read() ) { define('RUN_CH_INSTALL', true); } $board_config = $config->data; // let's run the upgrade script if ( !defined('IN_LOGIN') && !defined('IN_INSTALL') && (($config->data['mod_cat_hierarchy'] != CH_CURRENT_VERSION) || defined('RUN_CH_INSTALL')) ) { header('Location: ' . $phpbb_root_path . 'install_cat/install.' . $phpEx . (empty($SID) ? '' : '?' . $SID)); exit; } // user objects include($config->url('includes/class_user')); include($config->url('includes/class_auth')); // instantiate some objects $user = new user(); $censored_words = new words(); $icons = new icons(); $navigation = new navigation(); $themes = ''; $smilies = new smilies(); // People never read achievement messages after after having seen "Succesfull !", tss tss :) if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } // messages queue $message_queue = ''; @include($config->url('includes/class_message')); $message_queue = !defined('CH_message_queue') ? '' : new message_queue(); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); ?> --- NEW FILE: readme.txt --- In includes/sessions/phpbb2/core.php FIND // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); REPLACE WITH if( @file_exists($phpbb_root_path . 'includes/class_config.' . $phpEx) && @file_exists($phpbb_root_path . 'includes/class_groups.' . $phpEx) ) { include($mx_root_path . 'includes/mx_functions_ch.'.$phpEx); } else { // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); } |