|
From: Jon O. <jon...@us...> - 2006-06-28 13:58:13
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32691/modules/mx_kb/kb/modules Modified Files: kb_article.php kb_rate.php Log Message: added a new "last article" block Index: kb_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_rate.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_rate.php 7 Jun 2006 20:28:54 -0000 1.3 --- kb_rate.php 28 Jun 2006 13:58:08 -0000 1.4 *************** *** 158,164 **** $conf = str_replace( "{newrating}", $nrating, $conf ); ! $template->assign_vars( array( "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_kb_mxurl( "action=url&k=" . $article_id ) ) . '">' ) ! ); ! if ( !$reader_mode ) { $message = $conf . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_forum'], "<a href=\"" . append_sid( "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . "\">", "</a>" ); --- 158,164 ---- $conf = str_replace( "{newrating}", $nrating, $conf ); ! $template->assign_vars( array( "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_kb_mxurl( "action=url&k=" . $article_id ) ) . '">' ) ); ! ! if ( !$this->reader_mode ) { $message = $conf . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_forum'], "<a href=\"" . append_sid( "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . "\">", "</a>" ); Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_article.php 26 Jun 2006 21:34:11 -0000 1.7 --- kb_article.php 28 Jun 2006 13:58:08 -0000 1.8 *************** *** 29,33 **** 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, $print_version, $reader_mode, $board_config; // --- 29,33 ---- 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, $print_version, $board_config, $mx_block; // *************** *** 35,39 **** // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); $page_num = $mx_request_vars->request('page_num', MX_TYPE_INT, 1) - 1; --- 35,39 ---- // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->is_request('k') ? $mx_request_vars->request('k', MX_TYPE_INT, '') : $mx_block->get_parameters( 'default_article_id' ); $page_num = $mx_request_vars->request('page_num', MX_TYPE_INT, 1) - 1; *************** *** 63,72 **** if ( ( !$this->auth_user[$kb_row['article_category_id']]['auth_view'] ) ) { - /* - if ( !$userdata['session_logged_in'] ) - { - mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".pa_this_mxurl("action=file&file_id=" . $file_id), true)); - } - */ $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); --- 63,66 ---- *************** *** 217,221 **** if ( !$print_version ) { ! if ( $reader_mode ) { $template->set_filenames( array( 'body' => 'kb_article_reader.tpl' ) ); --- 211,215 ---- if ( !$print_version ) { ! if ( $this->reader_mode ) { $template->set_filenames( array( 'body' => 'kb_article_reader.tpl' ) ); |