|
From: Jon O. <jon...@us...> - 2006-08-13 18:52:36
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28103/modules/mx_linkdb Modified Files: mx_linkdb.pak Added Files: linkdb_lists.php linkdb_mini.php Log Message: More module blocks - Mini block - Latest Item block --- NEW FILE: linkdb_mini.php --- <?php /** * * @package mxBB Portal Module - mx_pafiledb * @version $Id: linkdb_mini.php,v 1.1 2006/08/13 18:52:33 jonohlsson Exp $ * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, pafileDB, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ 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; global $images; // // Definitions // define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); list( $trash, $mx_script_name_temp ) = split ( trim( $board_config['server_name'] ), PORTAL_URL ); $mx_script_name = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $mx_script_name_temp ) ); // // Setup config parameters // $config_name = array( 'mini_default_cat_id', 'mini_display_options', 'mini_pagination' ); for( $i = 0; $i < count( $config_name ); $i++ ) { $config_value = $mx_block->get_parameters( $config_name[$i] ); $mini_config[$config_name[$i]] = $config_value; } // =================================================== // Include the common file // =================================================== include_once( $module_root_path . 'linkdb/linkdb_common.' . $phpEx ); $template->destroy(); // =================================================== // Get action variable other wise set it to the main // =================================================== $action = ( isset( $_REQUEST['action_mini'] ) ) ? htmlspecialchars( $_REQUEST['action_mini'] ) : 'mini'; // =================================================== // if the database disabled give them a nice message // =================================================== if ( intval( $kb_config['module_enable'] ) ) { mx_message_die( GENERAL_MESSAGE, $lang['kb_disable'] ); } // =================================================== // an array of all expected actions // =================================================== $actions = array( 'mini' => 'mini', 'download' => 'download' ); // =================================================== // Lets Build the page // =================================================== $page_title = $lang['Download']; if ( $action != 'download' ) { if ( !$is_block ) { include( $mx_root_path . 'includes/page_header.' . $phpEx ); } } $linkdb->module( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); $template->pparse( 'body' ); if ( $action != 'download' ) { if ( !$is_block ) { include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } } ?> --- NEW FILE: linkdb_lists.php --- <?php /** * * @package mxBB Portal Module - mx_linkdb * @version $Id: linkdb_lists.php,v 1.1 2006/08/13 18:52:33 jonohlsson Exp $ * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, pafileDB, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ 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; global $images; // // Definitions // define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); // // Setup config parameters // $config_name = array( 'toplist_sort_method', 'toplist_display_options', 'toplist_pagination', 'toplist_use_pagination', 'toplist_filter_date', 'toplist_cat_id' ); for( $i = 0; $i < count( $config_name ); $i++ ) { $config_value = $mx_block->get_parameters( $config_name[$i] ); $toplist_config[$config_name[$i]] = $config_value; } // // Get pafiledb target block // $toplist_block_id = $mx_block->get_parameters( 'target_block' ); $toplist_page_id = intval($toplist_block_id) > 0 ? get_page_id( $toplist_block_id ) : get_page_id( 'linkdb.php', true ); // =================================================== // Include the common file // =================================================== include_once( $module_root_path . 'linkdb/linkdb_common.' . $phpEx ); $template->destroy(); // =================================================== // if the database disabled give them a nice message // =================================================== if ( intval( $linkdb_config['module_enable'] ) ) { mx_message_die( GENERAL_MESSAGE, $lang['linkdb_disable'] ); } // =================================================== // an array of all expected actions // =================================================== $actions = array( 'lists' => 'lists' ); $action = 'lists'; $linkdb->module( $actions[$action] ); $linkdb->modules[$actions[$action]]->main( $action ); $template->pparse( 'body' ); ?> Index: mx_linkdb.pak =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/mx_linkdb.pak,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_linkdb.pak 15 Jan 2005 23:47:36 -0000 1.2 --- mx_linkdb.pak 13 Aug 2006 18:52:32 -0000 1.3 *************** *** 5,6 **** --- 5,26 ---- block=+:=+:Demo - linkdb=+:Demo block=+:95=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 + New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 + function=+:53=+:59=+:LinkDb_list=+:LinkDb toplists=+:linkdb_lists.php=+: + parameter=+:59=+:115=+:target_block=+:Function=+:0=+:get_list_formatted("block_list","{parameter_value}","{parameter_id}[]", "linkdb.php")=+:0 + parameter=+:59=+:154=+:toplist_cat_id=+:link_quick_cat=+:0=+:=+:1 + parameter=+:59=+:152=+:toplist_display_options=+:Checkbox_multiple_select=+:a:1:{i:0;s:4:"date";}=+:a:4:{i:0;s:4:"date";i:1;s:8:"username";i:2;s:7:"counter";i:3;s:4:"rate";}=+:1 + parameter=+:59=+:155=+:toplist_filter_date=+:Function=+:5=+:get_list_static("{parameter_id}[]",array("no limit", "1 day", "2 days", "3 days", "1 week", "2 weeks", "3 weeks", "1 month", "2 months", "3 months", "6 months", "1 year"),"{parameter_value}")=+:1 + parameter=+:59=+:114=+:toplist_pagination=+:Number=+:3=+:=+:0 + parameter=+:59=+:109=+:toplist_sort_method=+:Menu_single_select=+:latest=+:a:4:{i:0;s:6:"latest";i:1;s:12:"most_popular";i:2;s:8:"toprated";i:3;s:6:"random";}=+:1 + parameter=+:59=+:113=+:toplist_use_pagination=+:Boolean=+:TRUE=+:=+:1 + parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 + block=+:=+:Demo - LinkDb_list=+:Demo block=+:59=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 + function=+:0=+:0=+:0=+:endoflist=+:0=+:0 + New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 + function=+:53=+:90=+:LinkDb_mini=+:Mini navigation block=+:linkdb_mini.php=+: + parameter=+:90=+:156=+:mini_default_cat_id=+:link_quick_cat=+:0=+:=+:1 + parameter=+:90=+:158=+:mini_display_options=+:Checkbox_multiple_select=+:a:1:{i:0;s:4:"date";}=+:a:4:{i:0;s:4:"date";i:1;s:8:"username";i:2;s:7:"counter";i:3;s:4:"rate";}=+:1 + parameter=+:90=+:157=+:mini_pagination=+:Number=+:5=+:=+:1 + parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 + block=+:=+:Demo - LinkDb_mini=+:Demo block=+:90=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 + function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |