|
From: Jon O. <jon...@us...> - 2005-09-22 10:10:28
|
Update of /cvsroot/mxbb/mx_newssuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8369/modules/mx_newssuite Modified Files: NewsSuite.pak db_install.php db_uninstall.php db_upgrade.php news.php Log Message: updating Index: news.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/news.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** news.php 23 Jan 2005 21:45:04 -0000 1.9 --- news.php 22 Sep 2005 10:10:18 -0000 1.10 *************** *** 38,56 **** } - /* - if ( isset($HTTP_GET_VARS['cat_start_' . $block_id]) ) - { - $cat_start[$block_id] = $HTTP_GET_VARS['cat_start_' . $block_id]; - } - else if ( isset($HTTP_COOKIE_VARS['cat_start_' . $block_id]) ) - { - $cat_start[$block_id] = $HTTP_COOKIE_VARS['cat_start_' . $block_id]; - } - else - { - $cat_start[$block_id] = 1; - } - */ - $more_vars = ''; if ( isset( $HTTP_GET_VARS['f'] ) || isset( $HTTP_GET_VARS['t'] ) || isset( $HTTP_GET_VARS['start'] ) || isset( $HTTP_GET_VARS['p'] ) ) --- 38,41 ---- *************** *** 62,71 **** } // Read block Configuration ! $block_config = read_block_config( $block_id ); // Includes... include_once( $module_root_path . 'includes/newssuite_constants.' . $phpEx ); // Setup config parameters $config_name = array( 'news_display', 'news_display_edit_info', 'news_display_signature', 'news_items', 'news_display_polls', 'news_time_format', 'news_trim_char', 'news_block_border', 'news_block_header', 'news_block_footer', 'news_display_block_title', 'news_show_title', 'news_sort_method', 'news_sort_par', 'news_sort_style', 'news_truncate_num', 'news_truncate_num_subject', 'news_mode_switch', 'news_source_switch', 'news_mode_operate', 'enable_html_msg', 'enable_bbcode_msg', 'fix_up', 'news_mode_tagging', 'news_mode_pinning', 'news_filter_time' ); --- 47,63 ---- } + // // Read block Configuration ! // $block_config = read_block_config( $block_id ); + + // // Includes... + // include_once( $module_root_path . 'includes/newssuite_constants.' . $phpEx ); + + // // Setup config parameters + // $config_name = array( 'news_display', 'news_display_edit_info', 'news_display_signature', 'news_items', 'news_display_polls', 'news_time_format', 'news_trim_char', 'news_block_border', 'news_block_header', 'news_block_footer', 'news_display_block_title', 'news_show_title', 'news_sort_method', 'news_sort_par', 'news_sort_style', 'news_truncate_num', 'news_truncate_num_subject', 'news_mode_switch', 'news_source_switch', 'news_mode_operate', 'enable_html_msg', 'enable_bbcode_msg', 'fix_up', 'news_mode_tagging', 'news_mode_pinning', 'news_filter_time' ); *************** *** 78,82 **** --- 70,77 ---- $title = $block_config[$block_id]['block_title']; $description = $block_config[$block_id]['block_desc']; + + // // Define some style parameters + // $news_block_border = $newssuite_config['news_block_border']; $news_block_header = $newssuite_config['news_block_header']; *************** *** 87,91 **** --- 82,88 ---- $news_block_header_style = ( ( $news_block_header == '' ) || ( $news_block_header == '0' ) ) ? '' : 'thHead'; + // // Sort options + // $news_sort_style = $newssuite_config['news_sort_style']; // Categorized, mixed $news_sort_method = $newssuite_config['news_sort_method']; // item_id, item_time, user_rank... *************** *** 94,102 **** --- 91,107 ---- $news_filter_time = $newssuite_config['news_filter_time']; // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, + // // Extract 'what posts to view info', the cool Array ;) + // + + /* $news_type_select_data = array(); $news_type_select_temp = $block_config[$block_id][news_type_select]['parameter_value']; $news_type_select_temp = stripslashes( $news_type_select_temp ); $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); + */ + + $news_type_select_data = ( !empty( $block_config[$block_id][news_type_select]['parameter_value'] ) ) ? unserialize( $block_config[$block_id][news_type_select]['parameter_value'] ) : array(); + // ----------------- // Generate the page *************** *** 153,156 **** --- 158,176 ---- include( $module_root_path . "includes/newssuite_defs.$phpEx" ); + // + // Fix for old versions + // If not updated the block settings, deselect all + // + if (!$news_type_select_data || empty($news_type_select_data)) + { + $news_type_select_data = array(); + $news_type_select_data[$item_types_all] = array(); + + for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) + { + $news_type_select_data[$item_types_array[$z]] = array(); + } + } + include( $module_root_path . "includes/news.$phpEx" ); Index: NewsSuite.pak =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/NewsSuite.pak,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** NewsSuite.pak 18 Feb 2005 10:08:38 -0000 1.16 --- NewsSuite.pak 22 Sep 2005 10:10:18 -0000 1.17 *************** *** 1,59 **** module=+:43=+:NewsSuite=+:modules/mx_newssuite/=+:Customizable news blocks addon=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:43=+:47=+:NewsSuite=+:NewsSuite Module=+:news.php=+:modules/mx_newssuite/admin/news_config.php ! parameter=+:47=+:105=+:enable_bbcode_msg=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:104=+:enable_html_msg=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:109=+:fix_up=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:90=+:news_block_border=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:92=+:news_block_footer=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:91=+:news_block_header=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:83=+:news_display=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:93=+:news_display_block_title=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:84=+:news_display_edit_info=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:87=+:news_display_polls=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:85=+:news_display_signature=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:314=+:news_filter_time=+:Values=+:3 months=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:86=+:news_items=+:Text=+:10=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:102=+:news_mode_operate=+:Values=+:none=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:313=+:news_mode_pinning=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:100=+:news_mode_switch=+:Values=+:Block_Mode=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:312=+:news_mode_tagging=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:95=+:news_show_title=+:Text=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:96=+:news_sort_method=+:Values=+:topic_type=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:97=+:news_sort_par=+:Values=+:DESC=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:99=+:news_sort_style=+:Values=+:Mixed=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:101=+:news_source_switch=+:Values=+:phpbb=+: ! option=+:0=+:0=+:0=+:endoflist=+: parameter=+:47=+:88=+:news_time_format=+:Text=+:m-d g:iA=+: - option=+:0=+:0=+:0=+:endoflist=+: parameter=+:47=+:89=+:news_trim_char=+:Text=+:<i></i>=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:98=+:news_truncate_num=+:Text=+:250=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:103=+:news_truncate_num_subject=+:Text=+:20=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:47=+:94=+:news_type_select=+:Text=+:array(0 => 1, 1=>2)=+: ! option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - NewsSuite=+:Demo block=+:47=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 --- 1,36 ---- module=+:43=+:NewsSuite=+:modules/mx_newssuite/=+:Customizable news blocks addon=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:43=+:47=+:NewsSuite=+:NewsSuite Module=+:news.php=+: ! parameter=+:47=+:105=+:enable_bbcode_msg=+:Boolean=+:1=+: ! parameter=+:47=+:104=+:enable_html_msg=+:Boolean=+:0=+: ! parameter=+:47=+:109=+:fix_up=+:Boolean=+:1=+: ! parameter=+:47=+:90=+:news_block_border=+:Boolean=+:1=+: ! parameter=+:47=+:92=+:news_block_footer=+:Boolean=+:1=+: ! parameter=+:47=+:91=+:news_block_header=+:Boolean=+:1=+: ! parameter=+:47=+:83=+:news_display=+:Number=+:1=+: ! parameter=+:47=+:93=+:news_display_block_title=+:Boolean=+:1=+: ! parameter=+:47=+:84=+:news_display_edit_info=+:Boolean=+:0=+: ! parameter=+:47=+:87=+:news_display_polls=+:Boolean=+:1=+: ! parameter=+:47=+:85=+:news_display_signature=+:Boolean=+:0=+: ! parameter=+:47=+:314=+:news_filter_time=+:Menu_single_select=+:3 months=+:a:12:{i:0;s:8:"no limit";i:1;s:5:"1 day";i:2;s:6:"2 days";i:3;s:6:"3 days";i:4;s:6:"1 week";i:5;s:7:"2 weeks";i:6;s:7:"3 weeks";i:7;s:7:"1 month";i:8;s:8:"2 months";i:9;s:8:"3 months";i:10;s:8:"6 months";i:11;s:6:"1 year";} ! parameter=+:47=+:86=+:news_items=+:Number=+:10=+: ! parameter=+:47=+:102=+:news_mode_operate=+:Menu_single_select=+:None=+:a:2:{i:0;s:4:"None";i:1;s:6:"Source";} ! parameter=+:47=+:313=+:news_mode_pinning=+:Boolean=+:0=+: ! parameter=+:47=+:100=+:news_mode_switch=+:Menu_single_select=+:Default_Block_Mode=+:a:3:{i:0;s:18:"Default_Block_Mode";i:1;s:14:"Newspaper_Mode";i:2;s:17:"Category_Nav_Mode";} ! parameter=+:47=+:312=+:news_mode_tagging=+:Boolean=+:0=+: ! parameter=+:47=+:384=+:news_sep_formatting=+:Separator=+:=+: ! parameter=+:47=+:381=+:news_sep_layout=+:Separator=+:=+: ! parameter=+:47=+:382=+:news_sep_sort=+:Separator=+:=+: ! parameter=+:47=+:383=+:news_sep_style=+:Separator=+:=+: ! parameter=+:47=+:95=+:news_show_title=+:Boolean=+:1=+: ! parameter=+:47=+:96=+:news_sort_method=+:Menu_single_select=+:Latest=+:a:5:{i:0;s:6:"Latest";i:1;s:8:"Creation";i:2;s:2:"Id";i:3;s:8:"Userrank";i:4;s:10:"Alphabetic";} ! parameter=+:47=+:97=+:news_sort_par=+:Radio_single_select=+:DESC=+:a:2:{i:0;s:4:"DESC";i:1;s:3:"ASC";} ! parameter=+:47=+:99=+:news_sort_style=+:Radio_single_select=+:Mixed=+:a:2:{i:0;s:5:"Mixed";i:1;s:11:"Categorized";} ! parameter=+:47=+:101=+:news_source_switch=+:Menu_single_select=+:phpbb=+:a:2:{i:0;s:5:"phpbb";i:1;s:2:"kb";} parameter=+:47=+:88=+:news_time_format=+:Text=+:m-d g:iA=+: parameter=+:47=+:89=+:news_trim_char=+:Text=+:<i></i>=+: ! parameter=+:47=+:98=+:news_truncate_num=+:Number=+:250=+: ! parameter=+:47=+:103=+:news_truncate_num_subject=+:Number=+:20=+: ! parameter=+:47=+:94=+:news_type_select=+:news_type_select=+:array(0 => 1, 1=>2)=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - NewsSuite=+:Demo block=+:47=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/db_uninstall.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_uninstall.php 16 Jan 2005 01:03:44 -0000 1.3 --- db_uninstall.php 22 Sep 2005 10:10:18 -0000 1.4 *************** *** 2,12 **** /** * * ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System * email : jon...@ho... * project site : www.mx-system.com * - * description : * ------------------------------------------------------------------------- * --- 2,11 ---- /** * * ------------------------------------------------------------------------ ! * subject : mxBB-Portal - CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 mxBB-Portal * email : jon...@ho... * project site : www.mx-system.com * * ------------------------------------------------------------------------- * *************** *** 24,28 **** if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = '../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); --- 23,27 ---- if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = './../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); *************** *** 33,54 **** if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(3)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(4)" ); } // End session management } // If fresh install ! $message = "<b>You are uninstalling the module tables!</b><br/><br/>"; ! $message .= '<br /> This module does not have any module tables, it use mx paramters only! ...nothing to remove :-)'; echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; ! echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; --- 32,54 ---- if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(2)" ); } // End session management } + // If fresh install ! $uninstall_message = "<b>You are uninstalling the module tables!</b><br/><br/>"; ! $uninstall_message .= '<br /> This module does not have any module tables, it use mx paramters only! ...nothing to remove :-)'; echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; ! echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $uninstall_message . "</span></td></tr>"; echo "</table><br />"; Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/db_install.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_install.php 6 Mar 2005 01:12:55 -0000 1.5 --- db_install.php 22 Sep 2005 10:10:18 -0000 1.6 *************** *** 2,12 **** /** * * ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System * email : jon...@ho... * project site : www.mx-system.com * - * description : * ------------------------------------------------------------------------- * --- 2,11 ---- /** * * ------------------------------------------------------------------------ ! * subject : mxBB-Portal - CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 mxBB-Portal * email : jon...@ho... * project site : www.mx-system.com * * ------------------------------------------------------------------------- * *************** *** 22,32 **** define( 'IN_PORTAL', true ); - - $mx_module_version = 'mxBB Newssuite Module 2.0.0'; - $mx_module_copy = 'Written by <a href="http://www.mx-system.com" target="_phpbb" >Jon</a>'; - if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = '../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); --- 21,27 ---- define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = './../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); *************** *** 37,49 **** if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(3)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(4)" ); } // End session management } // If fresh install $sql = array(); --- 32,48 ---- if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(2)" ); } // End session management } + + $mx_module_version = 'mxBB Newssuite Module 2.0.0'; + $mx_module_copy = 'Written by <a href="http://www.mx-system.com" target="_phpbb" >Jon</a>'; + // If fresh install $sql = array(); Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/db_upgrade.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db_upgrade.php 6 Mar 2005 01:12:55 -0000 1.6 --- db_upgrade.php 22 Sep 2005 10:10:18 -0000 1.7 *************** *** 2,12 **** /** * * ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System * email : jon...@ho... * project site : www.mx-system.com * - * description : * ------------------------------------------------------------------------- * --- 2,11 ---- /** * * ------------------------------------------------------------------------ ! * subject : mxBB-Portal - CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 mxBB-Portal * email : jon...@ho... * project site : www.mx-system.com * * ------------------------------------------------------------------------- * *************** *** 22,32 **** define( 'IN_PORTAL', true ); - - $mx_module_version = 'mxBB Newssuite Module 2.0.0'; - $mx_module_copy = 'Written by <a href="http://www.mx-system.com" target="_phpbb" >Jon</a>'; - if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = '../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); --- 21,27 ---- define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { ! $mx_root_path = './../../'; include( $mx_root_path . 'extension.inc' ); include( $mx_root_path . 'common.' . $phpEx ); *************** *** 37,50 **** if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(3)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(4)" ); } // End session management } $sql = array(); --- 32,48 ---- if ( !$userdata['session_logged_in'] ) { ! die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { ! die( "Hacking attempt(2)" ); } // End session management } + $mx_module_version = 'mxBB Newssuite Module 2.0.0'; + $mx_module_copy = 'Written by <a href="http://www.mx-system.com" target="_phpbb" >Jon</a>'; + $sql = array(); |