|
From: Jon O. <jon...@us...> - 2005-10-23 18:49:09
|
Update of /cvsroot/mxbb/mx_act In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21756/modules/mx_act Modified Files: activity.php newscore.php Log Message: Updated all blocks to use the new $mx_block->get_parameters() api, instead of old red_block_config() function Index: newscore.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/newscore.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** newscore.php 1 Oct 2005 14:11:39 -0000 1.6 --- newscore.php 23 Oct 2005 18:48:57 -0000 1.7 *************** *** 19,30 **** */ - /* - define('IN_PHPBB', true); - $phpbb_root_path = './'; - include($phpbb_root_path . 'extension.inc'); - include($phpbb_root_path . 'common.'.$phpEx); - include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); - */ - // MX if ( !function_exists( 'read_block_config' ) ) { --- 19,22 ---- *************** *** 56,64 **** else { ! ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); --- 48,55 ---- else { ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); *************** *** 66,69 **** --- 57,61 ---- global $images; } + // Need to find Page id if ( empty( $page_id ) ) *************** *** 89,111 **** $page_id = get_page_id( $act_block_id ); - /* - $temp_list = $_SESSION['mx_pages']; - while ( list( $page_idd, $page_roww ) = each( $temp_list ) ) - { - $block_countt = count( $page_roww['blocks'] ); - - for( $j = 0; $j < $block_countt; $j++ ) - { - $block_idd = $page_roww['blocks'][$j]['block_id']; - - if ( $act_block_id == $block_idd ) - { - $page_id = str_replace( 'page_', '', $page_idd ); - break; - } - } - } - */ - $is_block = true; } --- 81,84 ---- Index: activity.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/activity.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** activity.php 1 Oct 2005 14:11:39 -0000 1.6 --- activity.php 23 Oct 2005 18:48:57 -0000 1.7 *************** *** 19,81 **** */ ! if ( !function_exists( 'read_block_config' ) ) { ! define( 'IN_PORTAL', true ); ! $mx_root_path = '../../'; ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); ! ! // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! ! // 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 = 'ActivityGames' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not query Activity Mod module information", "", __LINE__, __FILE__, $sql ); ! } ! $row = $db->sql_fetchrow( $result ); ! $block_id = $row['block_id']; ! } ! $is_block = false; } - else - { - - // Read block Configuration - - $block_config = read_block_config( $block_id ); - $title = $block_config[$block_id]['block_title']; - $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $is_block = true; ! global $images; ! } include( $module_root_path . 'includes/act_constants.' . $phpEx ); include( $module_root_path . 'includes/act_functions.' . $phpEx ); ! /* Original code ! define('IN_PHPBB', true); ! $phpbb_root_path = './'; ! include($phpbb_root_path . 'extension.inc'); ! include($phpbb_root_path . 'common.'.$phpEx); ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); ! define('INA_TROPHY', $table_prefix .'ina_top_scores'); ! define('INA_CHEAT', $table_prefix .'ina_cheat_fix'); ! define('INA_BAN', $table_prefix .'ina_ban'); ! ! // Start session management ! $userdata = session_pagestart($user_ip, PAGE_ACTIVITY); ! init_userprefs($userdata); ! // End session management ! */ // Make sure the player is registered $user_id = $userdata['user_id']; if ( $act_config['ina_guest_play'] == "2" ) --- 19,44 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; ! $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! ! $is_block = true; + // + // Includes + // include( $module_root_path . 'includes/act_constants.' . $phpEx ); include( $module_root_path . 'includes/act_functions.' . $phpEx ); ! // // Make sure the player is registered + // $user_id = $userdata['user_id']; if ( $act_config['ina_guest_play'] == "2" ) *************** *** 84,90 **** { mx_message_die( GENERAL_ERROR, $lang['not_logged_in'], $lang['info'] ); - // $header_location = ( @preg _match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; - // header($header_location . append_sid("login.$phpEx?redirect=activity.$phpEx", true)); - // exit; } } --- 47,50 ---- *************** *** 409,417 **** "L_HIGHSCORES_TITLE" => $lang['game_highscores'], ) ); // Generate page ! if ( !$is_block ) ! { ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! } include ( $module_root_path . "includes/act_header." . $phpEx ); --- 369,375 ---- "L_HIGHSCORES_TITLE" => $lang['game_highscores'], ) ); + // // Generate page ! // include ( $module_root_path . "includes/act_header." . $phpEx ); *************** *** 419,427 **** include ( $module_root_path . "includes/act_footer." . $phpEx ); - - if ( !$is_block ) - { - include( $mx_root_path . 'includes/page_tail.' . $phpEx ); - } - ?> \ No newline at end of file --- 377,379 ---- |