|
From: OryNider <ory...@us...> - 2008-03-21 08:57:50
|
Update of /cvsroot/mxbb/mx_radiocast/radiocast_mod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27023/radiocast_mod Modified Files: Tag: core28x radiocast_common.php radiocast_constants.php radiocast_integration.php Log Message: version 1.0.2 Index: radiocast_integration.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/radiocast_mod/radiocast_integration.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** radiocast_integration.php 6 Jun 2007 23:04:00 -0000 1.1 --- radiocast_integration.php 21 Mar 2008 08:57:12 -0000 1.1.2.1 *************** *** 45,70 **** // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) ! function this_rc_mxurl($args = '', $force_standalone_mode = false) { ! global $mx_root_path, $module_root_path, $page_id, $radiocast_index, $phpEx, $integration_enabled, $is_block; ! if( $force_standalone_mode || !$is_block ) ! { ! $mxurl = $mx_root_path . 'modules/mx_radiocast/' . 'radiocast.' . $phpEx . ($args == '' ? '' : '?' . $args); ! } ! else ! { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else { ! $mxurl .= '?page=' . $radiocast_index . ($args == '' ? '' : '&' . $args); } } - return $mxurl; } --- 45,73 ---- // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) ! if (!function_exists('this_rc_mxurl')) { ! function this_rc_mxurl($args = '', $force_standalone_mode = false) ! { ! global $mx_root_path, $module_root_path, $page_id, $radiocast_index, $phpEx, $integration_enabled, $is_block; ! if( $force_standalone_mode || !$is_block ) { ! $mxurl = $mx_root_path . 'modules/mx_radiocast/' . 'radiocast.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) ! { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); ! } ! else ! { ! $mxurl .= '?page=' . $radiocast_index . ($args == '' ? '' : '&' . $args); ! } } + return $mxurl; } } Index: radiocast_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/radiocast_mod/radiocast_common.php,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** radiocast_common.php 17 Sep 2007 07:24:31 -0000 1.2.2.1 --- radiocast_common.php 21 Mar 2008 08:57:10 -0000 1.2.2.2 *************** *** 26,62 **** } ! include_once($radiocast_root_path . 'radiocast_constants.'.$phpEx); ! ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! $link_language='lang_english'; ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); ! $link_language='lang_' . $board_config['default_lang']; ! } ! ! // ********************************************************************** ! // Read theme definition and language in theme definition ! // ********************************************************************** ! ! if ( file_exists( $module_root_path . "templates/" . $theme['template_name'] . '/' . $theme['template_name'] . ".cfg" ) ) ! { ! // ---------- ! include($module_root_path . "templates/" . $theme['template_name'] . '/' . $theme['template_name'] . ".cfg"); ! // ---------- ! } ! else ! { ! // ---------- ! include($module_root_path . "templates/" . "subSilver/" . "subSilver.cfg"); ! // ---------- ! } // --- 26,30 ---- } ! include($radiocast_root_path . 'radiocast_constants.'.$phpEx); // Index: radiocast_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/radiocast_mod/radiocast_constants.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** radiocast_constants.php 6 Jun 2007 23:03:59 -0000 1.1 --- radiocast_constants.php 21 Mar 2008 08:57:11 -0000 1.1.2.1 *************** *** 14,18 **** } ! define('PAGE_RADIOCAST', -19); // for Session Handling --- 14,18 ---- } ! @define('PAGE_RADIOCAST', -19); // for Session Handling *************** *** 32,37 **** - - // Table names !defined('RADIOCAST_TABLE') ? define('RADIOCAST_TABLE', $mx_table_prefix . 'radiocast') : false; --- 32,35 ---- *************** *** 41,43 **** --- 39,94 ---- !defined('RADIOCAST_RATE_TABLE') ? define('RADIOCAST_RATE_TABLE', $mx_table_prefix . 'radiocast_rate') : false; + + if (!$_GET['print']) // Do not "fix" with reuest wrapper!! + { + //$mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x + } + + // ------------------------------------------------------------------------- + // Extend User Style with module lang and images + // Usage: $mx_user->extend(LANG, IMAGES) + // Switches: + // - LANG: MX_LANG_MAIN (default), MX_LANG_ADMIN, MX_LANG_ALL, MX_LANG_NONE + // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE + // ------------------------------------------------------------------------- + $mx_user->extend(MX_LANG_MAIN, MX_IMAGES); + + if (!$is_block) + { + if ( file_exists($module_root_path . "templates/" . $theme['template_name'] . '/' . "mx_radiocast.cfg" ) ) + { + // ---------- + include_once($module_root_path . "templates/" . $theme['template_name'] . '/' . "mx_radiocast.cfg"); + // ---------- + } + else + { + // ---------- + include_once($module_root_path . "templates/" . "subSilver/" . "mx_radiocast.cfg"); + // ---------- + } + + + $img_lang = ( file_exists($module_root_path . "templates/" . $theme['template_name'] . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english'; + + while( list($key, $value) = @each($mx_images) ) + { + if (is_array($value)) + { + foreach( $value as $key2 => $val2 ) + { + $images[$key][$key2] = $val2; + $mx_images[$key][$key2] = $val2; + } + } + else + { + $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); + $mx_images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); + } + + } + + } + ?> \ No newline at end of file |