|
From: Jon O. <jon...@us...> - 2008-01-30 09:11:34
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7690/includes Modified Files: mx_functions_blockcp.php mx_functions_core.php mx_functions_tools.php page_tail.php Log Message: BlockCP - updated what features should be adminCP options only Schemas - no point updating the module INSERTS with full spec Sitelog - updated sitemap and pagination mod_rewrite - exceptions when in need of technical full paths...eg for module editing actions Nav menu - intial fixes while simplifying this module with less parameters and more tpl freedom ...more to come ;) Tinymce updates wherever needed - admin has full interface, users less options. mx_users - bugfix for renaming users Index: mx_functions_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_blockcp.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mx_functions_blockcp.php 9 Sep 2007 16:48:16 -0000 1.19 --- mx_functions_blockcp.php 30 Jan 2008 09:10:56 -0000 1.20 *************** *** 361,365 **** // Activate BlockCP SubPanels, based on auth // ! if (!$new_block) { $blockcptemplate->assign_block_vars('blockcp_general', array( --- 361,365 ---- // Activate BlockCP SubPanels, based on auth // ! if (($this->auth_mod || $is_admin) && !$new_block) { $blockcptemplate->assign_block_vars('blockcp_general', array( *************** *** 368,374 **** 'S_SUBMIT' => $buttonvalue )); } ! if ( ($this->auth_mod || $is_admin ) || $new_block) { $blockcptemplate->assign_block_vars('blockcp_general_adds', array( --- 368,379 ---- 'S_SUBMIT' => $buttonvalue )); + + // + // Some general blockcp settings are moderator only + // + $blockcptemplate->assign_block_vars('blockcp_general.is_mod', array()); } ! if ( ($is_admin ) || $new_block) { $blockcptemplate->assign_block_vars('blockcp_general_adds', array( *************** *** 414,418 **** } ! if ( ($this->auth_mod || $is_admin) && !$new_block) { $blockcptemplate->assign_block_vars('blockcp_permissions', array( --- 419,423 ---- } ! if ( ($is_admin) && !$new_block) { $blockcptemplate->assign_block_vars('blockcp_permissions', array( *************** *** 543,547 **** } ! if ( $is_admin && !$new_block) { $blockcptemplate->assign_block_vars('blockcp_delete', array( --- 548,552 ---- } ! if ( $is_admin && !$new_block && $this->blockcp_mode != 'mx_blockcp') // Do not allow deleting blocks in blockcp mode { $blockcptemplate->assign_block_vars('blockcp_delete', array( Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** mx_functions_core.php 23 Jan 2008 08:24:48 -0000 1.61 --- mx_functions_core.php 30 Jan 2008 09:10:56 -0000 1.62 *************** *** 438,441 **** --- 438,442 ---- pag.page_header, pag.page_footer, + pag.page_main_layout, pag.navigation_block, pag.auth_view AS pag_auth_view, *************** *** 487,490 **** --- 488,492 ---- "page_header" => $row['page_header'], "page_footer" => $row['page_footer'], + "page_main_layout" => $row['page_main_layout'], "page_navigation_block" => $row['navigation_block'], "page_auth_view" => $row['pag_auth_view'], *************** *** 1509,1513 **** function output() { ! global $layouttemplate; $layouttemplate->assign_block_vars('layout_column.blocks', array( --- 1511,1515 ---- function output() { ! global $layouttemplate, $mx_page; $layouttemplate->assign_block_vars('layout_column.blocks', array( *************** *** 1515,1518 **** --- 1517,1530 ---- 'BLOCK' => $this->block_contents )); + + // + // Update all-in-all stats for the page + // + if (!empty($this->block_time) && $this->block_time > $mx_page->last_updated) + { + $mx_page->last_updated = $this->block_time; + $mx_page->last_updated_by = $this->editor_id; + } + } *************** *** 2528,2537 **** { $selected = ''; ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) { ! $selected = ' selected="selected"'; ! break; } } --- 2540,2552 ---- { $selected = ''; ! if (is_array($data)) { ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) ! { ! $selected = ' selected="selected"'; ! break; ! } } } *************** *** 2578,2587 **** { $checked = ''; ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) { ! $checked = ' checked'; ! break; } } --- 2593,2605 ---- { $checked = ''; ! if (is_array($data)) { ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) ! { ! $checked = ' checked'; ! break; ! } } } *************** *** 2677,2680 **** --- 2695,2702 ---- var $editcp_show = false; + var $last_updated = ''; + var $last_updated_by = ''; + + // ------------------------------ // Properties Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** page_tail.php 12 Jan 2008 10:43:45 -0000 1.35 --- page_tail.php 30 Jan 2008 09:10:56 -0000 1.36 *************** *** 41,44 **** --- 41,60 ---- } + // + // Page last updated (by) + // + if (!empty($mx_page->last_updated)) + { + $editor_name_tmp = mx_get_userdata($mx_page->last_updated_by); + $editor_name = $editor_name_tmp['username']; + $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $mx_page->last_updated, $board_config['board_timezone'] ); + + $template->assign_block_vars('page_last_updated', array( + 'L_PAGE_UPDATED' => $lang['Page_updated_date'], + 'NAME' => $userdata['user_level'] == ADMIN ? $lang['Page_updated_by'] . $editor_name : '', + 'TIME' => $edit_time, + )); + } + $mxbb_footer_text = $lang['mx_about_title']; $mxbb_footer_text_url = PORTAL_URL . 'index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&mx_copy=true'; Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mx_functions_tools.php 9 Sep 2007 16:48:17 -0000 1.16 --- mx_functions_tools.php 30 Jan 2008 09:10:56 -0000 1.17 *************** *** 1778,1782 **** //get 'to user's info // ! $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active FROM " . USERS_TABLE . " WHERE user_id = '" . $this->to_id . "' --- 1778,1782 ---- //get 'to user's info // ! $sql = "SELECT user_id, user_email FROM " . USERS_TABLE . " WHERE user_id = '" . $this->to_id . "' *************** *** 1960,1964 **** //get to users info // ! $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active FROM " . USERS_TABLE . " WHERE user_id = '".$this->to_id."' --- 1960,1964 ---- //get to users info // ! $sql = "SELECT user_id, user_email FROM " . USERS_TABLE . " WHERE user_id = '".$this->to_id."' *************** *** 3095,3099 **** $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $bugsbt_config, $lang, $userdata; // --- 3095,3099 ---- $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata; // *************** *** 3724,3728 **** { global $template, $lang, $board_config, $phpEx, $db, $userdata, $images; ! global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; // --- 3724,3728 ---- { global $template, $lang, $board_config, $phpEx, $db, $userdata, $images; ! global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; // *************** *** 3756,3760 **** $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); // Note: allowed_html_tags is altered above ! $mx_text->allow_all_html_tags = $bugsbt_config['allow_wysiwyg'] ? true : false; $mx_text_formatting = new mx_text_formatting(); --- 3756,3760 ---- $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); // Note: allowed_html_tags is altered above ! $mx_text->allow_all_html_tags = $this->allow_wysiwyg ? true : false; $mx_text_formatting = new mx_text_formatting(); *************** *** 3770,3774 **** $ranksrow = array(); ! $this->obtain_ranks( $ranksrow ); while ( $this->comments_row = $db->sql_fetchrow( $result ) ) --- 3770,3777 ---- $ranksrow = array(); ! if ($portal_config['portal_backend'] != 'internal') ! { ! $this->obtain_ranks( $ranksrow ); ! } while ( $this->comments_row = $db->sql_fetchrow( $result ) ) *************** *** 3924,3928 **** { global $template, $lang, $board_config, $phpEx, $db, $userdata, $images; ! global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; if ( !isset($this->topic_id) || $this->topic_id < 0 ) --- 3927,3931 ---- { global $template, $lang, $board_config, $phpEx, $db, $userdata, $images; ! global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; if ( !isset($this->topic_id) || $this->topic_id < 0 ) *************** *** 3975,3979 **** $ranksrow = array(); ! $this->obtain_ranks( $ranksrow ); while ( $this->comments_row = $db->sql_fetchrow( $result ) ) --- 3978,3985 ---- $ranksrow = array(); ! if ($portal_config['portal_backend'] != 'internal') ! { ! $this->obtain_ranks( $ranksrow ); ! } while ( $this->comments_row = $db->sql_fetchrow( $result ) ) *************** *** 4157,4161 **** function get_internal_comments() { ! global $db, $template; $sql = "SELECT COUNT(".$this->table_field_id.") AS number --- 4163,4167 ---- function get_internal_comments() { ! global $db, $template, $lang; $sql = "SELECT COUNT(".$this->table_field_id.") AS number *************** *** 4202,4206 **** function get_phpbb_comments() { ! global $db, $template; $sql = "SELECT COUNT(post_id) AS number --- 4208,4212 ---- function get_phpbb_comments() { ! global $db, $template, $lang; $sql = "SELECT COUNT(post_id) AS number |