|
From: Markus P. <mar...@us...> - 2005-04-26 22:37:32
|
Update of /cvsroot/mxbb/core/modules/mx_last_msg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29338 Modified Files: mx_last_msg.php Log Message: Code cleanup and template issues fixed in mx_last_msg. Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_last_msg/mx_last_msg.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_last_msg.php 11 Feb 2005 22:06:21 -0000 1.12 --- mx_last_msg.php 26 Apr 2005 22:37:21 -0000 1.13 *************** *** 13,17 **** */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by --- 13,17 ---- */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by *************** *** 19,58 **** * ('at your option) any later version. */ - - $block_config = read_block_config( $block_id ); - $title = $block_config[$block_id]['block_title']; ! $block_size = ( !empty( $block_size ) ? $block_size : '100%' ); ! ! if ( $view_page ) ! { ! $template->set_filenames( array( "body_last_msg" => "mx_last_msg_view.tpl" ) ); ! } ! else { ! $template->set_filenames( array( "body_last_msg" => "mx_last_msg.tpl" ) ); } // Read block Configuration ! $PostNumber = $block_config[$block_id][Last_Msg_Number_Title]['parameter_value']; ! $display_date = $block_config[$block_id][Last_Msg_Display_Date]['parameter_value']; ! $nb_characteres = $block_config[$block_id][Last_Msg_Title_Length]['parameter_value']; ! $target = $block_config[$block_id][Last_Msg_Target]['parameter_value']; ! $align = $block_config[$block_id][Last_Msg_Align]['parameter_value']; ! $display_forum = $block_config[$block_id][Last_Msg_Display_Forum]['parameter_value']; ! $forum_lst_msg = $block_config[$block_id][Last_Msg_forum]['parameter_value']; ! if ( empty( $PostNumber ) ) $PostNumber = 5; ! $display_author = $block_config[$block_id][Last_Msg_Display_Author]['parameter_value']; ! $display_last_author = $block_config[$block_id][Last_Msg_Display_Last_Author]['parameter_value']; ! $display_icon_view = $block_config[$block_id][Last_Msg_Display_Icon_View]['parameter_value']; ! $msg_filter_time = $block_config[$block_id][msg_filter_date]['parameter_value']; // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! // ********************************************************************** // Read language definition ! // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { --- 19,64 ---- * ('at your option) any later version. */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } + + // // Read block Configuration + // + $block_config = read_block_config($block_id); + $title = $block_config[$block_id]['block_title']; ! $template->set_filenames(array( ! 'body_last_msg' => 'mx_last_msg.tpl') ! ); ! // ! // Read block Configuration ! // ! $PostNumber = $block_config[$block_id]['Last_Msg_Number_Title']['parameter_value']; ! $display_date = $block_config[$block_id]['Last_Msg_Display_Date']['parameter_value']; ! $nb_characteres = $block_config[$block_id]['Last_Msg_Title_Length']['parameter_value']; ! $target = $block_config[$block_id]['Last_Msg_Target']['parameter_value']; ! $align = $block_config[$block_id]['Last_Msg_Align']['parameter_value']; ! $display_forum = $block_config[$block_id]['Last_Msg_Display_Forum']['parameter_value']; ! $forum_lst_msg = $block_config[$block_id]['Last_Msg_forum']['parameter_value']; ! if( empty($PostNumber) ) $PostNumber = 5; ! $display_author = $block_config[$block_id]['Last_Msg_Display_Author']['parameter_value']; ! $display_last_author = $block_config[$block_id]['Last_Msg_Display_Last_Author']['parameter_value']; ! $display_icon_view = $block_config[$block_id]['Last_Msg_Display_Icon_View']['parameter_value']; ! // ! // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! // ! $msg_filter_time = $block_config[$block_id]['msg_filter_date']['parameter_value']; ! ! // // Read language definition ! // if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { *************** *** 64,77 **** } // Authorization SQL ! $auth_data_sql_msg = get_auth_forum(); ! if ( empty( $forum_lst_msg ) ) { $forum_lst_msg = $auth_data_sql_msg; } ! // Added for 2.705 ! if ( empty( $forum_lst_msg ) ) { $forum_lst_msg = -1; --- 70,83 ---- } + // // Authorization SQL ! // $auth_data_sql_msg = get_auth_forum(); ! if ( empty($forum_lst_msg) ) { $forum_lst_msg = $auth_data_sql_msg; } ! if ( empty($forum_lst_msg) ) { $forum_lst_msg = -1; *************** *** 83,176 **** $start_next = $msg_start + $PostNumber; ! if ( $view_page ) ! { ! $url_next = append_sid( PORTAL_URL . 'index.php' . '?lmsg_start=' . $start_next . '&block_id=' . $block_id ); ! $url_prev = append_sid( PORTAL_URL . 'index.php' . '?lmsg_start=' . $start_prev . '&block_id=' . $block_id ); ! } ! else ! { ! $url_next = mx_url( 'lmsg_start' , $start_next ); // append_sid( $URL_INDEX . ( ( strpos($URL_INDEX, '?') != false ) ? '&' : '?' ) . 'lmsg_start=' . $start_next ); ! $url_prev = mx_url( 'lmsg_start' , $start_prev ); // append_sid( $URL_INDEX . ( ( strpos($URL_INDEX, '?') != false ) ? '&' : '?' ) . 'lmsg_start=' . $start_prev ); ! } ! ! $GetType = "topics"; // posts ou topics ! ! // $private = "USER"; ! $timediff = 0; // Différence de temps entre le serveur et l'heure du forum en heures, en clair si votre forum est reglé sur GMT et que vous habitez en France il suffit de mettre 0 pour qu'il se regle sur le fuseau français (a verfifier selon les cas)(GMT+1) ! // if ( $private == "USER") { ! // $private1 = " AND f.auth_view < 1"; ! // } ! // elseif ( $private == "PRIVATE") { ! // $private1 = " AND f.auth_view < 2"; ! // } ! // elseif ( $private == "MODO") { ! // $private1 = " AND f.auth_view <3"; ! // } ! // elseif ( $private == "ADMIN") { ! // $private1 = " AND f.auth_view <5"; ! // } ! // else { ! // $private =""; ! // } ! $msg_today = date('mdY'); ! switch ( $msg_filter_time ) ! { case '0': ! $msg_time_filter_lo = "no"; break; case '1': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); break; case '2': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); break; case '3': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); ! break; case '4': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 7), intval(substr($msg_today, 4, 4)) ); ! break; case '5': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 14), intval(substr($msg_today, 4, 4)) ); break; case '6': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 21), intval(substr($msg_today, 4, 4)) ); break; case '7': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 1), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); ! break; case '8': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 2), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '9': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 3), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '10': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 6), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '11': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4) - 1) ); break; default: ! $msg_time_filter_lo = "no"; break; } $sql = "SELECT COUNT(*) AS msg_num ! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p ! WHERE p.post_id = t.topic_last_post_id ! AND t.forum_id in ( $forum_lst_msg ) ! AND t.forum_id in ( $auth_data_sql_msg ) ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo ; ! } if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql); } --- 89,154 ---- $start_next = $msg_start + $PostNumber; ! $url_next = mx_url('lmsg_start' , $start_next); ! $url_prev = mx_url('lmsg_start' , $start_prev); ! $msg_today = date('mdY'); ! switch( $msg_filter_time ) ! { case '0': ! $msg_time_filter_lo = 'no'; break; case '1': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); break; case '2': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); break; case '3': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); ! break; case '4': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 7), intval(substr($msg_today, 4, 4))); ! break; case '5': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 14), intval(substr($msg_today, 4, 4))); break; case '6': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 21), intval(substr($msg_today, 4, 4))); break; case '7': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 1), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); ! break; case '8': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 2), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '9': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 3), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '10': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 6), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '11': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4) - 1)); break; default: ! $msg_time_filter_lo = 'no'; break; } $sql = "SELECT COUNT(*) AS msg_num ! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p ! WHERE p.post_id = t.topic_last_post_id ! AND t.forum_id in ( $forum_lst_msg ) ! AND t.forum_id in ( $auth_data_sql_msg ) ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo; ! } if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql); } *************** *** 179,240 **** $sql = "SELECT t.topic_title, p.topic_id, t.topic_last_post_id, p.post_time, f.forum_name, f.forum_id, ! u.username, u.user_id, p.post_username, u2.username as user2, u2.user_id as id2 ! FROM " . TOPICS_TABLE . " AS t, ! " . FORUMS_TABLE . " AS f, ! " . POSTS_TABLE . " AS p, ! " . USERS_TABLE . " AS u, ! " . USERS_TABLE . " AS u2 ! WHERE f.forum_id = t.forum_id ! AND t.topic_poster = u.user_id ! AND p.post_id = t.topic_last_post_id ! AND p.poster_id = u2.user_id ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo ; ! } ! ! $sql .= " AND f.forum_id in ( $forum_lst_msg ) ! AND f.forum_id in ( $auth_data_sql_msg ) ! ORDER BY t.topic_last_post_id DESC ! LIMIT $msg_start, $PostNumber"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not query topics list', '', __LINE__, __FILE__, $sql ); } ! $postrow = $db->sql_fetchrowset( $result ); $base_url = mx_this_url(); ! $template->assign_vars( array( ! // 'L_TITLE' => ( !empty( $lang['Latest_Post'] ) ? $lang['Latest_Post'] : 'Last Message' ), ! 'L_TITLE' => ( !empty( $title ) ? $title : 'Last Message' ), ! 'U_TARGET' => $target, ! 'U_ALIGN' => $align, ! 'BLOCK_SIZE' => $block_size, ! 'U_URL' => append_sid( PORTAL_URL . 'index.php' . '?block_id=' . $block_id ), ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination( $base_url, $msg_total_match_count, $PostNumber, $msg_start, true, true, true, false, 'lmsg_start' ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $msg_start / $PostNumber ) + 1 ), ceil( $msg_total_match_count / $PostNumber ) ) ! ) ); ! if ( $msg_total_match_count == 0 || $msg_total_match_count == '') { ! $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! ) ! ); } ! ! for( $row_count = 0; $row_count < count( $postrow ); $row_count++ ) { $row_color = ( !( $row_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; --- 157,217 ---- $sql = "SELECT t.topic_title, p.topic_id, t.topic_last_post_id, p.post_time, f.forum_name, f.forum_id, ! u.username, u.user_id, p.post_username, u2.username as user2, u2.user_id as id2 ! FROM " . TOPICS_TABLE . " AS t, ! " . FORUMS_TABLE . " AS f, ! " . POSTS_TABLE . " AS p, ! " . USERS_TABLE . " AS u, ! " . USERS_TABLE . " AS u2 ! WHERE f.forum_id = t.forum_id ! AND t.topic_poster = u.user_id ! AND p.post_id = t.topic_last_post_id ! AND p.poster_id = u2.user_id ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo; ! } ! $sql .= " AND f.forum_id in ( $forum_lst_msg ) ! AND f.forum_id in ( $auth_data_sql_msg ) ! ORDER BY t.topic_last_post_id DESC ! LIMIT $msg_start, $PostNumber"; ! ! if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not query topics list', '', __LINE__, __FILE__, $sql); } ! $postrow = $db->sql_fetchrowset($result); $base_url = mx_this_url(); ! $template->assign_vars(array( ! // 'L_TITLE' => ( !empty($lang['Latest_Post']) ? $lang['Latest_Post'] : 'Last Message' ), ! 'L_TITLE' => ( !empty($title) ? $title : 'Last Message' ), ! 'U_TARGET' => $target, ! 'U_ALIGN' => $align, ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), ! 'U_URL' => append_sid(PORTAL_URL . 'index.php' . '?block_id=' . $block_id), ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination($base_url, $msg_total_match_count, $PostNumber, $msg_start, true, true, true, false, 'lmsg_start'), ! 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor($msg_start / $PostNumber) + 1 ), ceil($msg_total_match_count / $PostNumber)) ! )); ! if ( $msg_total_match_count == 0 || $msg_total_match_count == '' ) { ! $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! )); } ! ! for( $row_count = 0; $row_count < count($postrow); $row_count++ ) { $row_color = ( !( $row_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; *************** *** 242,246 **** $message = $postrow[$row_count]['topic_title']; ! $url = append_sid( PHPBB_URL . 'viewtopic.php?t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id'] ); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) --- 219,223 ---- $message = $postrow[$row_count]['topic_title']; ! $url = append_sid(PHPBB_URL . 'viewtopic.php?t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id']); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) *************** *** 325,329 **** $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid( "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest" ) . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else --- 302,306 ---- $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else *************** *** 340,344 **** $folder_alt = ( $postrow[$row_count]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid( "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest" ) . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } --- 317,321 ---- $folder_alt = ( $postrow[$row_count]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } *************** *** 360,366 **** } ! IF ( $display_author == "TRUE" ) { ! $topic_author = ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['user_id'] ) . '">' : ''; $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? $postrow[$row_count]['username'] : ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] : $lang['Guest'] ); $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '</a>' : ''; --- 337,343 ---- } ! if ( $display_author == "TRUE" ) { ! $topic_author = ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['user_id']) . '">' : ''; $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? $postrow[$row_count]['username'] : ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] : $lang['Guest'] ); $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '</a>' : ''; *************** *** 373,377 **** if ( $display_last_author == "TRUE" ) { ! $last_post_author = ( $postrow[$row_count]['id2'] == ANONYMOUS ) ? ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid( PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['id2'] ) . '">' . $postrow[$row_count]['user2'] . '</a>'; } else --- 350,354 ---- if ( $display_last_author == "TRUE" ) { ! $last_post_author = ( $postrow[$row_count]['id2'] == ANONYMOUS ) ? ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['id2']) . '">' . $postrow[$row_count]['user2'] . '</a>'; } else *************** *** 380,394 **** } ! if ( strlen( $message ) > $nb_characteres ) { ! $message = substr( $message, 0, $nb_characteres ); ! $position_espace = strrpos( $message, " " ); ! $message = substr( $message, 0, $position_espace ); ! $message .= "..."; } if ( $display_date == "TRUE" ) { ! $message_date = create_date( $board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone'] ); } else --- 357,371 ---- } ! if ( strlen($message) > $nb_characteres ) { ! $message = substr($message, 0, $nb_characteres); ! $position_espace = strrpos($message, ' '); ! $message = substr($message, 0, $position_espace); ! $message .= '...'; } if ( $display_date == "TRUE" ) { ! $message_date = create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); } else *************** *** 400,404 **** { $forum_name = $postrow[$row_count]['forum_name']; ! $forum_url = append_sid( PHPBB_URL . 'viewforum.php?f=' . $postrow[$row_count]['forum_id'] ); } else --- 377,381 ---- { $forum_name = $postrow[$row_count]['forum_name']; ! $forum_url = append_sid(PHPBB_URL . 'viewforum.php?f=' . $postrow[$row_count]['forum_id']); } else *************** *** 410,414 **** if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid( PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id'] ) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . PHPBB_URL . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else --- 387,391 ---- if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id']) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . PHPBB_URL . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else *************** *** 417,437 **** } ! $template->assign_block_vars( "msg_row", array( "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "LAST_MSG" => $message, ! "LAST_MSG_DATE" => $message_date, ! "FORUM_NAME" => $forum_name, ! "U_LAST_MSG" => $url, ! "U_FORUM" => $forum_url , ! 'LAST_POST_IMG' => $last_post_url, ! 'FOLDER_IMG' => $folder_image, ! 'TOPIC_AUTHOR' => $topic_author, ! 'LAST_POST_AUTHOR' => $last_post_author, ! 'L_TOPIC_FOLDER_ALT' => $folder_alt ! ) ! ); } ! $template->pparse( "body_last_msg" ); ?> \ No newline at end of file --- 394,414 ---- } ! $template->assign_block_vars('msg_row', array( ! 'ROW_COLOR' => "#" . $row_color, ! 'ROW_CLASS' => $row_class, ! 'LAST_MSG' => $message, ! 'LAST_MSG_DATE' => $message_date, ! 'FORUM_NAME' => $forum_name, ! 'U_LAST_MSG' => $url, ! 'U_FORUM' => $forum_url, ! 'LAST_POST_IMG' => $last_post_url, ! 'FOLDER_IMG' => $folder_image, ! 'TOPIC_AUTHOR' => $topic_author, ! 'LAST_POST_AUTHOR' => $last_post_author, ! 'L_TOPIC_FOLDER_ALT' => $folder_alt ! )); } ! $template->pparse('body_last_msg'); ?> \ No newline at end of file |