|
From: OryNider <ory...@us...> - 2008-03-13 03:27:54
|
Update of /cvsroot/mxbb/mx_smartor In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13297 Modified Files: Tag: core28x album.php album_lists.php db_install.php db_uninstall.php db_upgrade.php hierarchy_db_migrate.php mx_install_readme.htm welcome.php Log Message: upgrade to 2.0.1 gold Index: album.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album.php,v retrieving revision 1.17.2.8 retrieving revision 1.17.2.9 diff -C2 -d -r1.17.2.8 -r1.17.2.9 *** album.php 12 Mar 2008 22:25:43 -0000 1.17.2.8 --- album.php 13 Mar 2008 03:26:14 -0000 1.17.2.9 *************** *** 34,83 **** //ini_set('display_errors', '1'); ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! define('IN_PORTAL', true); ! $mx_root_path = '../../'; ! $module_root_path = './'; // ! // Let's include some stuff... // ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! include_once($mx_root_path . 'common.' . $phpEx); // ! // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // ! // End session management // ! $block_id = ( !empty($HTTP_GET_VARS['block_id']) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if( empty($block_id) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'Smartor_album' LIMIT 1"; ! if(!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql); } ! $row = $db->sql_fetchrow($result); ! $block_id = $row['block_id']; } - $is_block = FALSE; } else { ! // ! // Read block Configuration ! $title = $mx_block->block_info['block_title']; ! $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); ! $is_block = true; ! ! global $images, $is_block; ! } ! if (empty($album_root_path)) ! { ! $album_root_path = $module_root_path . 'album_mod/'; } --- 34,208 ---- //ini_set('display_errors', '1'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! ! if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './'; ! $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! ! include($phpbb_root_path . 'common.' . $phpEx); ! include($mx_mod_path . "includes/functions_required.$phpEx"); ! ! //Check if forum_hack is installed ! if (!isset($mx_root_path)) ! { ! $mx_root_path = './'; ! @define('IN_PORTAL', true); ! include_once($mx_mod_path . "includes/mx_constants.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); ! } ! else ! { ! @define('IN_PORTAL', true); ! include_once($mx_root_path . "includes/mx_constants.$phpEx"); ! include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); ! ! //Redefine mx_root_path to include phpbb page_tail.php ! $mx_root_path = $phpbb_root_path; ! } ! ! require($mx_mod_path . "includes/functions_core.$phpEx"); ! require($mx_mod_path . "includes/functions_styles.$phpEx"); ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! ! //@ini_set( 'display_errors', '1' ); ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! //error_reporting(E_ALL & ~E_NOTICE); ! ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // ! // Instatiate the mx_cache class // ! $mx_cache = new mx_cache(); ! // ! // Get mxBB config settings // ! //$portal_config = $mx_cache->obtain_mxbb_config(); ! // ! // instatiate the mx_request_vars class // ! $mx_request_vars = new mx_request_vars(); ! ! // ! // Page selector ! // ! $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! $is_block = false; ! ! // ! // instatiate the mx_user class ! // ! $mx_user = new mx_user(); ! ! if (file_exists("./modcp.$phpEx")) // phpBB2 { ! define('PORTAL_BACKEND', 'phpbb2'); ! $tplEx = 'tpl'; ! ! // ! // Start user session ! // - populate $userdata and $lang ! // ! $mx_user->init($user_ip, $page_id, false); ! //init_userprefs($userdata); ! $mx_user->init_style(); //Overwrite template class ! ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if (!$userdata['user_level'] == ADMIN) { ! die('Only admins may run this script!!!'); } ! */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! ! } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 ! { ! define('PORTAL_BACKEND', 'phpbb3'); ! $tplEx = 'html'; ! ! // ! // Start user session ! // - populate $userdata and $lang ! // ! $mx_user->init($user_ip, $page_id, false); ! $user->setup(); ! // ! // End session management ! // ! ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if ($userdata['user_type'] != USER_FOUNDER) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/bbcode.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions_post.$phpEx"); ! } ! else ! { ! die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else { ! if( !defined('IN_PORTAL') || !is_object($mx_block)) ! { ! define('IN_PORTAL', true); ! $mx_root_path = '../../'; ! $module_root_path = './'; ! // ! // Let's include some stuff... ! // ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! include_once($mx_root_path . 'common.' . $phpEx); ! // ! // Start session management ! // ! $mx_user->init($user_ip, PAGE_INDEX); ! // ! // End session management ! // ! $block_id = ( !empty($HTTP_GET_VARS['block_id']) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if( empty($block_id) ) ! { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'Smartor_album' LIMIT 1"; ! if(!$result = $db->sql_query($sql)) ! { ! mx_message_die(GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $block_id = $row['block_id']; ! } ! $is_block = FALSE; ! } ! else ! { ! // ! // Read block Configuration ! $title = $mx_block->block_info['block_title']; ! $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); ! $is_block = true; ! ! global $images, $is_block; ! } } *************** *** 85,88 **** --- 210,214 ---- // Get general album information // + $album_root_path = $module_root_path . 'album_mod/'; include($album_root_path . 'album_common.'.$phpEx); |