|
From: Jon O. <jon...@us...> - 2006-08-04 20:10:47
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4946/modules/mx_kb/kb/modules Modified Files: kb_article.php kb_cat.php kb_stats.php Log Message: statistics print view Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_stats.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_stats.php 1 Aug 2006 21:00:38 -0000 1.6 --- kb_stats.php 4 Aug 2006 20:10:43 -0000 1.7 *************** *** 34,57 **** // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); - $stats = $mx_request_vars->request('stats', MX_TYPE_NO_TAGS, ''); - - //$this->generate_jumpbox( 'auth_view', 0, 0, true ); - $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); - - $template->set_filenames( array( 'body' => 'kb_stats_body.tpl' ) ); ! if ( $stats == 'toprated' ) ! { ! $path_kb = $lang['Top_toprated']; ! } ! elseif ( $stats == 'latest' ) { ! $path_kb = $lang['Top_latest']; } ! elseif ( $stats == 'mostpopular' ) { ! $path_kb = $lang['Top_most_popular']; } $template->assign_vars( array( 'L_CATEGORY_NAME' => $category_name, --- 34,93 ---- // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); ! // ! // Sorting of items ! // ! if ( isset( $_REQUEST['sort_method'] ) ) { ! switch ( $_REQUEST['sort_method'] ) ! { ! case 'Id': ! $this->sort_method = 't.article_id'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_id']; ! break; ! case 'Latest': ! $this->sort_method = 't.article_date'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_latest']; ! break; ! case 'Toprated': ! $this->sort_method = 'rating'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_toprated']; ! break; ! case 'Most_popular': ! $this->sort_method = 't.views'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_most_popular']; ! break; ! case 'Userrank': ! $this->sort_method = 'u.user_rank'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_userrank']; ! break; ! case 'Alphabetic': ! $this->sort_method = 't.article_title'; ! $this->sort_method_extra = 't.article_type' . " DESC, " ; ! $path_kb = ' » ' . $lang['Top_alphabetic']; ! break; ! } } ! ! if ( isset( $_REQUEST['sort_order'] ) ) { ! switch ( $_REQUEST['sort_order'] ) ! { ! case 'ASC': ! $this->sort_order = 'ASC'; ! break; ! case 'DESC': ! $this->sort_order = 'DESC'; ! break; ! } } + $template->set_filenames( array( 'body' => 'kb_stats_body.tpl' ) ); + $template->assign_vars( array( 'L_CATEGORY_NAME' => $category_name, *************** *** 66,94 **** 'L_CATEGORY' => $lang['Category_sub'], 'L_ARTICLES' => $lang['Articles'], ! 'PATH' => '» ' . $path_kb, 'U_CAT' => append_sid( $this->this_mxurl( 'mode=cat&cat=' . $category_id ) ) )); ! $this->display_stats( $start, $stats ); ! ! // ! // Stats pagination is inactivated for now ;) ! // ! if ( $total_articles > 0 ) ! { ! // $pagination = generate_pagination( $this->this_mxurl( "mode=cat&cat=$category_id" ), $total_articles, $kb_config['pagination'], $start ) . ' '; ! } ! ! if ( $total_articles > 0 ) ! { ! // $template->assign_block_vars( 'pagination', array() ); ! } // // Get footer quick dropdown jumpbox // - //$this->generate_jumpbox( 'auth_view', 0, 0, true ); $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); - } } --- 102,115 ---- 'L_CATEGORY' => $lang['Category_sub'], 'L_ARTICLES' => $lang['Articles'], ! 'PATH' => $path_kb, 'U_CAT' => append_sid( $this->this_mxurl( 'mode=cat&cat=' . $category_id ) ) )); ! $this->display_items( $start ); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); } } Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_cat.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_cat.php 1 Aug 2006 21:00:38 -0000 1.7 --- kb_cat.php 4 Aug 2006 20:10:43 -0000 1.8 *************** *** 143,161 **** $template->assign_vars( array( - 'PAGINATION' => $pagination, - 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['pagination'] ) + 1 ), ceil( $total_articles / $kb_config['pagination'] ) ), - 'L_GOTO_PAGE' => $lang['Goto_page'], - 'L_CATEGORY_NAME' => $category_name, - 'L_ARTICLE' => $lang['Article'], - 'L_ARTICLE_TYPE' => $lang['Article_type'], - 'L_ARTICLE_CATEGORY' => $lang['Category'], - 'L_ARTICLE_DATE' => $lang['Date'], - 'L_ARTICLE_AUTHOR' => $lang['Author'], - 'L_VIEWS' => $lang['Views'], - 'L_VOTES' => $lang['Votes'], - - 'L_CATEGORY' => $lang['Category_sub'], - 'L_ARTICLES' => $lang['Articles'], - 'U_CAT' => append_sid( $this->this_mxurl( 'mode=cat&cat=' . $category_id ) ) ) ); --- 143,146 ---- Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** kb_article.php 4 Aug 2006 16:30:30 -0000 1.12 --- kb_article.php 4 Aug 2006 20:10:43 -0000 1.13 *************** *** 27,31 **** function main( $action ) { ! global $template, $lang, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx, $images; global $mx_kb_custom_field, $mx_kb_functions, $print_version, $board_config, $mx_block; --- 27,31 ---- function main( $action ) { ! global $template, $lang, $theme, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx, $images; global $mx_kb_custom_field, $mx_kb_functions, $print_version, $board_config, $mx_block; *************** *** 294,298 **** 'EDIT' => $edit, 'DELETE' => $delete, ! 'VIEWS' => $views ) ); --- 294,301 ---- 'EDIT' => $edit, 'DELETE' => $delete, ! 'VIEWS' => $views, ! ! 'T_TH_COLOR1' => '#'.$theme['th_color1'], // Border Colors (main) ! ) ); |