You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2007-07-22 21:01:52
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30076/admin Modified Files: admin_mx_portal.tpl Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: admin_mx_portal.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/admin_mx_portal.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_mx_portal.tpl 4 Jun 2007 21:14:46 -0000 1.10 --- admin_mx_portal.tpl 22 Jul 2007 21:01:47 -0000 1.11 *************** *** 13,16 **** --- 13,24 ---- </tr> <tr> + <td class="row1">{L_PORTAL_STATUS}<br /><span class="gensmall">{L_PORTAL_STATUS_EXPLAIN}</span></td> + <td class="row2"><input type="radio" name="portal_status" value="1" {S_PORTAL_STATUS_YES} /> {L_YES} <input type="radio" name="portal_status" value="0" {S_PORTAL_STATUS_NO} /> {L_NO}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_DISABLED_MESSAGE}</td> + <td class="row2" width="50%"><textarea rows="5" cols="50" wrap="virtual" name="disabled_message" class="post" />{DISABLED_MESSAGE}</textarea></td> + </tr> + <tr> <td class="row1">{L_PORTAL_URL}</td> <td class="row2"><input type="text" maxlength="150" size="50" name="portal_url" value="{PORTAL_URL}" /></td> |
|
From: Jon O. <jon...@us...> - 2007-07-22 21:01:39
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29466 Modified Files: mx_search.php mx_site_log.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: mx_site_log.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_site_log.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mx_site_log.php 5 May 2007 20:13:38 -0000 1.14 --- mx_site_log.php 22 Jul 2007 21:00:53 -0000 1.15 *************** *** 119,122 **** --- 119,123 ---- // Get all pages with view access // + /* $sql = "SELECT * FROM " . PAGE_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 138,143 **** --- 139,156 ---- $valid_page_ids_array[] = $page_row['page_id']; } + } $db->sql_freeresult($result); + */ + + $valid_page_ids_array = array(); + foreach( $mx_page->page_rowset as $temp_key => $page_row ) + { + $_auth_ary = $mx_page->auth($page_row['auth_view'], $page_row['auth_view_group'], $page_row['auth_moderator_group']); + if ($_auth_ary['auth_view']) + { + $valid_page_ids_array[] = $page_row['page_id']; + } + } // Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mx_search.php 5 May 2007 20:13:38 -0000 1.19 --- mx_search.php 22 Jul 2007 21:00:51 -0000 1.20 *************** *** 293,296 **** --- 293,297 ---- if ( count($search_ids) > 0 ) { + /* // // Get all pages with view access *************** *** 318,321 **** --- 319,333 ---- $db->sql_freeresult($result); + */ + + $valid_page_ids_array = array(); + foreach( $mx_page->page_rowset as $temp_key => $page_row ) + { + $_auth_ary = $mx_page->auth($page_row['auth_view'], $page_row['auth_view_group'], $page_row['auth_moderator_group']); + if ($_auth_ary['auth_view']) + { + $valid_page_ids_array[] = $page_row['page_id']; + } + } // |
|
From: Jon O. <jon...@us...> - 2007-07-22 21:00:43
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29414 Modified Files: lang_admin.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_admin.php,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** lang_admin.php 21 Jul 2007 23:07:51 -0000 1.76 --- lang_admin.php 22 Jul 2007 21:00:38 -0000 1.77 *************** *** 139,142 **** --- 139,145 ---- $lang['Override_style'] = 'Override user style'; $lang['Override_style_explain'] = 'Replaces users style with the default (for pages)'; + $lang['Portal_status'] = 'Enable portal'; + $lang['Portal_status_explain'] = 'Handy switch, when reconstructing the site. Only admin is able to view pages and browse around normally. While disabled, the message below is displayed.'; + $lang['Disabled_message'] = 'Portal disabled message'; // |
|
From: Jon O. <jon...@us...> - 2007-07-22 21:00:30
|
Update of /cvsroot/mxbb/core/install/schemas In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29336 Modified Files: mysql_schema_install.sql mysql_schema_upgrade_to_2.8.1.sql postgres_schema_install.sql upgrade_schemas_map.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: upgrade_schemas_map.php =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/upgrade_schemas_map.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** upgrade_schemas_map.php 21 Jul 2007 23:07:37 -0000 1.18 --- upgrade_schemas_map.php 22 Jul 2007 21:00:21 -0000 1.19 *************** *** 19,23 **** array('schema' => 'upgrade_to_2.8_b3' , 'sql' => "SELECT main_layout FROM mx_table_portal"), array('schema' => 'upgrade_to_2.8.0' , 'sql' => "SELECT overall_footer FROM mx_table_portal"), ! array('schema' => 'upgrade_to_2.8.1' , 'sql' => "SELECT menu_icon FROM mx_table_page"), ); --- 19,23 ---- array('schema' => 'upgrade_to_2.8_b3' , 'sql' => "SELECT main_layout FROM mx_table_portal"), array('schema' => 'upgrade_to_2.8.0' , 'sql' => "SELECT overall_footer FROM mx_table_portal"), ! array('schema' => 'upgrade_to_2.8.1' , 'sql' => "SELECT portal_status FROM mx_table_portal"), ); Index: postgres_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/postgres_schema_install.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** postgres_schema_install.sql 21 Jul 2007 23:07:36 -0000 1.2 --- postgres_schema_install.sql 22 Jul 2007 21:00:21 -0000 1.3 *************** *** 568,571 **** --- 568,573 ---- "mod_rewrite" SMALLINT NOT NULL DEFAULT '0', "portal_backend" VARCHAR(255) NULL DEFAULT 'phpBB2', + "portal_status" SMALLINT NOT NULL DEFAULT '1', + "disabled_message" VARCHAR(255) NULL DEFAULT '', CONSTRAINT mx_table_portal_pkey PRIMARY KEY ("portal_id") ); *************** *** 575,579 **** -- ! -- INSERT INTO "mx_table_portal" VALUES (1,'mxBB-Portal','http://yoursite.com/forum/','http://yoursite.com/','2.8.0',-1,-1,1,'overall_header.tpl','overall_footer.tpl','mx_main_layout.tpl',0,0,1,'1182515561',0,'phpBB2'); -- --- 577,581 ---- -- ! -- INSERT INTO "mx_table_portal" VALUES (1,'mxBB-Portal','http://yoursite.com/forum/','http://yoursite.com/','2.8.0',-1,-1,1,'overall_header.tpl','overall_footer.tpl','mx_main_layout.tpl',0,0,1,'1182515561',0,'phpBB2','1','We are currenty upgrading this site with latest mxBB software.'); -- Index: mysql_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install.sql,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** mysql_schema_install.sql 21 Jul 2007 23:07:36 -0000 1.39 --- mysql_schema_install.sql 22 Jul 2007 21:00:20 -0000 1.40 *************** *** 575,578 **** --- 575,580 ---- `mod_rewrite` smallint(2) NOT NULL default '0', `portal_backend` varchar(255) default 'phpBB2', + `portal_status` smallint(2) NOT NULL default '1', + `disabled_message` varchar(255) default 'We are currenty upgrading this site with latest mxBB software.', PRIMARY KEY (`portal_id`) ) TYPE=MyISAM; Index: mysql_schema_upgrade_to_2.8.1.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_upgrade_to_2.8.1.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysql_schema_upgrade_to_2.8.1.sql 21 Jul 2007 23:07:36 -0000 1.2 --- mysql_schema_upgrade_to_2.8.1.sql 22 Jul 2007 21:00:20 -0000 1.3 *************** *** 25,26 **** --- 25,33 ---- ALTER TABLE mx_table_page ADD page_order smallint(5) default '0' AFTER parents_data; + + # ------------------------------------------------------------ + # + # New Fields in Table `mx_portal` + # + ALTER TABLE mx_table_portal ADD portal_status smallint(2) NOT NULL default '1' AFTER portal_backend; + ALTER TABLE mx_table_portal ADD disabled_message varchar(255) default 'We are currenty upgrading this site with latest mxBB software.' AFTER portal_status; |
|
From: Jon O. <jon...@us...> - 2007-07-22 21:00:00
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28869/includes Modified Files: mx_functions_core.php page_header.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** page_header.php 9 Jul 2007 21:57:06 -0000 1.44 --- page_header.php 22 Jul 2007 20:59:56 -0000 1.45 *************** *** 67,71 **** // Initialize template // - //$layouttemplate = new mx_Template( $template->root, $board_config, $db ); $layouttemplate = new mx_Template( $mx_root_path . 'templates/'. $theme['template_name'], $board_config, $db ); } --- 67,70 ---- *************** *** 80,84 **** // - temp fix to instatiate mx_page for the login page // - $mx_page = new mx_page(); $mx_page->init( '1' ); } --- 79,82 ---- *************** *** 468,476 **** } - define('MX_OVERALL_NAVIGATION', true); $block_id = $mx_page->page_navigation_block; if(!empty($block_id) ) { $mx_block->init( $block_id ); --- 466,475 ---- } $block_id = $mx_page->page_navigation_block; if(!empty($block_id) ) { + define('MX_OVERALL_NAVIGATION', true); + $mx_block->init( $block_id ); *************** *** 496,499 **** --- 495,503 ---- 'OVERALL_NAVIGATION' => $overall_navigation_menu) ); + + if ( ( ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) + { + $mx_block->output_cp_button(true); + } } Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** mx_functions_core.php 21 Jul 2007 23:07:15 -0000 1.50 --- mx_functions_core.php 22 Jul 2007 20:59:56 -0000 1.51 *************** *** 1458,1462 **** * @access public */ ! function output_cp_button() { global $layouttemplate, $userdata, $mx_root_path, $mx_page, $lang, $block_size, $images; --- 1458,1462 ---- * @access public */ ! function output_cp_button($overall_header = false) { global $layouttemplate, $userdata, $mx_root_path, $mx_page, $lang, $block_size, $images; *************** *** 1501,1505 **** // Output // ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), 'EDIT_ACTION' => $edit_url, --- 1501,1505 ---- // Output // ! $temp_array = array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), 'EDIT_ACTION' => $edit_url, *************** *** 1507,1511 **** 'EDITCP_SHOW' => $mx_page->editcp_show ? '' : 'none', 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! )); } --- 1507,1520 ---- 'EDITCP_SHOW' => $mx_page->editcp_show ? '' : 'none', 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! ); ! ! if ($overall_header) ! { ! $layouttemplate->assign_block_vars('editcp', $temp_array); ! } ! else ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', $temp_array); ! } } |
|
From: Jon O. <jon...@us...> - 2007-07-22 20:59:59
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28869 Modified Files: index.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** index.php 21 Jul 2007 23:07:14 -0000 1.69 --- index.php 22 Jul 2007 20:59:56 -0000 1.70 *************** *** 52,55 **** --- 52,63 ---- // + // Site under reconstruction + // + if( !$portal_config['portal_status'] && !($userdata['user_level'] == ADMIN && $userdata['session_logged_in']) ) + { + mx_message_die(GENERAL_MESSAGE, $portal_config['disabled_message'], 'Information'); + } + + // // Show copyrights // |
|
From: Jon O. <jon...@us...> - 2007-07-22 20:59:59
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28869/admin Modified Files: admin_mx_portal.php Log Message: Added a few portal main settings for disable site Added blockCP for navigation block Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** admin_mx_portal.php 21 Jul 2007 23:07:14 -0000 1.33 --- admin_mx_portal.php 22 Jul 2007 20:59:55 -0000 1.34 *************** *** 49,52 **** --- 49,54 ---- $new['mx_use_cache'] = $mx_request_vars->post('mx_use_cache', MX_TYPE_INT, '1'); $new['mod_rewrite'] = $mx_request_vars->post('mod_rewrite', MX_TYPE_INT, '0'); + $new['portal_status'] = $mx_request_vars->post('portal_status', MX_TYPE_INT, '0'); + $new['disabled_message'] = $mx_request_vars->post('disabled_message', MX_TYPE_NO_TAGS, 'Site disabled.'); $sql = "UPDATE " . PORTAL_TABLE . " *************** *** 63,67 **** top_phpbb_links = '" . str_replace("\'", "''", $new['top_phpbb_links']) . "', mx_use_cache = '" . str_replace("\'", "''", $new['mx_use_cache']) . "', ! mod_rewrite = '" . str_replace("\'", "''", $new['mod_rewrite']) . "'"; if( !($db->sql_query($sql)) ) --- 65,71 ---- top_phpbb_links = '" . str_replace("\'", "''", $new['top_phpbb_links']) . "', mx_use_cache = '" . str_replace("\'", "''", $new['mx_use_cache']) . "', ! mod_rewrite = '" . str_replace("\'", "''", $new['mod_rewrite']) . "', ! portal_status = '" . str_replace("\'", "''", $new['portal_status']) . "', ! disabled_message = '" . str_replace("\'", "''", $new['disabled_message']) . "'"; if( !($db->sql_query($sql)) ) *************** *** 87,90 **** --- 91,99 ---- $mx_mod_rewrite_no = ( $portal_config['mod_rewrite'] == 0 ) ? 'checked="checked"' : ''; + $mx_portal_status_yes = ( $portal_config['portal_status'] == 1 ) ? 'checked="checked"' : ''; + $mx_portal_status_no = ( $portal_config['portal_status'] == 0 ) ? 'checked="checked"' : ''; + + $disabled_message = $portal_config['disabled_message']; + $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); *************** *** 176,180 **** "S_MX_MOD_REWRITE_YES" => $mx_mod_rewrite_yes, "S_MX_MOD_REWRITE_NO" => $mx_mod_rewrite_no, ! "MX_MOD_REWRITE" => $portal_config['mod_rewrite'] )); --- 185,197 ---- "S_MX_MOD_REWRITE_YES" => $mx_mod_rewrite_yes, "S_MX_MOD_REWRITE_NO" => $mx_mod_rewrite_no, ! "MX_MOD_REWRITE" => $portal_config['mod_rewrite'], ! ! "L_PORTAL_STATUS" => $lang['Portal_status'], ! "L_PORTAL_STATUS_EXPLAIN" => $lang['Portal_status_explain'], ! "S_PORTAL_STATUS_YES" => $mx_portal_status_yes, ! "S_PORTAL_STATUS_NO" => $mx_portal_status_no, ! ! "L_DISABLED_MESSAGE" => $lang['Disabled_message'], ! "DISABLED_MESSAGE" => $disabled_message, )); |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:54
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26243 Modified Files: mx_menu_overall_standard.tpl Log Message: Index: mx_menu_overall_standard.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/templates/subSilver/mx_menu_overall_standard.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_menu_overall_standard.tpl 28 Apr 2006 14:29:38 -0000 1.2 --- mx_menu_overall_standard.tpl 21 Jul 2007 23:09:31 -0000 1.3 *************** *** 10,14 **** background-color: {T_TR_COLOR1}; border-width: 1px; ! border-color: {T_TH_COLOR1}; border-style: solid solid none solid; position: relative; --- 10,14 ---- background-color: {T_TR_COLOR1}; border-width: 1px; ! border-color: {T_TH_COLOR1}; border-style: solid solid none solid; position: relative; *************** *** 34,39 **** <table cellpadding="5" cellspacing="0" border="0"> <tr> ! <td align="left" width="100%" style="border:none;"> ! {catrow.CATEGORY} </td> </tr> --- 34,39 ---- <table cellpadding="5" cellspacing="0" border="0"> <tr> ! <td align="left" width="100%" height="30" style="border:none;"> ! {catrow.U_MENU_ICON}{catrow.CATEGORY} </td> </tr> |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:54
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26243/admin Modified Files: mx_module_parameters.tpl Added Files: mx_module_parameters_site.tpl Log Message: --- NEW FILE: mx_module_parameters_site.tpl --- <script type="text/javascript"> function getCookie(name) { var cookies = document.cookie; var start = cookies.indexOf(name + '='); if( start < 0 ) return null; var len = start + name.length + 1; var end = cookies.indexOf(';', len); if( end < 0 ) end = cookies.length; return unescape(cookies.substring(len, end)); } function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + '=' + escape (value) + ((expires) ? '; expires=' + ( (expires == 'never') ? 'Thu, 31-Dec-2099 23:59:59 GMT' : expires.toGMTString() ) : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : ''); } function delCookie(name, path, domain) { if( getCookie(name) ) { document.cookie = name + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : ''); } } function handleError() { return true; } window.onerror = handleError; function menuCat(id, mode, visible) { this.cat_id = id; this.menu_mode = mode; this.status = visible != '' ? visible : 'none'; } var menuCats = new Array(); function getObj(obj) { return ( document.getElementById ? document.getElementById(obj) : ( document.all ? document.all[obj] : null ) ); } function displayObj(obj, status) { var x = getObj(obj); if( x && x.style ) x.style.display = status; } var queueInterval = 0; // milliseconds between queued steps. var execInterval = 0; var queuedSteps; var currentStep; function queueStep(o, s) { this.obj = o; this.status = s; } function execQueue() { if( currentStep < queuedSteps.length ) { var obj = queuedSteps[currentStep].obj; var status = queuedSteps[currentStep].status; displayObj(obj, status); if( menuCats[obj] ) menuCats[obj].status = status; currentStep++; setTimeout("execQueue();", execInterval); } else { execInterval = queueInterval; } } function onMenuCatClick(cat_id, type, init) { var currentCat, currentStatus; var imageSCR = type+'image_'+cat_id; var strSubmitContent = ''; parentCatMode = 'adminCat_'; parentCatEditMode = 'adminCatEdit_'; parentMenuEditMode = 'adminMenuEdit_'; parentCat = parentCatMode + cat_id; parentCatEdit = parentCatEditMode + cat_id; parentMenuEdit = parentMenuEditMode + cat_id; currentCat = type + cat_id; currentStatus = menuCats[currentCat].status; queuedSteps = new Array(); cookieArray = new Array(); currentStep = 0; for( var forCat in menuCats ) { if( (init == 'true' && (menuCats[forCat].status == 'block') && menuCats[forCat].menu_mode == parentCat) || (init != 'true' && ( (currentCat == parentCat && menuCats[forCat].status == 'block') || (currentCat == parentCatEdit && menuCats[forCat].menu_mode != parentCat && menuCats[forCat].status == 'block') || (currentCat == parentMenuEdit && menuCats[forCat].menu_mode != parentCatMode && menuCats[forCat].status == 'block') ))) { queuedSteps[currentStep++] = new queueStep(forCat, 'none'); menuCats[forCat].status = 'none'; forCatimage = menuCats[forCat].menu_mode+'image_'+menuCats[forCat].cat_id; if( document.images && document.images[forCatimage] ) { document.images[forCatimage].src = '{IMG_URL_EXPAND}'; } } } if( currentStatus == 'none' ) { if (menuCats[parentCat] && menuCats[currentCat].menu_mode != parentMenuEditMode ) { if (menuCats[parentCat].status == 'none') { queuedSteps[currentStep++] = new queueStep(parentCat, 'block'); menuCats[parentCat].status = 'block'; forCatimage = menuCats[parentCat].menu_mode+'image_'+menuCats[parentCat].cat_id; if( document.images && document.images[forCatimage] ) { document.images[forCatimage].src = '{IMG_URL_CONTRACT}'; } } } queuedSteps[currentStep++] = new queueStep(currentCat, 'block'); menuCats[currentCat].status = 'block'; if (currentCat == parentCat) { var expdate = new Date(); // 72 Hours from now expdate.setTime(expdate.getTime() + (72 * 60 * 60 * 1000)); setCookie('{COOKIE_NAME}_'+type+'xxx_id', cat_id, expdate, ('{COOKIE_PATH}' == '') ? null : '{COOKIE_PATH}', ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}', ('{COOKIE_SECURE}' == '0') ? false : true); } if( document.images && document.images[imageSCR] ) { document.images[imageSCR].src = '{IMG_URL_CONTRACT}'; } } else { delCookie('{COOKIE_NAME}_'+type+'xxx_id', ('{COOKIE_PATH}' == '') ? null : '{COOKIE_PATH}', ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}'); } for( var forCat in menuCats ) { if ( menuCats[forCat].status == 'block' ) { strSubmitContent += forCat + ','; } } // Remove trailing separator strSubmitContent = strSubmitContent.substr(0, strSubmitContent.length - 1); setCookie('{COOKIE_NAME}_admincp_sitestates', strSubmitContent, expdate, ('{COOKIE_PATH}' == '') ? null : '{COOKIE_PATH}', ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}', ('{COOKIE_SECURE}' == '0') ? false : true); currentStep = 0; setTimeout("execQueue();", execInterval); } // --> </script> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th class="thHead">{L_MENU_TITLE}</th> </tr> <tr> <td align="center"> {RESULT_MESSAGE} </td> </tr> <!-- BEGIN catrow --> <tr> <td class="row1"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="forumline"> <tr> <td width="50%" class="catLeft" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.CAT_ID}','adminCat_');"> <img name="adminCat_image_{catrow.CAT_ID}" src="{catrow.IMG_URL}" border="0" align="absmiddle"> <span class="cattitle"><b>{catrow.CAT_TITLE}</b></span><br /><span class="gensmall"><b>{catrow.CAT_DESC}</b></span> </td> <td width="15%" class="cat" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.CAT_ID}','adminCatEdit_');"> <img name="adminCatEdit_image_{catrow.CAT_ID}" src="{catrow.IMG_URL_EDIT}" border="0" align="absmiddle"> <span class="gen">{L_EDIT}</span> </td> <td width="20%" class="cat" align="center" valign="middle" nowrap="nowrap"> <span class="gen"><a href="{catrow.U_CAT_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.U_CAT_MOVE_DOWN}">{L_MOVE_DOWN}</a></span> </td> </tr> <tr> <td colspan="3" class="row1"> <div id="adminCat_{catrow.CAT_ID}" style="display:{catrow.VISIBLE};" class="genmed"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td bgcolor="#006699" width="10"></td> <td> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <!-- Cat Edit --> <tr> <td class="row1" colspan="5"> <div id="adminCatEdit_{catrow.CAT_ID}" style="display:{catrow.VISIBLE_EDIT};" class="genmed" > <form name="form_adminCatEdit_{catrow.CAT_ID}" action="{S_ACTION}" method="post" > <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.CAT_ID}','adminCatEdit_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{catrow.L_TITLE_EDIT}</span></td> </tr> <tr> <td class="row1"><b>{catrow.L_CAT_TITLE}</b></td> <td class="row2" colspan="2"><input type="text" size="25" name="cat_title" value="{catrow.E_CAT_TITLE}" /></td> </tr> <tr> <td class="row1">{catrow.L_MENU_ACTIVE}</td> <td class="row2">{catrow.S_MENU_ACTIVE}</td> </tr> <tr> <td class="row1" colspan="2">{catrow.L_MENU_ACTION_ADV}</td> </tr> <tr> <td class="row1" valign="top">{catrow.L_MENU_ICON}</td> <td class="row2">{catrow.S_POSTICONS}</td> </tr> <tr> <td class="row1">{catrow.L_MENU_ALT_ICON}</td> <td class="row2"><input type="text" size="65" name="menu_alt_icon" value="{catrow.E_MENU_ALT_ICON}" class="post" /></td> </tr> <tr> <td class="row1">{catrow.L_MENU_ALT_ICON_HOT}</td> <td class="row2"><input type="text" size="65" name="menu_alt_icon_hot" value="{catrow.E_MENU_ALT_ICON_HOT}" class="post" /></td> </tr> <tr> <td class="row2" colspan="2" align="center">{catrow.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{catrow.S_SUBMIT}" class="liteoption" /></td> </tr> </table> </form> </div> </td> </tr> <!-- Cat Edit --> <!-- BEGIN nocat --> {catrow.nocat.NONE} <!-- END nocat --> <!-- BEGIN menurow --> <tr> <td class="row1" colspan="5"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td class="row2" width="5"> </td> <td> <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center"> <tr> <td width="65%" class="{catrow.menurow.ROW_CLASS}" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.menurow.MENU_ID}','adminMenuEdit_');"><img name="adminMenuEdit_image_{catrow.menurow.MENU_ID}" src="{catrow.menurow.IMG_URL_EDIT}" border="0" align="absmiddle"> <img src="{IMG_ICON_BLOCK}" border="0" align="absmiddle"> <span class="gensmall">{catrow.menurow.MENU_TITLE}</span><br /><span class="gensmall">{catrow.menurow.MENU_DESC}</span> </td> <td width="20%" class="{catrow.menurow.ROW_CLASS}" align="center" valign="middle"> <span class="gensmall"><a href="{catrow.menurow.U_MENU_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.menurow.U_MENU_MOVE_DOWN}">{L_MOVE_DOWN}</a></span> </td> </tr> <!-- Menu Edit --> <tr> <td class="row1" colspan="3"> <div id="adminMenuEdit_{catrow.menurow.MENU_ID}" style="display:{catrow.menurow.VISIBLE_EDIT};" class="genmed"> <form name="form_adminMenuEdit_{catrow.menurow.MENU_ID}" action="{S_ACTION}" method="post"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.menurow.MENU_ID}','adminMenuEdit_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{catrow.menurow.L_TITLE_EDIT}</span></td> </tr> <tr> <td class="row1">{catrow.menurow.L_MENU_TITLE}</td> <td class="row2"><input type="text" size="45" name="menuname" value="{catrow.menurow.E_MENU_TITLE}" class="post" /></td> </tr> <tr> <td class="row1">{catrow.menurow.L_MENU_ACTIVE}</td> <td class="row2">{catrow.menurow.S_MENU_ACTIVE}</td> </tr> <tr> <td class="row1" colspan="2">{catrow.menurow.L_MENU_ACTION_ADV}</td> </tr> <tr> <td class="row1" valign="top">{catrow.menurow.L_MENU_ICON}</td> <td class="row2">{catrow.menurow.S_POSTICONS}</td> </tr> <tr> <td class="row1">{catrow.menurow.L_MENU_ALT_ICON}</td> <td class="row2"><input type="text" size="65" name="menu_alt_icon" value="{catrow.menurow.E_MENU_ALT_ICON}" class="post" /></td> </tr> <tr> <td class="row1">{catrow.menurow.L_MENU_ALT_ICON_HOT}</td> <td class="row2"><input type="text" size="65" name="menu_alt_icon_hot" value="{catrow.menurow.E_MENU_ALT_ICON_HOT}" class="post" /></td> </tr> <tr> <td class="row2" colspan="2" align="center">{catrow.menurow.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{catrow.menurow.S_SUBMIT}" class="liteoption" /></td> </tr> </table> </form> </div> </td> </tr> <!-- Menu Edit --> </table> </td> </tr> </table> </td> </tr> <!-- END menurow --> </table> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> <!-- END catrow --> </table> <script type="text/javascript"> <!-- BEGIN catrow --> menuCats['adminCat_{catrow.CAT_ID}'] = new menuCat('{catrow.CAT_ID}', 'adminCat_', '{catrow.VISIBLE}'); menuCats['adminCatEdit_{catrow.CAT_ID}'] = new menuCat('{catrow.CAT_ID}', 'adminCatEdit_', '{catrow.VISIBLE_EDIT}' ); <!-- BEGIN menurow --> menuCats['adminMenuEdit_{catrow.menurow.MENU_ID}'] = new menuCat('{catrow.menurow.MENU_ID}', 'adminMenuEdit_', '{catrow.menurow.VISIBLE_EDIT}'); <!-- END menurow --> <!-- END catrow --> // --> </script> Index: mx_module_parameters.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/templates/subSilver/admin/mx_module_parameters.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_module_parameters.tpl 9 Jul 2007 21:58:30 -0000 1.6 --- mx_module_parameters.tpl 21 Jul 2007 23:09:31 -0000 1.7 *************** *** 405,408 **** --- 405,411 ---- <!-- Cat Edit --> + <!-- BEGIN nocat --> + {catrow.nocat.NONE} + <!-- END nocat --> <!-- BEGIN menurow --> |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:54
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26288/admin Modified Files: mx_pagecp_admin_body.tpl Log Message: Index: mx_pagecp_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_pagecp_admin_body.tpl,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mx_pagecp_admin_body.tpl 9 Jul 2007 21:58:45 -0000 1.13 --- mx_pagecp_admin_body.tpl 21 Jul 2007 23:09:47 -0000 1.14 *************** *** 300,333 **** <form method="post" name="jumpbox" action="{S_ACTION}"> <table width="100%" cellspacing="0" cellpadding="0" border="0" > - <!-- - <tr> - <td colspan="2"> - <span class="gensmall"><b>{L_INCLUDE_ALL}:</b> - <input type="radio" name="include_all" value="1" {S_INCLUDE_ALL_YES} /> {L_YES} <input type="radio" name="include_all" value="0" {S_INCLUDE_ALL_NO} /> {L_NO} - <input type="submit" value="{S_SUBMIT}" class="liteoption" /> - </span> - </td> - </tr> - --> <tr> - <td align="left"> - <span class="genmed"> - <b>{L_SELECT_SORT_METHOD}:</b> - <select name="sort_method"> - <option {S_PAGE_TITLE} value='page_name'>{L_SORT_TITLE}</option> - <option {S_PAGE_DESC} value='page_desc'>{L_SORT_DESC}</option> - <option {S_PAGE_ID} value='page_id'>{L_SORT_ID}</option> - </select> - <b>{L_ORDER}:</b> - <select name="sort_order"> - <option {SORT_ASC} value="ASC">{L_ASC}</option> - <option {SORT_DESC} value="DESC">{L_DESC}</option> - </select> - <input type="submit" name="submit" value="{L_SORT}" class="liteoption" /> - </span> - </td> <td nowrap="nowrap" align="right"> <span class="gensmall"><b>{L_QUICK_NAV}</b> ! {PAGE_SELECT_BOX} <input type="submit" value="{S_SUBMIT}" class="liteoption" /> </span> --- 300,307 ---- <form method="post" name="jumpbox" action="{S_ACTION}"> <table width="100%" cellspacing="0" cellpadding="0" border="0" > <tr> <td nowrap="nowrap" align="right"> <span class="gensmall"><b>{L_QUICK_NAV}</b> ! <select name="page_id" class="forminput">{PAGE_SELECT_BOX}</select> <input type="submit" value="{S_SUBMIT}" class="liteoption" /> </span> *************** *** 659,662 **** --- 633,640 ---- </tr> <tr> + <td width="50%" align="right" >{L_PAGE_PARENT}</td> + <td><select name="page_parent" class="forminput">{pages.E_PAGE_PARENT}" class="post" /></select></td> + </tr> + <tr> <td width="50%" align="right" >{L_PAGE_HEADER}</td> <td><input type="text" size="45" name="page_header" value="{pages.E_PAGE_HEADER}" class="post" /></td> |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:21
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26228 Modified Files: lang_admin.php Log Message: Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/language/lang_english/lang_admin.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang_admin.php 9 Jul 2007 21:58:17 -0000 1.7 --- lang_admin.php 21 Jul 2007 23:09:17 -0000 1.8 *************** *** 46,49 **** --- 46,52 ---- $lang['Menu_par_title'] = 'General Menu Navigation Settings:'; $lang['Show_cat'] = 'Folded/Unfolded Category: <br /> - Default value, before user value is set:'; + $lang['Menu_active_select'] = 'Activate<br />The page is included by this site navigation block'; + $lang['Menu_active'] = 'Yes'; + $lang['Menu_not_active'] = 'No'; $lang['Move_and_or_Delete'] = 'Delete (and move)'; *************** *** 55,70 **** // Parameter Types // ! $lang['ParType_kb_type_select'] = 'Advanced phpBB Source Forum Selection'; ! $lang['ParType_kb_type_select_info'] = ''; ! $lang['ParType_default_article_id'] = 'Default Article'; ! $lang['ParType_default_article_id_info'] = '- Article Reader'; // // Parameter Names // - $lang['kb_type_select'] = 'KB Source:'; - $lang['kb_type_select_explain'] = 'Select Source KB categories and article types'; - $lang['default_article_id'] = 'Default Article:'; - $lang['default_article_id_explain'] = '- This article is default (first) displayed if noone else is chosen'; ?> \ No newline at end of file --- 58,67 ---- // Parameter Types // ! $lang['ParType_nav_menu'] = 'Nav Menu'; ! $lang['ParType_site_menu'] = 'Site Menu'; // // Parameter Names // ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:17
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25812/includes Modified Files: navmenu_functions.php Log Message: Index: navmenu_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/includes/navmenu_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** navmenu_functions.php 5 May 2007 20:14:43 -0000 1.6 --- navmenu_functions.php 21 Jul 2007 23:09:03 -0000 1.7 *************** *** 201,203 **** --- 201,449 ---- return ( array('pagemapping' => $pageMapping, 'navcategory' => $navCategory) ); } + + /** + * Enter description here... + * + * @access public + * @param unknown_type $block_id + * @return unknown + */ + function mx_get_site_menu($block_id) + { + global $db; + + $sql = "SELECT * + FROM " . MENU_CAT_TABLE . " cat, + " . MENU_NAV_TABLE . " nav + WHERE cat.block_id = '" . $block_id . "' + AND cat.cat_id = nav.cat_id + ORDER BY cat.cat_order, nav.menu_order"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt query Navigation Menu', '', __LINE__, __FILE__, $sql ); + } + + $mx_nav_data = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + $num_of_menus = count($mx_nav_data); + + // + // Generate Page to Menu Cat mapping + // + $cat_id = 0; + $num_of_cats = 0; + $navCategory = array(); + $pageMapping = array(); + for( $menu_count = 0; $menu_count < $num_of_menus; $menu_count++ ) + { + // + // New category + // + if ( $cat_id != $mx_nav_data[$menu_count]['cat_id'] ) + { + if ($mx_nav_data[$menu_count]['cat_url'] != '0' && !isset($pageMapping[$mx_nav_data[$menu_count]['cat_url']])) + { + $pageMapping[$mx_nav_data[$menu_count]['cat_url']] = $mx_nav_data[$menu_count]['cat_id']; + } + } + + $cat_id = $mx_nav_data[$menu_count]['cat_id']; + + // + // Menu Maps + // + if ($mx_nav_data[$menu_count]['page_id'] != '0' && !isset($pageMapping[$mx_nav_data[$menu_count]['page_id']])) + { + $pageMapping[$mx_nav_data[$menu_count]['page_id']] = $mx_nav_data[$menu_count]['cat_id']; + } + + // + // Group categories + // + $navCategory[$mx_nav_data[$menu_count]['cat_id']][] = $mx_nav_data[$menu_count]; + } + + unset($mx_nav_data); + + return ( array('pagemapping' => $pageMapping, 'navcategory' => $navCategory) ); + } + + /** + * Enter description here... + * + * @param unknown_type $cat_parent + * @param unknown_type $depth + */ + function generate_site_menu( $page_parent = 0, $depth = 0, $current_parent_page = false ) + { + global $mx_page, $template, $phpEx, $images, $block_id, $mx_root_path; + + if ( isset( $mx_page->subpage_rowset[$page_parent] ) ) + { + foreach( $mx_page->subpage_rowset[$page_parent] as $subpage_id => $page_data ) + { + // Auth check + $_auth_ary = $mx_page->auth($page_data['auth_view'], $page_data['auth_view_group'], $page_data['auth_moderator_group']); + if ($_auth_ary['auth_view'] && $page_data['menu_active']) + { + if ( $depth == 0 ) + { + $cat = $page_data['page_name']; + + // + // Is this category a custom link? If not, link to first menu page. + // + $cat_target = ( true ) ? '' : '_blank'; + $cat_url_tmp = mx_append_sid(PORTAL_URL . 'index.php?page=' . $page_data['page_id'] . '&cat_link=' . $page_data['page_id']); + $catt = ( true ) ? '<a class="nav" href="' . $cat_url_tmp . '" target="' . $cat_target . '" /><span class="nav">' . $cat . '</span></a>' : '<span class="nav">' . $cat . '</span>'; + $cat_url = ( true ) ? $cat_url_tmp : 'javascript:void(0)'; + + // + // Get menu icon + // + if (true) + { + $icon_tmp = ( file_exists($mx_root_path . $images['mx_graphics']['menu_icons'] . '/' . $page_data['menu_icon']) ? $page_data['menu_icon'] : 'icon_blank.gif' ); + $icon_url_hot = str_replace('.gif', '_hot.gif', $icon_tmp); + + if ( file_exists($mx_root_path . $images['mx_graphics']['menu_icons'] . '/' . $icon_url_hot) ) + { + $icon_url = ( $page_data['is_current'] ) ? $icon_url_hot : $icon_tmp; + $icon_style = ( $page_data['is_current'] ) ? 'mx_icon_hot' : 'mx_icon'; + } + else + { + $icon_url = $icon_tmp; + $icon_style = ''; + } + + $menu_icon = ( !empty($page_data['menu_icon']) && $page_data['menu_icon'] != 'none' ) ? '<img class="'.$icon_style.'" border="0" align="absmiddle" src="' . PORTAL_URL . $images['mx_graphics']['menu_icons'] . '/' . $icon_url . '" alt="' . $desc . '" /> ' : ''; + } + else + { + $icon_url = ( $is_current ) ? (!empty($page_data['menu_alt_icon_hot']) ? $page_data['menu_alt_icon_hot'] : $page_data['menu_alt_icon']) : $page_data['menu_alt_icon']; + $menu_icon = '<img border="0" align="absmiddle" src="' . $icon_url . '" alt="' . $desc . '" /> '; + } + + // + // For overall_header navigation + // - is this current page category? + $current_parent_page = ($mx_page->page_id == $page_data['page_id'] || has_active_subpage($subpage_id) || ( isset($_GET['cat_link']) ? intval($_GET['cat_link']) == $page_data['page_id'] : false) ) ? true : false; + + // + // Update cookie - if this was a cat link + // + if ( (isset($_GET['cat_link']) ? intval($_GET['cat_link']) == $page_data['page_id'] : false) || $current_parent_page) + { + setcookie('mxNavCat_' . intval($block_id) . intval($page_data['page_id']), true, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); + $HTTP_COOKIE_VARS['mxNavCat_' . $block_id . $page_data['page_id']] = 1; + } + + // + // Generate the fold/unfold categories switches + // + $cat_on = $current_parent_page ? true : ( isset($HTTP_COOKIE_VARS['mxNavCat_' . $block_id . $page_data['page_id']]) ? $HTTP_COOKIE_VARS['mxNavCat_' . $block_id . $page_data['page_id']] == 1 : $catData[0]['cat_show'] == 1 ); + + $template->assign_block_vars('catrow', array( + 'CAT_ID' => intval($page_data['page_id']), + 'BLOCK_ID' => intval($block_id), + 'CATEGORY' => $catt, + 'CATEGORY_URL' => $cat_url, + 'CATEGORY_NAME' => $cat, + 'U_CAT_NAV_CONTRACT' => $images['mx_contract'], + 'U_CAT_NAV_EXPAND' => $images['mx_expand'], + 'U_CAT_NAV_DYNAMIC' => $cat_on ? $images['mx_contract'] : $images['mx_expand'], + 'CAT_SHOW' => $cat_on ? '' : 'none', + 'U_MENU_ICON' => $menu_icon, + 'CURRENT' => $current_parent_page ? '-current' : '' + )); + + generate_site_menu( $subpage_id, $depth + 1, $current_parent_page ); + } + else + { + $is_current = $mx_page->page_id == $page_data['page_id']; + $action = $page_data['page_name']; + $action = ( !empty($lang[$action]) ? $lang[$action] : $action ); + $style = $is_current ? 'cattitle' : 'genmed'; + + // + // Get menu icon + // + if (true) + { + $icon_tmp = ( file_exists($mx_root_path . $images['mx_graphics']['menu_icons'] . '/' . $page_data['menu_icon']) ? $page_data['menu_icon'] : 'icon_blank.gif' ); + $icon_url_hot = str_replace('.gif', '_hot.gif', $icon_tmp); + + if ( file_exists($mx_root_path . $images['mx_graphics']['menu_icons'] . '/' . $icon_url_hot) ) + { + $icon_url = ( $page_data['is_current'] ) ? $icon_url_hot : $icon_tmp; + $icon_style = ( $page_data['is_current'] ) ? 'mx_icon_hot' : 'mx_icon'; + } + else + { + $icon_url = $icon_tmp; + $icon_style = ''; + } + + $menu_icon = ( !empty($page_data['menu_icon']) && $page_data['menu_icon'] != 'none' ) ? '<img class="'.$icon_style.'" border="0" align="absmiddle" src="' . PORTAL_URL . $images['mx_graphics']['menu_icons'] . '/' . $icon_url . '" alt="' . $desc . '" /> ' : ''; + } + else + { + $icon_url = ( $is_current ) ? (!empty($page_data['menu_alt_icon_hot']) ? $page_data['menu_alt_icon_hot'] : $page_data['menu_alt_icon']) : $page_data['menu_alt_icon']; + $menu_icon = '<img border="0" align="absmiddle" src="' . $icon_url . '" alt="' . $desc . '" /> '; + } + + // + // Generate Links + // + $menu_link = mx_append_sid(PORTAL_URL . 'index.php?page=' . $page_data['page_id']); + + + $link_target = ( true ) ? '' : '_blank'; + $row_color_over = $theme['tr_color2']; + + $menu_array = array( + 'ROW_COLOR_OVER' => '#' . $row_color_over, + 'MENU_NAME' => $action, + 'MENU_STYLE' => $style, + 'MENU_DESC' => $desc, + 'U_MENU_MODULE' => $menu_link, + 'U_LINK_TARGET' => $link_target, + 'U_MENU_ICON' => $menu_icon + ); + + $template->assign_block_vars('catrow.modulerow', $menu_array); + + if ($current_parent_page) + { + $template->assign_block_vars('modulerow', $menu_array); + } + } + } // End Auth + } + return; + } + return; + } + + function has_active_subpage($page_parent = 0, $depth = 0) + { + global $mx_page; + + if ( isset( $mx_page->subpage_rowset[$page_parent] ) ) + { + foreach( $mx_page->subpage_rowset[$page_parent] as $subpage_id => $page_data ) + { + if ($mx_page->page_id == $subpage_id) + { + return true; + } + } + return has_active_subpage($subpage_id, $depth + 1);; + } + return false; + } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:09:17
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25812/admin Modified Files: mx_module_defs.php Log Message: Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/admin/mx_module_defs.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mx_module_defs.php 9 Jul 2007 21:58:04 -0000 1.26 --- mx_module_defs.php 21 Jul 2007 23:09:03 -0000 1.27 *************** *** 30,33 **** --- 30,34 ---- define('MX_MENU_CAT_TYPE' , 1); define('MX_MENU_TYPE' , 2); + define('MX_MENU_PAGE_TYPE' , 3); class mx_module_defs *************** *** 52,55 **** --- 53,57 ---- $type_row['nav_menu'] = !empty($lang['ParType_nav_menu']) ? $lang['ParType_nav_menu'] : "Navigation Menu"; + $type_row['site_menu'] = !empty($lang['ParType_site_menu']) ? $lang['ParType_site_menu'] : "Site Nav Menu"; return $type_row; *************** *** 59,63 **** // Display cuztom parameter field and data in the Block Control Panel // =================================================== - /* function display_module_parameters( $parameter_data, $block_id ) { --- 61,64 ---- *************** *** 66,77 **** switch ( $parameter_data['parameter_type'] ) { } } - */ // =================================================== ! // Display cuztom Panel // =================================================== ! function display_module_parameters( $parameter_data, $block_id ) { global $template, $board_config, $db, $theme, $lang, $images, $mx_blockcp, $mx_root_path, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $userdata, $mx_request_vars, $dynamic_block_id, $portalpage, $mx_cache, $phpEx; --- 67,84 ---- switch ( $parameter_data['parameter_type'] ) { + case 'nav_menu': + $this->display_panel_nav_menu( $parameter_data, $block_id ); + break; + + case 'site_menu': + $this->display_panel_site_menu( $parameter_data, $block_id ); + break; } } // =================================================== ! // Display cuztom Panel - Nav Menu // =================================================== ! function display_panel_nav_menu( $parameter_data, $block_id ) { global $template, $board_config, $db, $theme, $lang, $images, $mx_blockcp, $mx_root_path, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $userdata, $mx_request_vars, $dynamic_block_id, $portalpage, $mx_cache, $phpEx; *************** *** 300,323 **** // --------------------------------------------------------------------------------------- - /* - // - // Get menu data - // - if ( $mx_cache->_exists( '_menu_' . $block_id ) ) - { - $mx_nav_data = $mx_cache->get( '_menu_' . $block_id ); - } - else - { - $mx_nav_data = mx_get_nav_menu($block_id); - $mx_cache->put( '_menu_' . $block_id, $mx_nav_data ); - } - - $navCategory = $mx_nav_data['navcategory']; - $pageMapping = $mx_nav_data['pagemapping']; - - $total_cats = count($navCategory); - */ - $sql = "SELECT * FROM " . MENU_CAT_TABLE . " --- 307,310 ---- *************** *** 697,700 **** --- 684,1111 ---- } + // =================================================== + // Display cuztom Panel - Nav Menu + // =================================================== + function display_panel_site_menu( $parameter_data, $block_id ) + { + global $template, $board_config, $db, $theme, $lang, $images, $mx_blockcp, $mx_root_path, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $userdata, $mx_request_vars, $dynamic_block_id, $portalpage, $mx_cache, $phpEx; + + $mx_page = new mx_page(); + $mx_page->init('1'); + + // + // Includes + // + include_once( $mx_root_path . 'modules/mx_navmenu/includes/navmenu_functions.' . $phpEx ); + + $parameter_id = $parameter_data['parameter_id']; + + // + // Load states + // + $cookie_tmp = $board_config['cookie_name'].'_admincp_sitestates'; + $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); + + // + // Define some graphics + // + $admin_icon_url = PORTAL_URL . $images['mx_graphics']['admin_icons'] . '/'; + $admin_icon['contract'] = $admin_icon_url . 'contract.gif'; + $admin_icon['expand'] = $admin_icon_url . 'expand.gif'; + $admin_icon['page'] = $admin_icon_url . 'icon_page.gif'; + $admin_icon['page_column'] = $admin_icon_url . 'icon_page_column.gif'; + $admin_icon['function'] = $admin_icon_url . 'icon_function.gif'; + $admin_icon['parameter'] = $admin_icon_url . 'icon_parameter.gif'; + $admin_icon['block'] = $admin_icon_url . 'icon_block.gif'; + $admin_icon['edit_block'] = $admin_icon_url . 'icon_edit.gif'; + + $link_target_options = array(); + $link_target_options = array("Default", "New browser", "IncludeX Block"); + + // + // Mode setting + // + $mode = $mx_request_vars->request('panel_mode', MX_TYPE_NO_TAGS, ''); + $action = $mx_request_vars->request('panel_action', MX_TYPE_NO_TAGS, ''); + + // + // Parameters + // + $submit = ( isset($HTTP_POST_VARS['submit']) ) ? true : false; + $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false; + $preview = ( isset($HTTP_POST_VARS['preview']) ) ? true : false; + $refresh = $preview || $submit_search; + + // + // SUBMIT? + // + if( !empty($mode) && !empty($action) ) + { + // + // Get vars + // + $portalpage = $mx_request_vars->request('portalpage', MX_TYPE_INT, 1); + $id = $mx_request_vars->request('id', MX_TYPE_INT, ''); + + // + // Send to db functions + // + $result_message = $this->do_it($mode, $action, $id); + + // + // If new + // + if (is_array($result_message)) + { + //$nav_page_id = $result_message['new_page_id']; + $result_message = $result_message['text']; + } + + // + // Refresh mx_block object with new settings + // + $mx_blockcp->init($block_id, true); + $mx_page->init('1'); + + } // if .. !empty($mode) + + // DO IT DO IT + + $template->set_filenames(array( + 'parameter' => 'admin/mx_module_parameters_site.tpl') + ); + + $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; + + $show_cat_sel = '<select name="cat_show_sel"><option value="0">' . ( !empty($lang['Folded']) ? $lang['Folded'] : 'Folded' ) . '</option><option value="1" selected="selected">' . ( !empty($lang['Unfolded']) ? $lang['Unfolded'] : 'Unfolded' ) . '</option></select>'; + + // + // Get blockcp mode -> to set action file + // + $s_action_file = $mx_blockcp->blockcp_mode == 'mx_blockcp' ? 'modules/mx_coreblocks/mx_blockcp.php' : 'admin/admin_mx_block_cp.php'; + + // + // Main parameters + // + $template->assign_vars(array( + 'L_YES' => $lang['Yes'], + 'L_NO' => $lang['No'], + + 'SID' => $userdata['session_id'], + 'RESULT_MESSAGE' => !empty($result_message) ? '<div style="overflow:auto; height:50px;"><span class="gensmall">' . $result_message . '<br/> -::-</span></div>': '', + + // + // Graphics + // + 'IMG_URL_CONTRACT' => $admin_icon['contract'], + 'IMG_URL_EXPAND' => $admin_icon['expand'], + + 'IMG_ICON_PAGE' => $admin_icon['page'], + 'IMG_ICON_PAGE_COLUMN' => $admin_icon['page_column'], + 'IMG_ICON_FUNCTION' => $admin_icon['function'], + 'IMG_ICON_PARAMETER' => $admin_icon['parameter'], + 'IMG_ICON_BLOCK' => $admin_icon['block'], + 'IMG_ICON_EDIT_BLOCK' => $admin_icon['edit_block'], + + // + // Cookies + // + 'COOKIE_NAME' => $board_config['cookie_name'], + 'COOKIE_PATH' => $board_config['cookie_path'], + 'COOKIE_DOMAIN' => $board_config['cookie_domain'], + 'COOKIE_SECURE' => $board_config['cookie_secure'], + + 'L_SUBJECT' => $lang['Subject'], + 'L_SUBMIT' => $lang['Submit'], + 'L_CANCEL' => $lang['Cancel'], + + 'L_SUBMIT' => $lang['Update'], + 'L_RESET' => $lang['Reset'], + 'L_MENU_PAR_TITLE' => $lang['Menu_par_title'], + + 'L_MENU_TITLE' => $lang['Menu_admin'], + 'L_MENU_EXPLAIN' => $lang['Menu_admin_explain'], + + 'S_SHOW_CAT' => $show_cat_sel, + 'U_PHPBB_ROOT_PATH' => PHPBB_URL, + 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, + + 'L_EDIT' => $lang['Edit'], + 'L_MOVE_UP' => $lang['Move_up'], + 'L_MOVE_DOWN' => $lang['Move_down'], + 'L_RESYNC' => $lang['Resync'], + 'L_CHANGE_NOW' => $lang['Change'], + + 'L_BLOCK' => $lang['Block'], + + 'S_ACTION' => append_sid(PORTAL_URL . $s_action_file), + )); + + if( !empty($portalpage) ) + { + $template->assign_block_vars('block_mode', array( + 'U_RETURN' => append_sid(PORTAL_URL . "index.$phpEx?page=$portalpage") + )); + } + + // + // ---------------------------------------------------------------------------------- Cats + // + + // Display list of Categories --------------------------------------------------------------- + // --------------------------------------------------------------------------------------- + + /* + $sql = "SELECT * + FROM " . MENU_CAT_TABLE . " + WHERE block_id = '" . $block_id . "' + ORDER BY cat_order"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt query Navigation Categories', '', __LINE__, __FILE__, $sql ); + } + + $cat_rows = array(); + if( $total_cats = $db->sql_numrows($result) ) + { + $cat_rows = $db->sql_fetchrowset($result); + } + + $db->sql_freeresult($result); + */ + + $cat_rows = array(); + if (isset($mx_page->subpage_rowset[0])) + { + foreach ($mx_page->subpage_rowset[0] as $temp_page_id => $cat_row) + { + $cat_rows[] = $cat_row; + } + } + $total_cats = count($cat_rows); + + if ( $total_cats == 0 ) + { + $template->assign_block_vars('nocat', array( + 'NONE' => $lang['No_pages'] + )); + } + + for( $cat_count = 0; $cat_count < $total_cats; $cat_count++ ) + { + $cat_id = $cat_rows[$cat_count]['page_id']; + + $mode = MX_MENU_PAGE_TYPE; + $action = MX_DO_UPDATE; + + $upmode = '?panel_mode=' . $mode . '&panel_action=' . MX_DO_MOVE . '&id=' . $cat_id . '&block_id=' . $block_id . '&block_order=' . $block_order . '&move=-15' . '&portalpage=' . $portalpage. '&dynamic_block=' . $dynamic_block_id; + $downmode = '?panel_mode=' . $mode . '&panel_action=' . MX_DO_MOVE . '&id=' . $cat_id . '&block_id=' . $block_id . '&block_order=' . $block_order . '&move=15' . '&portalpage=' . $portalpage. '&dynamic_block=' . $dynamic_block_id; + + // + // Hidden fields + // + $s_hidden_cat_fields = '<input type="hidden" name="panel_mode" value="' . $mode . '" /> + <input type="hidden" name="panel_action" value="' . $action . '" /> + <input type="hidden" name="id" value="' . $cat_id . '" /> + <input type="hidden" name="block_id" value="' . $block_id . '" /> + <input type="hidden" name="dynamic_block" value="' . $dynamic_block_id . '" /> + <input type="hidden" name="portalpage" value="' . $portalpage . '" /> + <input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; + + $cat_title = $cat_rows[$cat_count]['page_name']; + + // + // Page subpanel - edit + // + $menu_active = $cat_rows[$cat_count]['menu_active']; + + if( $menu_active == 1 ) + { + $menu_active_select = '<select name="menu_active"><option value="1" selected="selected">' . ( !empty($lang['Menu_active']) ? $lang['Menu_active'] : 'Menu_active' ) . '</option><option value="0">' . ( !empty($lang['Menu_not_active']) ? $lang['Menu_not_active'] : 'Menu_not_active' ) . '</option></select>'; + } + else + { + $menu_active_select = '<select name="menu_active"><option value="1">' . ( !empty($lang['Menu_active']) ? $lang['Menu_active'] : 'Menu_active' ) . '</option><option value="0" selected="selected">' . ( !empty($lang['Menu_not_active']) ? $lang['Menu_not_active'] : 'Menu_not_active' ) . '</option></select>'; + } + + $menuicons = post_icons('menu_icons/', $cat_rows[$cat_count]['menu_icon']); + $menu_alt_icon = $cat_rows[$cat_count]['menu_alt_icon']; + $menu_alt_icon_hot = $cat_rows[$cat_count]['menu_alt_icon_hot']; + + $visible_cat = in_array('adminCat_' . $cat_id, $cookie_states); + $visible_cat_edit = in_array('adminCatEdit_' . $cat_id, $cookie_states); + + $template->assign_block_vars('catrow', array( + 'CAT_ID' => $cat_id, + + 'VISIBLE' => $visible_cat ? 'block' : 'none', + 'VISIBLE_EDIT' => $visible_cat_edit || $new_page ? 'block' : 'none', + + 'IMG_URL' => $visible_cat ? $admin_icon['contract'] : $admin_icon['expand'], + 'IMG_URL_EDIT' => $visible_cat_edit ? $admin_icon['contract'] : $admin_icon['expand'], + + 'CAT_TITLE' => $cat_title, + + 'U_CAT_MOVE_UP' => append_sid($mx_root_path . $s_action_file . $upmode . '&sid=' . $userdata['session_id']), + 'U_CAT_MOVE_DOWN' => append_sid($mx_root_path . $s_action_file . $downmode . '&sid=' . $userdata['session_id'] ), + + // + // EDIT CAT + // + 'L_TITLE_EDIT' => $lang['Edit_Category'], + + 'L_CAT_TITLE' => $lang['Category'], + 'L_MENU_ICON' => $lang['Menu_icon'], + 'L_MENU_ALT_ICON' => $lang['Menu_alt_icon'], + 'L_MENU_ALT_ICON_HOT' => $lang['Menu_alt_icon_hot'], + 'L_MENU_ACTIVE' => $lang['Menu_active_select'], + + 'E_CAT_TITLE' => $cat_title, + 'E_MENU_ICON' => $menuicon, + 'E_MENU_ALT_ICON' => $menu_alt_icon, + 'E_MENU_ALT_ICON_HOT' => $menu_alt_icon_hot, + 'S_POSTICONS' => $menuicons, + 'S_MENU_ACTIVE' => $menu_active_select, + + 'S_HIDDEN_FIELDS' => $s_hidden_cat_fields, + 'S_SUBMIT' => $lang['Update'] + + )); + + /* + $num_of_menus = count($catData); + */ + + /* + $sql = "SELECT * + FROM " . MENU_NAV_TABLE . " + WHERE cat_id = '" . $cat_id . "' + ORDER BY menu_order"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt query Navigation menus', '', __LINE__, __FILE__, $sql ); + } + + $menu_rows = array(); + if( $total_menus = $db->sql_numrows($result) ) + { + $menu_rows = $db->sql_fetchrowset($result); + } + + $db->sql_freeresult($result); + */ + + $menu_rows = array(); + if (isset($mx_page->subpage_rowset[$cat_id])) + { + foreach ($mx_page->subpage_rowset[$cat_id] as $temp_subpage_id => $menu_row) + { + $menu_rows[] = $menu_row; + } + } + $total_menus = count($menu_rows); + + if ( $total_menus == 0 ) + { + $template->assign_block_vars('catrow.nocat', array( + 'NONE' => $lang['No_pages'] + )); + } + + for( $menu_count = 0; $menu_count < $total_menus; $menu_count++ ) + { + $menu_id = $menu_rows[$menu_count]['page_id']; + + $mode = MX_MENU_PAGE_TYPE; + $action = MX_DO_UPDATE; + + $upmode = '?panel_mode=' . $mode . '&panel_action=' . MX_DO_MOVE . '&id=' . $menu_id . '&cat_id=' . $cat_id . '&block_id=' . $block_id . '&block_order=' . $block_order . '&move=-15'; + $downmode = '?panel_mode=' . $mode . '&panel_action=' . MX_DO_MOVE . '&id=' . $menu_id . '&cat_id=' . $cat_id . '&block_id=' . $block_id . '&block_order=' . $block_order . '&move=15'; + + // + // Hidden fields + // + $s_hidden_menu_fields = '<input type="hidden" name="panel_mode" value="' . $mode . '" /> + <input type="hidden" name="panel_action" value="' . $action . '" /> + <input type="hidden" name="id" value="' . $menu_id . '" /> + <input type="hidden" name="block_id" value="' . $block_id . '" /> + <input type="hidden" name="portalpage" value="' . $portalpage . '" /> + <input type="hidden" name="cat_id" value="' . $cat_id . '" /> + <input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; + + + $menuname = $menu_rows[$menu_count]['page_name']; + + $menu_active = $menu_rows[$menu_count]['menu_active']; + + if( $menu_active == 1 ) + { + $menu_active_select = '<select name="menu_active"><option value="1" selected="selected">' . ( !empty($lang['Menu_active']) ? $lang['Menu_active'] : 'Menu_active' ) . '</option><option value="0">' . ( !empty($lang['Menu_not_active']) ? $lang['Menu_not_active'] : 'Menu_not_active' ) . '</option></select>'; + } + else + { + $menu_active_select = '<select name="menu_active"><option value="1">' . ( !empty($lang['Menu_active']) ? $lang['Menu_active'] : 'Menu_active' ) . '</option><option value="0" selected="selected">' . ( !empty($lang['Menu_not_active']) ? $lang['Menu_not_active'] : 'Menu_not_active' ) . '</option></select>'; + } + + $menuicons = post_icons('menu_icons/', $menu_rows[$menu_count]['menu_icon']); + $menu_alt_icon = $menu_rows[$menu_count]['menu_alt_icon']; + $menu_alt_icon_hot = $menu_rows[$menu_count]['menu_alt_icon_hot']; + + // Replace htmlentites for < and > with actual character. + $row_class = ( !( $menu_count % 2 ) ) ? 'row1' : 'row2'; + + $visible_menu_edit = in_array('adminMenuEdit_' . $menu_id, $cookie_states); + + $template->assign_block_vars('catrow.menurow', array( + 'MENU_ID' => $menu_id, + + "ROW_CLASS" => $row_class, + + 'VISIBLE_EDIT' => $visible_menu_edit ? 'block' : 'none', + + 'IMG_URL_EDIT' => $visible_menu_edit ? $admin_icon['contract'] : $admin_icon['expand'], + + 'MENU_TITLE' => $menuname, + 'ROW_COLOR' => $row_color, + + 'U_MENU_MOVE_UP' => append_sid($mx_root_path . $s_action_file . $upmode . '&sid=' . $userdata['session_id']), + 'U_MENU_MOVE_DOWN' => append_sid($mx_root_path . $s_action_file . $downmode . '&sid=' . $userdata['session_id']), + + // + // Menu EDIT + // + 'L_TITLE_EDIT' => $lang['Edit'], + + 'L_MENU_TITLE' => $l_title, + 'L_MENU_ACTION_TITLE' => $lang['Menu_action_title'], + 'L_MENU_ACTION_ADV' => $lang['Menu_action_adv'], + 'L_MENU_PERMISSIONS_TITLE' => $lang['Menu_permissions_title'], + + 'L_MENU_TITLE' => $lang['Menu_name'], + 'L_MENU_ICON' => $lang['Menu_icon'], + 'L_MENU_ALT_ICON' => $lang['Menu_alt_icon'], + 'L_MENU_ALT_ICON_HOT' => $lang['Menu_alt_icon_hot'], + 'L_MENU_CATEGORY' => $lang['Category'], + 'L_MENU_ACTIVE' => $lang['Menu_active_select'], + + 'E_MENU_TITLE' => htmlspecialchars($menuname), + 'E_MENU_ICON' => $menuicon, + 'E_MENU_ALT_ICON' => $menu_alt_icon, + 'E_MENU_ALT_ICON_HOT' => $menu_alt_icon_hot, + 'S_POSTICONS' => $menuicons, + 'S_MENU_ACTIVE' => $menu_active_select, + + 'S_HIDDEN_FIELDS' => $s_hidden_menu_fields, + 'S_SUBMIT' => $lang['Update'], + )); + + } // for ... menus + } // for ... categories + + $template->pparse('parameter'); + } + function do_it( $mode = '', $action = '', $id = '', $parent = false, $recache = true ) { *************** *** 905,909 **** function _do_update($type, $id ) { ! global $mx_root_path, $phpbb_root_path, $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $userdata, $mx_request_vars; switch ( $type ) --- 1316,1320 ---- function _do_update($type, $id ) { ! global $mx_root_path, $phpbb_root_path, $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $userdata, $mx_request_vars, $mx_cache; switch ( $type ) *************** *** 1014,1017 **** --- 1425,1483 ---- } + + case MX_MENU_PAGE_TYPE: + + if ( !MX_PANEL_DEBUG ) + { + if ( empty( $HTTP_POST_VARS['menuname'] ) && empty( $HTTP_POST_VARS['cat_title'] )) + { + mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); + } + + // + // Get toggles + // + $bbcode_on = $board_config['allow_bbcode'] ? true : false; + $html_on = $board_config['allow_html'] ? true : false; + $smilies_on = $board_config['allow_smilies'] ? true : false; + + // + // Instantiate the mx_text class + // + include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); + $mx_text = new mx_text(); + $mx_text->init($html_on, $bbcode_on, $smilies_on); + + // + // Encode for db storage + // + if ( empty( $HTTP_POST_VARS['cat_title'] )) + { + $menu_title = $mx_text->encode_simple($mx_request_vars->post('menuname', MX_TYPE_NO_STRIP | MX_TYPE_SQL_QUOTED, '')); + } + else + { + $menu_title = $mx_text->encode_simple($mx_request_vars->post('cat_title', MX_TYPE_NO_STRIP | MX_TYPE_SQL_QUOTED, '')); + } + + $sql = "UPDATE " . PAGE_TABLE . " + SET page_name = '" . $menu_title . "', + menu_icon = '" . $mx_request_vars->post('menuicons', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, '') . "', + menu_alt_icon = '" . $mx_request_vars->post('menu_alt_icon', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, '') . "', + menu_alt_icon_hot = '" . $mx_request_vars->post('menu_alt_icon_hot', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, '') . "', + menu_active = '" . $mx_request_vars->post('menu_active', MX_TYPE_INT, '') . "' + WHERE page_id = " . intval($id); + + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, "Couldn't update page information", "", __LINE__, __FILE__, $sql); + } + + // + // Update cache + // + $mx_cache->update(MX_CACHE_PAGE_TYPE, $id); + + } $message = $lang['AdminCP_action'] . ": " . $lang['Nav_menu'] . ' (' . $mx_request_vars->post('menuname', MX_TYPE_NO_TAGS, '') . ') ' . $lang['was_updated']; *************** *** 1182,1259 **** break; ! default: ! $message = $lang['AdminCP_action'] . ": " . $lang['Invalid_action']; ! break; ! } ! ! return $message; ! } ! /* ! function do_it() ! { ! if( !empty($mode) ) ! { ! switch( $mode ) ! { ! case 'deletecat': // ! // Show form to delete a category // ! $cat_id = intval($HTTP_GET_VARS['cat_id']); ! ! $buttonvalue = $lang['Move_and_Delete']; ! $newmode = 'movedelcat'; ! $catinfo = mx_get_info(MENU_CAT_TABLE, 'cat_id', $cat_id); ! $name = $catinfo['cat_title']; ! if( $catinfo['number'] == 1 ) ! { ! $sql = "SELECT COUNT(*) AS total ! FROM " . MENU_NAV_TABLE; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't get Menu count", "", __LINE__, __FILE__, $sql); ! } ! $count = $db->sql_fetchrow($result); ! $count = $count['total']; ! if( $count > 0 ) ! { ! mx_message_die(GENERAL_ERROR, $lang['Must_delete_menus']); ! } ! else ! { ! $select_to = $lang['Nowhere_to_move']; ! } ! } ! else { ! $select_to .= mx_get_list('to_id', MENU_CAT_TABLE, 'cat_id', 'cat_title', $cat_id, false); } ! $template->set_filenames(array( ! 'admin_menu' => 'admin/mx_menu_delete_body.tpl') ! ); ! $template->assign_vars(array( ! 'NAME' => $name, ! 'L_MENU_DELETE' => $lang['Menu_delete'], ! 'L_MENU_DELETE_EXPLAIN' => $lang['Menu_delete_explain'], ! 'L_MOVE_CONTENTS' => $lang['Move_contents'], ! 'L_MENU_NAME' => $lang['Menu_name'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_MENU_ACTION' => append_sid("admin_mx_menu.$phpEx?block_id=$block_id&portalpage=$portalpage"), ! 'S_SELECT_TO' => $select_to, ! 'S_SUBMIT_VALUE' => $buttonvalue ! )); ! $template->pparse('admin_menu'); ! break; ! } } } - */ function move_menu($mode, $id = 0) --- 1648,1688 ---- break; ! case MX_MENU_PAGE_TYPE: ! if ( !MX_PANEL_DEBUG ) ! { // ! // Change order of menus in the DB // ! $page_id = intval($id); ! $block_id = $mx_request_vars->request('block_id', MX_TYPE_INT, 0); ! $parent_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, 0); ! $move = $mx_request_vars->request('move', MX_TYPE_INT, 0); ! $sql = "UPDATE " . PAGE_TABLE . " ! SET page_order = page_order + $move ! WHERE page_id = $page_id ! AND page_parent = $parent_id"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't change page order", "", __LINE__, __FILE__, $sql); } ! $this->move_menu('page', $parent_id); ! $show_index = true; ! } + $message = $lang['AdminCP_action'] . ": " . $lang['Nav_menu'] . ' ' . $lang['was_moved']; ! break; ! default: ! $message = $lang['AdminCP_action'] . ": " . $lang['Invalid_action']; ! break; } + + return $message; } function move_menu($mode, $id = 0) *************** *** 1279,1282 **** --- 1708,1719 ---- break; + case 'page': + $table = PAGE_TABLE; + $idfield = 'page_id'; + $orderfield = 'page_order'; + $catfield = 'page_parent'; + $cat_id = $id; + break; + default: mx_message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__); *************** *** 1295,1298 **** --- 1732,1739 ---- break; + case 'page': + $sql .= " WHERE $catfield = $cat_id"; + break; + default: mx_message_die(GENERAL_ERROR, "Wrong mode", "", __LINE__, __FILE__); |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:08:54
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25449/mx_coreblocks Modified Files: CoreBlocks.pak db_upgrade.php Log Message: Index: CoreBlocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/CoreBlocks.pak,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CoreBlocks.pak 9 Jul 2007 21:57:50 -0000 1.16 --- CoreBlocks.pak 21 Jul 2007 23:08:05 -0000 1.17 *************** *** 1,3 **** ! module=+:10=+:Core Blocks=+:modules/mx_coreblocks/=+:mxBB Portal Core Blocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:10=+:3=+:DynamicBlock=+:Dynamic block, defined by its block_id=+:mx_dynamic.php=+: --- 1,3 ---- ! module=+:10=+:Core Blocks=+:modules/mx_coreblocks/=+:Standard Core Blocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:10=+:3=+:DynamicBlock=+:Dynamic block, defined by its block_id=+:mx_dynamic.php=+: Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/db_upgrade.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_upgrade.php 5 May 2007 20:13:37 -0000 1.5 --- db_upgrade.php 21 Jul 2007 23:08:06 -0000 1.6 *************** *** 45,48 **** --- 45,49 ---- $message .= mx_do_install_upgrade( $sql ); + $message .= "<b>...Now upgraded to v. $mx_module_version :-)</b><br/><br/>"; echo "<br /><br />"; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:08:25
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25449/mx_navmenu Modified Files: NavigationMenu.pak db_upgrade.php Added Files: mx_site_nav.php Log Message: Index: NavigationMenu.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/NavigationMenu.pak,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NavigationMenu.pak 9 Jul 2007 21:57:51 -0000 1.13 --- NavigationMenu.pak 21 Jul 2007 23:08:18 -0000 1.14 *************** *** 1,5 **** module=+:50=+:Navigation Menu=+:modules/mx_navmenu/=+:mxBB Portal Site Navigation=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:50=+:51=+:Navigation Menu=+:Site Navigation Menu Blocks=+:mx_menu_nav.php=+: parameter=+:51=+:66=+:Nav menu=+:nav_menu=+:=+:=+:0=+:10 parameter=+:51=+:93=+:menu_display_style=+:Radio_single_select=+:Classic=+:a:5:{i:0;s:7:"Classic";i:1;s:8:"Advanced";i:2;s:15:"Simple_CSS_menu";i:3;s:17:"Advanced_CSS_menu";i:4;s:18:"Overall_navigation";}=+:0=+:20 --- 1,5 ---- module=+:50=+:Navigation Menu=+:modules/mx_navmenu/=+:mxBB Portal Site Navigation=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:50=+:51=+:User Navigation Menu=+:Site Navigation=+:mx_menu_nav.php=+: parameter=+:51=+:66=+:Nav menu=+:nav_menu=+:=+:=+:0=+:10 parameter=+:51=+:93=+:menu_display_style=+:Radio_single_select=+:Classic=+:a:5:{i:0;s:7:"Classic";i:1;s:8:"Advanced";i:2;s:15:"Simple_CSS_menu";i:3;s:17:"Advanced_CSS_menu";i:4;s:18:"Overall_navigation";}=+:0=+:20 *************** *** 7,10 **** parameter=+:51=+:64=+:menu_page_sync=+:Boolean=+:0=+:=+:0=+:40 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Navigation Menu=+:Demo block=+:51=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 7,15 ---- parameter=+:51=+:64=+:menu_page_sync=+:Boolean=+:0=+:=+:0=+:40 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - User Navigation Menu=+:Demo block=+:51=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:50=+:100=+:Page Navigation Menu=+:Site Navigation=+:mx_site_nav.php=+: ! parameter=+:100=+:202=+:Site Menu=+:site_menu=+:=+:=+:0=+:0 ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Page Navigation Menu=+:Demo block=+:100=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: mx_site_nav.php --- <?php /** * * @package mxBB Portal Module - mx_navmenu * @version $Id: mx_site_nav.php,v 1.1 2007/07/21 23:08:19 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings // $title = $mx_block->block_info['block_title']; $b_description = $mx_block->block_info['block_desc']; // // Includes // include_once( $module_root_path . 'includes/navmenu_constants.' . $phpEx ); include_once( $module_root_path . 'includes/navmenu_functions.' . $phpEx ); // // Setup config parameters // $config_name = array('menu_display_style', 'menu_display_mode', 'menu_page_sync'); for( $i = 0; $i < count($config_name); $i++ ) { $config_value = $mx_block->get_parameters( $config_name[$i] ); $mx_menu_config[$config_name[$i]] = $config_value; } // // Define some parameters // //$menu_display_style = $mx_menu_config['menu_display_style']; $menu_display_style = 'Overall_navigation'; //$menu_display_mode = $mx_menu_config['menu_display_mode']; $menu_display_mode == 'Horizontal'; //$menu_page_sync = ( $mx_menu_config['menu_page_sync'] != 'No' ); $menu_page_sync = true; // // Prevent this block to be used both in overall_header and as a block // Define this menu block has been used on this page - either as a block or in the header. To avoid it being used several times // $nav_def_key = 'MX_SITE_MENU_' . $block_id; if ( defined($nav_def_key) ) { $mx_block->show_title = false; $mx_block->show_block = false; return; } define($nav_def_key, true); // // Get the current MX page. // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); switch( $menu_display_style ) { case 'Classic': $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_classic_hor.tpl') : array('body' => 'mx_menu_classic_ver.tpl'); break; case 'Advanced': $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_advanced_hor.tpl') : array('body' => 'mx_menu_advanced_ver.tpl'); $kick_js = $menu_display_mode == 'Horizontal' ? 'adv_hor.js' : 'adv_ver.js'; $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); break; case 'Simple_CSS_menu': $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_simple_CSS_hor.tpl') : array('body' => 'mx_menu_simple_CSS_ver.tpl'); $kick_js = $menu_display_mode == 'Horizontal' ? 'simple_CSS_hor.js' : 'simple_CSS_ver.js'; $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); break; case 'Advanced_CSS_menu': $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_advanced_CSS_hor.tpl') : array('body' => 'mx_menu_advanced_CSS_ver.tpl'); $kick_js = $menu_display_mode == 'Horizontal' ? 'adv_CSS_hor.js' : 'adv_CSS_ver.js'; $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); break; case 'Simple_x': $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_simple_x_hor.tpl') : array('body' => 'mx_menu_simple_x_ver.tpl'); break; case 'Overall_navigation': $template_tmp = array('body' => 'mx_menu_overall_standard.tpl'); break; default: $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_classic_hor.tpl') : array('body' => 'mx_menu_classic_ver.tpl'); break; } $template->set_filenames($template_tmp); generate_site_menu(); $cat_width = $num_of_cats > 0 ? ceil(100 / $num_of_cats) . '%' : '100%'; $template->assign_vars(array( 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => $title, 'L_DESC' => $b_description, 'NUM_OF_CATS' => $num_of_cats, 'NUM_OF_CATS_EDIT' => $num_of_cats - 1, 'CAT_WIDTH' => $cat_width, // // mygosmenu // 'MX_ROOT_PATH' => $mx_root_path, 'T_TR_COLOR1' => '#'.$theme['tr_color1'], 'T_TR_COLOR2' => '#'.$theme['tr_color2'], 'T_TR_COLOR3' => '#'.$theme['tr_color3'], 'T_BODY_LINK' => '#'.$theme['body_link'], 'T_BODY_VLINK' => '#'.$theme['body_vlink'], 'T_TH_COLOR1' => '#'.$theme['th_color1'], 'T_FONTFACE1' => $theme['fontface1'], 'IMG_CONTRACT' => $images['mx_contract'], 'IMG_EXPAND' => $images['mx_expand'], 'MENU_MODE' => $menu_display_mode, 'MENU_ID' => $block_id )); $template->pparse('body'); ?> Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/db_upgrade.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_upgrade.php 5 May 2007 20:13:39 -0000 1.5 --- db_upgrade.php 21 Jul 2007 23:08:18 -0000 1.6 *************** *** 45,48 **** --- 45,49 ---- $message .= mx_do_install_upgrade( $sql ); + $message .= "<b>...Now upgraded to v. $mx_module_version :-)</b><br/><br/>"; echo "<br /><br />"; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:08:25
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25449/mx_phpbb2blocks Modified Files: db_upgrade.php phpbb2blocks.pak Log Message: Index: phpbb2blocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/phpbb2blocks.pak,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** phpbb2blocks.pak 9 Jul 2007 21:57:51 -0000 1.6 --- phpbb2blocks.pak 21 Jul 2007 23:08:19 -0000 1.7 *************** *** 1,3 **** ! module=+:30=+:phpBB2 Blocks=+:modules/mx_phpbb2blocks/=+:mxBB Portal phpBB2 blocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:30=+:2=+:phpBB Announcements=+:phpBB Announcements Block=+:mx_announce.php=+: --- 1,3 ---- ! module=+:30=+:phpBB2 Blocks=+:modules/mx_phpbb2blocks/=+:Standard phpBB2 blocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:30=+:2=+:phpBB Announcements=+:phpBB Announcements Block=+:mx_announce.php=+: Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/db_upgrade.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_upgrade.php 5 May 2007 20:13:40 -0000 1.3 --- db_upgrade.php 21 Jul 2007 23:08:19 -0000 1.4 *************** *** 45,48 **** --- 45,49 ---- $message .= mx_do_install_upgrade( $sql ); + $message .= "<b>...Now upgraded to v. $mx_module_version :-)</b><br/><br/>"; echo "<br /><br />"; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:08:25
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25449/mx_textblocks Modified Files: TextBlocks.pak db_upgrade.php Log Message: Index: TextBlocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/TextBlocks.pak,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TextBlocks.pak 9 Jul 2007 21:57:51 -0000 1.17 --- TextBlocks.pak 21 Jul 2007 23:08:20 -0000 1.18 *************** *** 1,3 **** ! module=+:20=+:Textblocks=+:modules/mx_textblocks/=+:mxBB Portal Textblocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:20=+:24=+:TextBlock (phpBB)=+:BBcodes, html and smilies - defined by phpBB config=+:mx_textblock_bbcode.php=+: --- 1,3 ---- ! module=+:20=+:Textblocks=+:modules/mx_textblocks/=+:Dynamic Textblocks=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:20=+:24=+:TextBlock (phpBB)=+:BBcodes, html and smilies - defined by phpBB config=+:mx_textblock_bbcode.php=+: Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/db_upgrade.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_upgrade.php 5 May 2007 20:13:41 -0000 1.5 --- db_upgrade.php 21 Jul 2007 23:08:20 -0000 1.6 *************** *** 45,48 **** --- 45,49 ---- $message .= mx_do_install_upgrade( $sql ); + $message .= "<b>...Now upgraded to v. $mx_module_version :-)</b><br/><br/>"; echo "<br /><br />"; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:08:03
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25325 Modified Files: lang_admin.php Log Message: Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_admin.php,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** lang_admin.php 9 Jul 2007 21:57:38 -0000 1.75 --- lang_admin.php 21 Jul 2007 23:07:51 -0000 1.76 *************** *** 132,137 **** $lang['Portal_Main_layout'] = 'Main Layout File (default value)'; $lang['Portal_Main_layout_explain'] = '- This is the default template main_layout file, e.g. mx_main_layout.tpl.'; ! $lang['Portal_Navigation_block'] = 'Overall Header Navigation Block (default value)'; ! $lang['Portal_Navigation_block_explain'] = '- This is the default template overall_header navigation block.'; $lang['Default_style'] = 'Portal Pages Style (default)'; $lang['Default_admin_style'] = 'AdminCP Style'; --- 132,137 ---- $lang['Portal_Main_layout'] = 'Main Layout File (default value)'; $lang['Portal_Main_layout_explain'] = '- This is the default template main_layout file, e.g. mx_main_layout.tpl.'; ! $lang['Portal_Navigation_block'] = 'Overall Navigation Block (default value)'; ! $lang['Portal_Navigation_block_explain'] = '- This is the page header navigation block, provided you\'ve chosen a overall header file which supports page navigation.'; $lang['Default_style'] = 'Portal Pages Style (default)'; $lang['Default_admin_style'] = 'AdminCP Style'; *************** *** 296,300 **** $lang['Page_main_layout'] = 'Page main layout file <br /> - i.e. mx_main_layout.tpl (default) or user custom header file.<br />To use the default setting, leave this blank.'; $lang['Page_Navigation_block'] = 'Page header navigation block'; ! $lang['Page_Navigation_block_explain'] = '- This is the page header navigation block, provided you\'ve chosen a page header file which supports page navigation.<br />To use the default setting, leave this unset.'; $lang['Auth_Page'] = 'Permissions'; $lang['Select_sort_method'] = 'Select Sort Method'; --- 296,300 ---- $lang['Page_main_layout'] = 'Page main layout file <br /> - i.e. mx_main_layout.tpl (default) or user custom header file.<br />To use the default setting, leave this blank.'; $lang['Page_Navigation_block'] = 'Page header navigation block'; ! $lang['Page_Navigation_block_explain'] = '- This is the page header navigation block, provided you\'ve chosen a overall header file which supports page navigation.<br />To use the default setting, leave this unset.'; $lang['Auth_Page'] = 'Permissions'; $lang['Select_sort_method'] = 'Select Sort Method'; *************** *** 309,312 **** --- 309,313 ---- $lang['Auth_Page_group'] = '-> PRIVATE Group'; $lang['Page_desc'] = 'Description'; + $lang['Page_parent'] = 'Parent Page'; $lang['Add_Page'] = 'Add New Page'; $lang['Page_Config_updated'] = 'Page Configuration Updated Successfully'; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:07:42
|
Update of /cvsroot/mxbb/core/install/schemas In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25298 Modified Files: mysql_schema_install.sql mysql_schema_upgrade_to_2.8.1.sql postgres_schema_install.sql upgrade_schemas_map.php Log Message: Index: upgrade_schemas_map.php =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/upgrade_schemas_map.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** upgrade_schemas_map.php 9 Jul 2007 21:57:25 -0000 1.17 --- upgrade_schemas_map.php 21 Jul 2007 23:07:37 -0000 1.18 *************** *** 19,23 **** array('schema' => 'upgrade_to_2.8_b3' , 'sql' => "SELECT main_layout FROM mx_table_portal"), array('schema' => 'upgrade_to_2.8.0' , 'sql' => "SELECT overall_footer FROM mx_table_portal"), ! array('schema' => 'upgrade_to_2.8.1' , 'sql' => "SELECT menu_alt_icon FROM mx_table_menu_nav"), ); --- 19,23 ---- array('schema' => 'upgrade_to_2.8_b3' , 'sql' => "SELECT main_layout FROM mx_table_portal"), array('schema' => 'upgrade_to_2.8.0' , 'sql' => "SELECT overall_footer FROM mx_table_portal"), ! array('schema' => 'upgrade_to_2.8.1' , 'sql' => "SELECT menu_icon FROM mx_table_page"), ); Index: postgres_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/postgres_schema_install.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** postgres_schema_install.sql 13 Jul 2007 17:18:19 -0000 1.1 --- postgres_schema_install.sql 21 Jul 2007 23:07:36 -0000 1.2 *************** *** 405,410 **** --- 405,417 ---- "page_name" VARCHAR(255) NULL DEFAULT NULL, "page_desc" VARCHAR(255) NULL DEFAULT NULL, + `page_parent` INTEGER DEFAULT '0', + `parents_data` TEXT NOT NULL DEFAULT NULL, + `page_order` SMALLINT NOT NULL DEFAULT '0', "page_icon" VARCHAR(255) NULL DEFAULT NULL, "page_alt_icon" VARCHAR(255) NULL DEFAULT NULL, + "menu_icon" VARCHAR(255) NULL DEFAULT NULL, + "menu_alt_icon" VARCHAR(255) NULL DEFAULT NULL, + "menu_alt_icon_hot" VARCHAR(255) NULL DEFAULT NULL, + "menu_active" SMALLINT NOT NULL DEFAULT '1', "auth_view" SMALLINT NOT NULL DEFAULT '0', "auth_view_group" VARCHAR(255) NOT NULL DEFAULT '0', *************** *** 425,433 **** -- Dumping data for table 'mx_table_page' -- ! INSERT INTO "mx_table_page" VALUES (1,'Home','This is the startpage','icon_home.gif',0,'0','0',-1,-1,'','','',0,'a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (2,'Forum','This is the phpBB Forum startpage','icon_forum.gif',0,'0','0',-1,-1,'','','',0,'a:1:{i:0;s:0:"";}',1); ! INSERT INTO "mx_table_page" VALUES (3,'Demo Page','Block Demos','icon_settings.gif',0,'0','0',-1,-1,'','','',0,'a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (4,'Sitestats','Sitestats page','icon_statistics.gif',0,'0','0',-1,-1,'','','',0,'a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (5,'Site Search','Site Search page','icon_search.gif',0,'0','0',-1,-1,'','','',0,'a:1:{i:0;s:0:"";}',-1); --- 432,440 ---- -- Dumping data for table 'mx_table_page' -- ! INSERT INTO "mx_table_page" VALUES (1,'Home','This is the startpage','0','','0','icon_home.gif','','','','','1','0','0','0',-1,-1,'','','','0','a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (2,'Forum','This is the phpBB Forum startpage','0','','0','icon_forum.gif','','','','','1','0','0','0',-1,-1,'','','','0','a:1:{i:0;s:0:"";}',1); ! INSERT INTO "mx_table_page" VALUES (3,'Demo Page','Block Demos','0','','0','icon_settings.gif','','','','','1','0','0','0',-1,-1,'','','','0','a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (4,'Sitestats','Sitestats page','0','','0','icon_statistics.gif','','','','','1','0','0','0',-1,-1,'','','','0','a:1:{i:0;s:0:"";}',-1); ! INSERT INTO "mx_table_page" VALUES (5,'Site Search','Site Search page','0','','0','icon_search.gif','','','','','1','0','0','0',-1,-1,'','','','0','a:1:{i:0;s:0:"";}',-1); Index: mysql_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install.sql,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** mysql_schema_install.sql 13 Jul 2007 18:09:29 -0000 1.38 --- mysql_schema_install.sql 21 Jul 2007 23:07:36 -0000 1.39 *************** *** 410,415 **** --- 410,422 ---- `page_name` varchar(255) default NULL, `page_desc` varchar(255) default NULL, + `page_parent` int(50) default '0', + `parents_data` text NOT NULL default '', + `page_order` smallint(5) default '0', `page_icon` varchar(255) default NULL, `page_alt_icon` varchar(255) default NULL, + `menu_icon` varchar(255) default NULL, + `menu_alt_icon` varchar(255) default NULL, + `menu_alt_icon_hot` varchar(255) default NULL, + `menu_active` tinyint(2) default '1', `auth_view` tinyint(2) NOT NULL default '0', `auth_view_group` varchar(255) NOT NULL default '0', *************** *** 430,438 **** # Dumping data for table 'mx_table_page' # ! INSERT INTO mx_table_page VALUES("1", "Home", "This is the startpage", "icon_home.gif", "", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("2", "Forum", "This is the phpBB Forum startpage", "icon_forum.gif", "", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "1"); ! INSERT INTO mx_table_page VALUES("3", "Demo Page", "Block Demos", "icon_scate.gif", "", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("4", "Sitestats", "Sitestats page", "icon_stats.gif", "", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("5", "Site Search", "Site Search page", "icon_search.gif", "", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); --- 437,445 ---- # Dumping data for table 'mx_table_page' # ! INSERT INTO mx_table_page VALUES("1", "Home", "This is the startpage", "10", "", "0","icon_home.gif", "", "", "", "", "1", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("2", "Forum", "This is the phpBB Forum startpage", "20", "", "0","icon_forum.gif", "", "", "", "", "1", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "1"); ! INSERT INTO mx_table_page VALUES("3", "Demo Page", "Block Demos", "30", "", "0","icon_scate.gif", "", "", "", "", "1", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("4", "Sitestats", "Sitestats page", "40", "", "0","icon_stats.gif", "", "", "", "", "1", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("5", "Site Search", "Site Search page", "50", "", "0","icon_search.gif", "", "", "", "", "1", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); Index: mysql_schema_upgrade_to_2.8.1.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_upgrade_to_2.8.1.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_schema_upgrade_to_2.8.1.sql 13 Jul 2007 17:18:19 -0000 1.1 --- mysql_schema_upgrade_to_2.8.1.sql 21 Jul 2007 23:07:36 -0000 1.2 *************** *** 14,16 **** # # New Fields in Table `mx_table_page` ! ALTER TABLE mx_table_page ADD page_alt_icon varchar(255) default '' AFTER page_icon; \ No newline at end of file --- 14,26 ---- # # New Fields in Table `mx_table_page` ! ALTER TABLE mx_table_page ADD page_alt_icon varchar(255) default '' AFTER page_icon; ! ! ALTER TABLE mx_table_page ADD menu_icon varchar(255) default '' AFTER page_alt_icon; ! ALTER TABLE mx_table_page ADD menu_alt_icon varchar(255) default '' AFTER menu_icon; ! ALTER TABLE mx_table_page ADD menu_alt_icon_hot varchar(255) default '' AFTER menu_alt_icon; ! ALTER TABLE mx_table_page ADD menu_active tinyint(2) default '1' AFTER menu_alt_icon_hot; ! ! ALTER TABLE mx_table_page ADD page_parent int(50) default '0' AFTER page_desc; ! ALTER TABLE mx_table_page ADD parents_data text NOT NULL default '' AFTER page_parent; ! ! ALTER TABLE mx_table_page ADD page_order smallint(5) default '0' AFTER parents_data; |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:07:20
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25016/includes Modified Files: mx_functions_admincp.php mx_functions_core.php page_tail.php Log Message: Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** mx_functions_core.php 12 Jul 2007 22:42:26 -0000 1.49 --- mx_functions_core.php 21 Jul 2007 23:07:15 -0000 1.50 *************** *** 365,368 **** --- 365,370 ---- $sql = "SELECT col.page_id, pag.page_name, + pag.page_parent, + pag.parents_data, pag.page_icon, pag.page_alt_icon, *************** *** 412,415 **** --- 414,419 ---- "page_id" => $row['page_id'], "page_name" => $row['page_name'], + "page_parent" => $row['page_parent'], + "parent_data" => $row['parents_data'], "page_icon" => $row['page_icon'], "page_alt_icon" => $row['page_alt_icon'], *************** *** 2454,2458 **** * * Examples: ! * - $mx_page->init($block_id) * - $mx_page->kill_me() * - $mx_page->output_column($column) --- 2458,2462 ---- * * Examples: ! * - $mx_page->init($page_id) * - $mx_page->kill_me() * - $mx_page->output_column($column) *************** *** 2475,2478 **** --- 2479,2498 ---- /**#@+ + * Core data containers. + * + * @access public + * @var array + */ + var $page_rowset = array(); + var $subpage_rowset = array(); + var $total_page = 0; + + var $modified = false; + var $error = array(); + + var $navigation = ''; + /**#@-*/ + + /**#@+ * Page data containers. * *************** *** 2517,2520 **** --- 2537,2580 ---- // Constructor // + /** + * Init CORE/page. + * + * @access public + * @param integer $page_id + * @param boolean $force_query + */ + function init( $page_id, $force_query = false ) + { + global $db, $userdata, $debug, $portal_config, $mx_cache; + + unset( $this->page_rowset ); + unset( $this->subpage_rowset ); + + $sql = 'SELECT * + FROM ' . PAGE_TABLE . ' + ORDER BY page_parent, page_order ASC'; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt Query pages info', '', __LINE__, __FILE__, $sql ); + } + $page_rowset = $db->sql_fetchrowset( $result ); + + $db->sql_freeresult( $result ); + + for( $i = 0; $i < count( $page_rowset ); $i++ ) + { + $this->page_rowset[$page_rowset[$i]['page_id']] = $page_rowset[$i]; + $this->subpage_rowset[$page_rowset[$i]['page_parent']][$page_rowset[$i]['page_id']] = $page_rowset[$i]; + $this->total_page++; + } + + // + // Load page data + // + $this->page_id = $page_id; + $this->page_config = $mx_cache->read( $this->page_id, MX_CACHE_PAGE_TYPE, $force_query ); + $this->_set_all(); + } // ------------------------------ *************** *** 2523,2526 **** --- 2583,2669 ---- /** + * Clean up + * @access private + */ + function _core() + { + if ( $this->modified ) + { + $this->sync_all(); + } + } + + /** + * Sync All. + * @access private + */ + function sync_all() + { + foreach( $this->page_rowset as $page_id => $void ) + { + $this->sync( $page_id, false ); + } + $this->init(); + } + + /** + * Do Sync + * + * @access private + * @param unknown_type $page_id + * @param unknown_type $init + */ + function sync( $page_id, $init = true ) + { + global $db; + + $page_nav = array(); + $this->core_nav( $this->page_rowset[$cat_id]['page_parent'], &$page_nav ); + + $sql = 'UPDATE ' . PAGE_TABLE . " + SET parents_data = '' + WHERE page_parent = " . $this->page_rowset[$page_id]['page_parent']; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt Query pages info', '', __LINE__, __FILE__, $sql ); + } + + if ( $init ) + { + $this->init(); + } + return; + } + + /** + * Navigation data + * + * @access public + * @param unknown_type $parent_id + * @param unknown_type $page_nav + */ + function core_nav( $parent_id, &$page_nav ) + { + if ( !empty( $this->page_rowset[$parent_id] ) ) + { + $this->core_nav( $this->page_rowset[$parent_id]['page_parent'], &$page_nav ); + $page_nav[$parent_id] = $this->page_rowset[$parent_id]['page_name']; + } + return; + } + + /** + * Is modified + * + * @access public + * @param unknown_type $true_false + */ + function modified( $true_false = false ) + { + $this->modified = $true_false; + } + + /** * Initiate and load page data * @access private *************** *** 2529,2532 **** --- 2672,2676 ---- { global $userdata, $mx_root_path, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $portal_config, $theme, $lang; + global $mx_block; $this->info = $this->page_config[$this->page_id]['page_info']; *************** *** 2619,2649 **** /** ! * Init page. * * @access public - * @param integer $page_id - * @param boolean $force_query */ ! function init( $page_id, $force_query = false ) { global $mx_cache; ! $this->page_id = $page_id; ! $this->page_config = $mx_cache->read( $this->page_id, MX_CACHE_PAGE_TYPE, $force_query ); ! $this->_set_all(); } /** ! * Kill me. * ! * Unset and unload all page data * * @access public */ ! function kill_me() { ! global $mx_cache; ! $this->page_config = ''; } --- 2763,2874 ---- /** ! * Kill me. ! * ! * Unset and unload all page data * * @access public */ ! function kill_me() { global $mx_cache; ! $this->page_config = ''; } /** ! * Jump menu function. * ! * @access public ! * @param unknown_type $page_id to handle parent page_id ! * @param unknown_type $depth related to function to generate tree ! * @param unknown_type $default the page you wanted to be selected ! * @return unknown ! */ ! function generate_jumpbox( $page_id = 0, $depth = 0, $default = '' ) ! { ! $page_list .= ''; ! ! $pre = str_repeat( ' ', $depth ); ! ! if ( !empty( $this->page_rowset ) ) ! { ! foreach ( $this->page_rowset as $temp_page_id => $page ) ! { ! if ( $page['page_parent'] == $page_id ) ! { ! if ( is_array( $default ) ) ! { ! if ( isset( $default[$page['page_id']] ) ) ! { ! $sel = ' selected="selected"'; ! } ! else ! { ! $sel = ''; ! } ! } ! $page_pre = '+ '; ! $sub_page_id = $page['page_id']; ! $page_class = ''; ! $page_list .= '<option value="' . $sub_page_id . '"' . $sel . ' ' . $page_class . ' />' . $pre . $page_pre . $page['page_name'] . (!empty($page['page_desc']) ? ' (' . $page['page_desc'] . ')' : '') . '</option>'; ! $page_list .= $this->generate_jumpbox( $page['page_id'], $depth + 1, $default ); ! } ! } ! return $page_list; ! } ! else ! { ! return; ! } ! } ! ! /** ! * Generate_navigation. ! * ! * Not in use... * * @access public + * @param unknown_type $page_id */ ! function generate_navigation( $page_id ) { ! global $template, $db; ! if ( $this->page_rowset[$page_id]['parents_data'] == '' ) ! { ! $page_nav = array(); ! $this->core_nav( $this->page_rowset[$page_id]['page_parent'], &$page_nav ); ! ! $sql = 'UPDATE ' . PAGE_TABLE . " ! SET parents_data = '" . addslashes( serialize( $page_nav ) ) . "' ! WHERE page_parent = " . $this->page_rowset[$page_id]['page_parent']; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query pages info', '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! $page_nav = unserialize( stripslashes( $this->page_rowset[$page_id]['parents_data'] ) ); ! } ! ! if ( !empty( $page_nav ) ) ! { ! foreach ( $page_nav as $parent_page_id => $parent_name ) ! { ! $template->assign_block_vars( 'navlinks', array( ! 'PAGE_NAME' => $parent_name, ! 'U_VIEW_PAGE' => append_sid( $this->this_mxurl( 'page=' . $parent_page_id ) ) ) ! ); ! } ! } ! ! $template->assign_block_vars( 'navlinks', array( ! 'PAGE_NAME' => $this->page_rowset[$page_id]['page_name'], ! 'U_VIEW_PAGE' => append_sid( $this->this_mxurl( 'page=' . $this->page_rowset[$page_id]['page_id'] ) ) ) ! ); ! ! return; } *************** *** 2827,2833 **** * * @access private * @return array */ ! function auth() { global $db, $lang, $userdata; --- 3052,3061 ---- * * @access private + * @param unknown_type $auth_data + * @param unknown_type $group_data + * @param unknown_type $moderator_data * @return array */ ! function auth($auth_data = '', $group_data = '', $moderator_data = '') { global $db, $lang, $userdata; *************** *** 2842,2846 **** for( $i = 0; $i < count($auth_fields); $i++ ) { ! switch( $this->info[$auth_fields[$i]] ) { case AUTH_ALL: --- 3070,3081 ---- for( $i = 0; $i < count($auth_fields); $i++ ) { ! // ! // Fix for making this method useful also other pages, not only current one. ! // ! $auth_data = !empty($auth_data) ? $auth_data : $this->info[$auth_fields[$i]]; ! $group_data = !empty($group_data) ? $group_data : $this->info[$auth_fields_groups[$i]]; ! $moderator_data = !empty($moderator_data) ? $moderator_data : $this->info['page_auth_moderator_group']; ! ! switch( $auth_data ) { case AUTH_ALL: *************** *** 2860,2869 **** case AUTH_ACL: // PRIVATE ! $auth_user[$auth_label[$i]] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($this->info[$auth_fields_groups[$i]]) || $is_admin : 0; $auth_user[$auth_label[$i] . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$auth_label[$i]] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($this->info['page_auth_moderator_group']) || $is_admin : 0; $auth_user[$auth_label[$i] . '_type'] = $lang['Auth_Moderators']; break; --- 3095,3104 ---- case AUTH_ACL: // PRIVATE ! $auth_user[$auth_label[$i]] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($group_data) || $is_admin : 0; $auth_user[$auth_label[$i] . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$auth_label[$i]] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($moderator_data) || $is_admin : 0; $auth_user[$auth_label[$i] . '_type'] = $lang['Auth_Moderators']; break; *************** *** 2882,2886 **** // // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($this->info['page_auth_moderator_group']) || $is_admin : 0; return $auth_user; --- 3117,3121 ---- // // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($moderator_data) || $is_admin : 0; return $auth_user; *************** *** 3244,3246 **** --- 3479,3797 ---- } // class mx_request_vars + + class temp + { + + /** + * get_sub_cat. + * + * get all sub category in side certain category + * - used when listing files/articles/links etc + * + * @param unknown_type $cat_id + * @return unknown + */ + function get_sub_cat( $cat_id ) + { + global $mx_root_path, $module_root_path, $is_block, $phpEx; + + $cat_sub = ''; + if ( !empty( $this->subpage_rowset[$cat_id] ) ) + { + $class = "gensmall"; + $init_link_max = ( count( $this->subpage_rowset[$cat_id] ) > 3 ) ? 3 : count( $this->subpage_rowset[$cat_id] ); + $truncate = false; + $i = 0; + foreach( $this->subpage_rowset[$cat_id] as $cat_id => $cat_row ) + { + if ( $this->auth_user[$cat_row['cat_id']]['auth_view'] && ( $cat_row['cat_allow_file'] || !empty( $this->subpage_rowset[$cat_row['cat_id']] ) ) ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; + } + /* + else + { + if ( !empty( $this->subpage_rowset[$cat_row['cat_id']] ) ) + { + foreach( $this->subpage_rowset[$cat_row['cat_id']] as $sub_cat_id => $sub_cat_row ) + { + if ( $sub_cat_row['cat_allow_file'] ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a>'; + } + } + } + } + */ + } + + if ($truncate) + { + $cat_sub .= '<span class=' . $class . '>, ...</span>'; + } + } + return $cat_sub; + } + + /** + * display_categories. + * + * @param unknown_type $cat_id + */ + function display_categories( $cat_id = PA_ROOT_CAT ) + { + global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; + global $pafiledb_config, $board_config, $debug; + + if ( $this->cat_empty() ) + { + if ( !$userdata['session_logged_in'] ) + { + $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "action=category&cat_id=$cat_id" ) : $this->this_mxurl(); + redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); + } + mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); + } + + $pafiledb_template->assign_vars( array( + 'CAT_NAV_SIMPLE' => true, + 'L_SUB_CAT' => $lang['Sub_category'], + 'L_CATEGORY' => $lang['Category'], + 'L_LAST_FILE' => $lang['Last_file'], + 'L_FILES' => $lang['Files'] ) + ); + + // + // Output the categories + // + if ( isset( $this->subpage_rowset[$cat_id] ) ) + { + $catnum = count($this->subpage_rowset[$cat_id]); + $catcol = $pafiledb_config['cat_col'] > 0 ? $pafiledb_config['cat_col'] : 1; + $num_of_rows = intval( $catnum / $catcol ); + + if ( $catnum % $catcol ) + { + $num_of_rows++; + } + + $pafiledb_template->assign_vars( array( 'WIDTH' => 100 / $catcol ) ); + $i = 0; + + foreach( $this->subpage_rowset[$cat_id] as $subcat_id => $subcat_row ) + { + if ( $i == 0 || $i == $catcol) + { + $pafiledb_template->assign_block_vars( 'catcol', array() ); + $i = 0; + } + $i++; + + $last_file_info = array(); + $this->last_item_in_cat( $subcat_id, $last_file_info ); + + if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) + { + $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); + $last_file = $last_file_time . '<br />'; + $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; + } + else + { + $last_file = $lang['No_file']; + } + + $is_new = false; + if ( $this->new_item_in_cat( $subcat_id ) ) + { + $is_new = true; + } + + $sub_cat = $this->get_sub_cat( $subcat_id ); + $pafiledb_template->assign_block_vars( 'catcol.no_cat_parent', array( + 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), + 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", + 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], + 'CAT_NAME' => $subcat_row['cat_name'], + 'FILECAT' => $this->items_in_cat( $subcat_id ) ) + ); + } + } + } + + /** + * display_categories - original. + * + * @param unknown_type $cat_id + */ + function display_categories_original( $cat_id = PA_ROOT_CAT, $action_name = 'action', $action_default = 'category', $map_xtra = '' ) + { + global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; + global $pafiledb_config, $board_config, $debug; + global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; + + if ( $this->cat_empty() ) + { + if ( !$userdata['session_logged_in'] ) + { + $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "$action_name=$action_default&cat_id=$cat_id" ) : $this->this_mxurl(); + redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); + } + mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); + } + + $pafiledb_template->assign_vars( array( + 'CAT_NAV_STANDARD' => true, + 'L_SUB_CAT' => $lang['Sub_category'], + 'L_CATEGORY' => $lang['Category'], + 'L_LAST_FILE' => $lang['Last_file'], + 'L_FILES' => $lang['Files'] ) + ); + + // + // Category navigation for cat_id that allow files + // - used in cat pages without files + // + if ( isset( $this->subpage_rowset[$cat_id] ) ) + { + foreach( $this->subpage_rowset[$cat_id] as $subcat_id => $subcat_row ) + { + if ( ( $subcat_row['cat_allow_file'] == PA_CAT_ALLOW_FILE ) ) + { + $last_file_info = array(); + $this->last_item_in_cat( $subcat_id, $last_file_info ); + + if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) + { + $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); + $last_file = $last_file_time . '<br />'; + $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; + } + else + { + $last_file = $lang['No_file']; + } + $is_new = false; + + if ( $this->new_item_in_cat( $subcat_id ) ) + { + $is_new = true; + } + + $sub_cat = $this->get_sub_cat( $subcat_id ); + + $pafiledb_template->assign_block_vars( 'no_cat_parent', array( + 'IS_HIGHER_CAT' => false, + 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra ) ), + 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', + 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], + 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], + 'CAT_NAME' => $subcat_row['cat_name'], + 'FILECAT' => $this->items_in_cat( $subcat_id ), + 'LAST_FILE' => $last_file, + 'CAT_DESC' => $subcat_row['cat_desc'] ) + ); + } + } + } + + // + // Category navigation for cat_id that doesn't allow files + // - used in cat pages with files + // + if ( isset( $this->subpage_rowset[$cat_id] ) ) + { + foreach( $this->subpage_rowset[$cat_id] as $subcat_id => $subcat_row ) + { + $total_sub_cat = 0; + if ( isset( $this->subpage_rowset[$subcat_id] ) ) + { + foreach( $this->subpage_rowset[$subcat_id] as $sub_no_cat_id => $sub_no_cat_row ) + { + if ( $sub_no_cat_row['cat_allow_file'] == PA_CAT_ALLOW_FILE ) + { + $sub_page_rowset[$total_sub_cat] = $sub_no_cat_row; + $total_sub_cat++; + } + } + } + + // + // This is a container category + // + if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) + { + if ( $total_sub_cat ) + { + $pafiledb_template->assign_block_vars( 'no_cat_parent', array( + 'IS_HIGHER_CAT' => true, + 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra) ), + 'CAT_NAME' => $subcat_row['cat_name'] ) + ); + } + + for( $k = 0; $k < $total_sub_cat; $k++ ) + { + $last_file_info = array(); + $this->last_item_in_cat( $sub_page_rowset[$k]['cat_id'], $last_file_info ); + + if ( $sub_page_rowset[$k]['cat_parent'] == $subcat_id ) + { + if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$sub_page_rowset[$k]['cat_id']]['auth_read'] ) + { + $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); + $last_file = $last_file_time . '<br />'; + $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; + $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; + } + else + { + $last_file = $lang['No_file']; + } + + $is_new = false; + + if ( $this->new_item_in_cat( $sub_page_rowset[$k]['cat_id'] ) ) + { + $is_new = true; + } + + $sub_cat = $this->get_sub_cat( $sub_page_rowset[$k]['cat_id'] ); + + $pafiledb_template->assign_block_vars( 'no_cat_parent', array( + 'IS_HIGHER_CAT' => false, + 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $sub_page_rowset[$k]['cat_id'] . $map_xtra ) ), + 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', + 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], + 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], + 'CAT_NAME' => $sub_page_rowset[$k]['cat_name'], + 'FILECAT' => $this->items_in_cat( $sub_page_rowset[$k]['cat_id'] ), + 'LAST_FILE' => $last_file, + 'CAT_DESC' => $sub_page_rowset[$k]['cat_desc'] ) + ); + } // Have a permission to view the category + } // It is not parent category + } + } + } //higher Category + } + } + ?> Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mx_functions_admincp.php 9 Jul 2007 21:57:05 -0000 1.37 --- mx_functions_admincp.php 21 Jul 2007 23:07:15 -0000 1.38 *************** *** 333,336 **** --- 333,337 ---- $page_name = $mx_request_vars->post('page_name', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_desc = $mx_request_vars->post('page_desc', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); + $page_parent = $mx_request_vars->post('page_parent', MX_TYPE_INT, ''); $page_icon = $mx_request_vars->post('menuicons', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_alt_icon = $mx_request_vars->post('page_alt_icon', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); *************** *** 371,378 **** } ! $sql = "INSERT INTO " . PAGE_TABLE . " ( page_id, page_name, page_desc, page_icon, page_alt_icon, auth_view, default_style, override_user_style, page_header, page_footer, page_main_layout, navigation_block, ip_filter, phpbb_stats ) VALUES ( '" . $page_id_new . "', '" . $page_name . "', '" . $page_desc . "', '" . $page_icon . "', '" . $page_alt_icon . "', --- 372,380 ---- } ! $sql = "INSERT INTO " . PAGE_TABLE . " ( page_id, page_name, page_desc, page_parent, page_icon, page_alt_icon, auth_view, default_style, override_user_style, page_header, page_footer, page_main_layout, navigation_block, ip_filter, phpbb_stats ) VALUES ( '" . $page_id_new . "', '" . $page_name . "', '" . $page_desc . "', + '" . $page_parent . "', '" . $page_icon . "', '" . $page_alt_icon . "', *************** *** 927,930 **** --- 929,933 ---- $page_name = $mx_request_vars->post('page_name', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_desc = $mx_request_vars->post('page_desc', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); + $page_parent = $mx_request_vars->post('page_parent', MX_TYPE_INT, ''); $page_icon = $mx_request_vars->post('menuicons', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_alt_icon = $mx_request_vars->post('page_alt_icon', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); *************** *** 953,956 **** --- 956,960 ---- SET page_name = '$page_name', page_desc = '$page_desc', + page_parent = '$page_parent', page_icon = '$page_icon', page_alt_icon = '$page_alt_icon', Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** page_tail.php 19 Jun 2007 19:03:48 -0000 1.31 --- page_tail.php 21 Jul 2007 23:07:15 -0000 1.32 *************** *** 107,110 **** --- 107,115 ---- // + // Close the mx_page class + // + $mx_page->_core(); + + // // Unload cache, must be done before the DB connection is closed // |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:07:20
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25016 Modified Files: common.php index.php Log Message: Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** common.php 5 May 2007 20:12:57 -0000 1.64 --- common.php 21 Jul 2007 23:07:14 -0000 1.65 *************** *** 264,267 **** --- 264,277 ---- $mx_user = new mx_user(); + // + // instatiate the mx_page (CORE) class + // + $mx_page = new mx_page(); + + // + // instatiate the mx_block class + // + $mx_block = new mx_block(); + // Obtain and encode users IP // Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** index.php 10 Jun 2007 21:23:34 -0000 1.68 --- index.php 21 Jul 2007 23:07:14 -0000 1.69 *************** *** 31,39 **** // ! // Load and instatiate page and block classes // - $mx_page = new mx_page(); $mx_page->init( $page_id ); - $mx_block = new mx_block(); // --- 31,37 ---- // ! // Load and instatiate CORE (page) and block classes // $mx_page->init( $page_id ); // *************** *** 337,340 **** --- 335,339 ---- // $layouttemplate->pparse('mx_main_layout'); + // // Output footer |
|
From: Jon O. <jon...@us...> - 2007-07-21 23:07:19
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25016/admin Modified Files: admin_mx_page_cp.php admin_mx_portal.php Log Message: Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** admin_mx_portal.php 4 Jun 2007 21:14:01 -0000 1.32 --- admin_mx_portal.php 21 Jul 2007 23:07:14 -0000 1.33 *************** *** 89,93 **** $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); ! $navigation_block_list = get_list_formatted('block_list', $portal_config['navigation_block'], 'navigation_block', 'mx_menu_nav.php'); $portal_version = $portal_config['portal_version']; --- 89,93 ---- $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); ! $navigation_block_list = get_list_formatted('block_list', $portal_config['navigation_block'], 'navigation_block', 'mx_site_nav.php'); $portal_version = $portal_config['portal_version']; Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** admin_mx_page_cp.php 9 Jul 2007 21:57:05 -0000 1.24 --- admin_mx_page_cp.php 21 Jul 2007 23:07:14 -0000 1.25 *************** *** 90,163 **** $cookie_tmp = $board_config['cookie_name'].'_admincp_pagestates'; $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); - $sort_cookie = !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_pagesort']) ? explode(",", $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_pagesort']) : array(); - - // - // Sorting options - // - if ( isset( $HTTP_POST_VARS['sort_method'] ) ) - { - switch ( $HTTP_POST_VARS['sort_method'] ) - { - case 'page_id': - $sort_method = 'page_id'; - break; - case 'page_name': - $sort_method = 'page_name'; - break; - case 'page_desc': - $sort_method = 'page_desc'; - break; - default: - $sort_method = !empty($sort_cookie[0]) ? $sort_cookie[0] : 'page_name'; - } - } - else - { - $sort_method = !empty($sort_cookie[0]) ? $sort_cookie[0] : 'page_name'; - } - - if ( isset( $HTTP_POST_VARS['sort_order'] ) ) - { - switch ( $HTTP_POST_VARS['sort_order'] ) - { - case 'ASC': - $sort_order = 'ASC'; - break; - case 'DESC': - $sort_order = 'DESC'; - break; - default: - $sort_order = !empty($sort_cookie[1]) ? $sort_cookie[1] : 'ASC'; - } - } - else - { - $sort_order = !empty($sort_cookie[1]) ? $sort_cookie[1] : 'ASC'; - } - - /* - if ( isset( $HTTP_POST_VARS['include_all'] ) ) - { - switch ( $HTTP_POST_VARS['include_all'] ) - { - case '0': - $include_all = '0'; - break; - case '1': - $include_all = '1'; - break; - default: - $include_all = isset($sort_cookie[2]) ? $sort_cookie[2] : '0'; - } - } - else - { - $include_all = isset($sort_cookie[2]) ? $sort_cookie[2] : '0'; - } - */ - $include_all = 0; - - $sort_cookie = array($sort_method, $sort_order, $include_all, isset($sort_cookie[3]) ? $sort_cookie[3] : intval($include_all), isset($sort_cookie[4]) ? $sort_cookie[4] : '', isset($sort_cookie[5]) ? $sort_cookie[5] : $include_all); - setcookie($board_config['cookie_name'] . '_pagesort', implode(',', $sort_cookie), time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); // -------------------------------------------------------------------------------------------------------------------- --- 90,93 ---- *************** *** 249,252 **** --- 179,183 ---- 'L_PAGE_TITLE' => $lang['Page'], 'L_PAGE_DESC' => $lang['Page_desc'], + 'L_PAGE_PARENT' => $lang['Page_parent'], 'L_PAGE_ID' => empty($lang['Page_Id']) ? "Page Id" : $lang['Page_Id'], 'L_PAGE_ICON' => empty($lang['Page_icon']) ? "Page Icon" : $lang['Page_icon'], *************** *** 569,572 **** --- 500,516 ---- // Display list of Pages --------------------------------------------------------------- // --------------------------------------------------------------------------------------- + $mx_page->init($nav_page_id, true); + + if ( !$mx_page->page_rowset[$nav_page_id]['page_parent'] ) + { + $page_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; + } + else + { + $page_list .= '<option value="0">' . $lang['None'] . '</option>\n'; + } + $page_list .= $mx_page->generate_jumpbox( 0, 0, array( $mx_page->page_rowset[$nav_page_id]['page_parent'] => 1 ) ); + + $select_page = $mx_page->generate_jumpbox( 0, 0, array( $nav_page_id => 1 ) ); // *************** *** 575,580 **** $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id = '" . $nav_page_id . "' ! ORDER BY " . $sort_method . " " . $sort_order; if( !($q_pages_current = $db->sql_query($sql)) ) --- 519,523 ---- $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id = '" . $nav_page_id . "'"; if( !($q_pages_current = $db->sql_query($sql)) ) *************** *** 596,601 **** $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id <> '" . $nav_page_id . "' ! ORDER BY " . $sort_method . " " . $sort_order; if( !($q_pages = $db->sql_query($sql)) ) --- 539,543 ---- $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id <> '" . $nav_page_id . "'"; if( !($q_pages = $db->sql_query($sql)) ) *************** *** 623,631 **** // - // Setup an additional var for the quick nav dropdown - // - $page_rows_select = array(); - - // // Pages loop // --- 565,568 ---- *************** *** 637,646 **** $is_current_page = $page_id == $nav_page_id; - if ($page_count > -1) - { - $page_rows_select_tmp = !empty($page_rows[$page_count]['page_desc']) ? ' (' . $page_rows[$page_count]['page_desc'] . ')' : ''; - $page_rows_select[$page_id] = $page_id . ' - ' . $page_rows[$page_count]['page_name'] . $page_rows_select_tmp; - } - if (!$include_all && $page_count > 0) { --- 574,577 ---- *************** *** 668,671 **** --- 599,603 ---- $page_title = !$new_page ? $page_rows[$page_count]['page_name'] : ''; $page_desc = !$new_page ? $page_rows[$page_count]['page_desc'] : ''; + $page_parent = !$new_page ? $page_rows[$page_count]['page_parent'] : ''; $page_icon = !$new_page ? $page_rows[$page_count]['page_icon'] : ''; $page_alt_icon = !$new_page ? $page_rows[$page_count]['page_alt_icon'] : ''; *************** *** 756,759 **** --- 688,692 ---- 'E_PAGE_TITLE' => $page_title, 'E_PAGE_DESC' => $page_desc, + 'E_PAGE_PARENT' => $page_list, 'S_PAGE_ICON' => $page_icon, 'S_PAGE_ALT_ICON' => $page_alt_icon, *************** *** 1135,1143 **** } - // - // Create quick nav box - // - $page_select_box = get_list_static('page_id', $page_rows_select, $nav_page_id, false); - $mode = MX_PAGE_BLOCK_TYPE; $action = MX_DO_INSERT; --- 1068,1071 ---- *************** *** 1151,1155 **** $template->assign_vars(array( ! 'PAGE_SELECT_BOX' => $page_select_box, 'RADIO_COLUMN_LIST' => $radio_column_list, 'S_HIDDEN_DYN_FIELDS' => $s_hidden_dyn_fields --- 1079,1083 ---- $template->assign_vars(array( ! 'PAGE_SELECT_BOX' => $select_page, 'RADIO_COLUMN_LIST' => $radio_column_list, 'S_HIDDEN_DYN_FIELDS' => $s_hidden_dyn_fields |
|
From: OryNider <ory...@us...> - 2007-07-17 06:17:34
|
Update of /cvsroot/mxbb/mx_smartor/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11887 Modified Files: album_pic_nuffed.php Log Message: this will enable pic nuffed efects in the old personal gallery system ;) Index: album_pic_nuffed.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_pic_nuffed.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** album_pic_nuffed.php 4 Jul 2007 15:49:32 -0000 1.2 --- album_pic_nuffed.php 17 Jul 2007 06:17:27 -0000 1.3 *************** *** 28,48 **** $phpEx = substr(strrchr(__FILE__, '.'), 1); - /* - if( $module_root_path = '' ) - { - $module_root_path = '../'; - $mx_root_path = $module_root_path . '../../'; - - include_once($mx_root_path . 'common.'.$phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - */ define('ALBUM_MOD_PATH', 'album_mod/'); --- 28,31 ---- *************** *** 76,90 **** // Get this pic info and current category info // ------------------------------------ ! $sql = "SELECT p.*, c.* FROM ". ALBUM_TABLE ." AS p, ". ALBUM_CAT_TABLE ." AS c ! WHERE pic_id = '$pic_id' AND c.cat_id = p.pic_cat_id"; ! if( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); } - $thispic = $db->sql_fetchrow($result); $db->sql_freeresult($result); --- 59,87 ---- // Get this pic info and current category info // ------------------------------------ ! if ($cat_id != PERSONAL_GALLERY) ! { ! $sql = "SELECT p.*, c.* FROM ". ALBUM_TABLE ." AS p, ". ALBUM_CAT_TABLE ." AS c ! WHERE p.pic_id = '$pic_id' AND c.cat_id = p.pic_cat_id"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); ! } ! $thispic = $db->sql_fetchrow($result); ! } ! else { ! $sql = "SELECT * ! FROM ". ALBUM_TABLE ." ! WHERE pic_id = '$pic_id'"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); ! } ! $thispic = $db->sql_fetchrow($result); } $db->sql_freeresult($result); |
|
From: OryNider <ory...@us...> - 2007-07-17 05:38:34
|
Update of /cvsroot/mxbb/mx_smartor/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2816 Modified Files: album_edit.php album_upload.php Log Message: Fixed a bug how title and description are posted and not to curup the java slideshow script :) Index: album_edit.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** album_edit.php 7 Jun 2007 20:13:29 -0000 1.7 --- album_edit.php 17 Jul 2007 05:38:27 -0000 1.8 *************** *** 179,192 **** // -------------------------------- ! $pic_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['pic_title']))); //Added by GH ! $pic_title = addslashes($pic_title); ! $pic_desc = str_replace("\'", "''", htmlspecialchars(substr(trim($HTTP_POST_VARS['pic_desc']), 0, $album_config['desc_length']))); //Added by GH $pic_desc = addslashes($pic_desc); if( empty($pic_title) ) { --- 179,196 ---- // -------------------------------- ! $pic_title = str_replace("\'", "`", htmlspecialchars(trim($HTTP_POST_VARS['pic_title']))); //Added by GH ! $pic_title = addslashes($pic_title); ! $pic_title = str_replace("'", "`", $pic_title); ! ! $pic_desc = str_replace("\'", "`", htmlspecialchars(substr(trim($HTTP_POST_VARS['pic_desc']), 0, $album_config['desc_length']))); //Added by GH $pic_desc = addslashes($pic_desc); + $pic_desc = str_replace("'", "`", $pic_desc); + if( empty($pic_title) ) { Index: album_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_upload.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** album_upload.php 7 Jun 2007 20:13:31 -0000 1.9 --- album_upload.php 17 Jul 2007 05:38:27 -0000 1.10 *************** *** 521,535 **** // -------------------------------- ! $pic_title = str_replace("\'", "''", htmlspecialchars(trim($_POST['pic_title']))); //Added by GH ! $pic_title = addslashes($pic_title); ! $pic_desc = str_replace("\'", "''", htmlspecialchars(substr(trim($_POST['pic_desc']), 0, $album_config['desc_length']))); //Added by GH $pic_desc = addslashes($pic_desc); ! $pic_username = (!$userdata['session_logged_in']) ? substr(str_replace("\'", "''", htmlspecialchars(trim($_POST['pic_username']))), 0, 32) : str_replace("'", "''", $userdata['username']); if( !isset($HTTP_POST_FILES['pic_file']) ) --- 521,539 ---- // -------------------------------- ! $pic_title = str_replace("\'", "`", htmlspecialchars(trim($_POST['pic_title']))); //Added by GH ! $pic_title = addslashes($pic_title); ! $pic_title = str_replace("'", "`", $pic_title); ! ! $pic_desc = str_replace("\'", "`", htmlspecialchars(substr(trim($_POST['pic_desc']), 0, $album_config['desc_length']))); //Added by GH $pic_desc = addslashes($pic_desc); ! $pic_desc = str_replace("'", "`", $pic_desc); ! ! $pic_username = (!$userdata['session_logged_in']) ? substr(str_replace("\'", "`", htmlspecialchars(trim($_POST['pic_username']))), 0, 32) : str_replace("'", "`", $userdata['username']); if( !isset($HTTP_POST_FILES['pic_file']) ) |
|
From: OryNider <ory...@us...> - 2007-07-15 20:03:18
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9441/album_mod Modified Files: album_common.php Log Message: Index: album_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_common.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** album_common.php 5 Jul 2007 06:00:22 -0000 1.17 --- album_common.php 15 Jul 2007 20:03:11 -0000 1.18 *************** *** 42,62 **** } // ********************************************************************** // 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"); ! // ---------- } // --- 42,155 ---- } + // ********************************************************************** // Read theme definition and language in theme definition // ********************************************************************** ! if ( !MXBB_MODULE ) { ! $sql = 'SELECT * ! FROM ' . THEMES_TABLE . ' ! WHERE themes_id = ' . (int) $style; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); ! } ! ! if ( !($row = $db->sql_fetchrow($result)) ) ! { ! // We are trying to setup a style which does not exist in the database ! // Try to fallback to the board default (if the user had a custom style) ! // and then any users using this style to the default if it succeeds ! if ( $style != $board_config['default_style']) ! { ! $sql = 'SELECT * ! FROM ' . THEMES_TABLE . ' ! WHERE themes_id = ' . (int) $board_config['default_style']; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); ! } ! ! if ( $row = $db->sql_fetchrow($result) ) ! { ! $db->sql_freeresult($result); ! $template_name = $row['template_name'] ; ! } ! else ! { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); ! } ! } ! else ! { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); ! } ! } ! ! $template_path = 'templates/' ; ! //$template_name = $row['template_name'] ; ! ! $template = new Template($phpbb_root_path . $template_path . $template_name); ! ! if ( $template ) ! { ! $current_template_path = $template_path . $template_name; ! } ! else ! { ! $current_template_path = $template_path . 'subSilver'; ! } ! ! // ------------------------------------------------------------------------- ! // Prefix with PORTAL_URL ! // ------------------------------------------------------------------------- ! $current_template_images = $phpbb_root_path . $current_template_path . "/images"; ! ! @include($phpbb_root_path . $template_path . $template_name . '/' . 'fap.cfg'); ! ! ! } else { ! ! $template_name = $theme['template_name']; ! ! $template_path = 'templates/' . $theme['template_name']; ! ! $current_template_path = $template_path . $template_name; ! ! if ( file_exists( $module_root_path . $current_template_path . "/" . $template_name . ".cfg" ) ) ! { ! // ---------- ! @include($module_root_path . $current_template_path . "/" . $template_name . ".cfg"); ! // ---------- ! } ! else ! { ! // ---------- ! @include($module_root_path . "templates/" . "subSilver/" . "subSilver.cfg"); ! // ---------- ! } } + //$mx_user->_load_mxbb_images($module_root_path); + + $img_lang = ( file_exists($module_root_path . $current_template_path . '/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 ) + { + $mx_images[$key][$key2] = $val2; + } + } + else + { + $mx_images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); + } + + } // |