|
From: Jon O. <jon...@us...> - 2008-06-03 21:00:34
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26502/includes Modified Files: Tag: core28x mx_functions_core.php page_tail.php Log Message: Final updates mxBB -> MXP and alike... Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.52.2.13 retrieving revision 1.52.2.14 diff -C2 -d -r1.52.2.13 -r1.52.2.14 *** mx_functions_core.php 29 Apr 2008 18:27:48 -0000 1.52.2.13 --- mx_functions_core.php 3 Jun 2008 21:00:25 -0000 1.52.2.14 *************** *** 1382,1386 **** function output() { ! global $layouttemplate; $layouttemplate->assign_block_vars('layout_column.blocks', array( --- 1382,1386 ---- function output() { ! global $layouttemplate, $mx_page; $layouttemplate->assign_block_vars('layout_column.blocks', array( *************** *** 1388,1391 **** --- 1388,1400 ---- '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; + } } *************** *** 2570,2573 **** --- 2579,2585 ---- 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.32.2.5 retrieving revision 1.32.2.6 diff -C2 -d -r1.32.2.5 -r1.32.2.6 *** page_tail.php 28 Apr 2008 17:54:23 -0000 1.32.2.5 --- page_tail.php 3 Jun 2008 21:00:26 -0000 1.32.2.6 *************** *** 40,43 **** --- 40,60 ---- } + // + // Page last updated (by) + // + if (!empty($mx_page->last_updated)) + { + echo(var_export($board_config)); + $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'; |