|
From: OryNider <ory...@us...> - 2008-01-24 18:44:46
|
Update of /cvsroot/mxbb/mx_glance In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8794 Modified Files: Tag: core28x db_install.php db_upgrade.php mx_glance.php Log Message: upgrade Index: mx_glance.php =================================================================== RCS file: /cvsroot/mxbb/mx_glance/mx_glance.php,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -C2 -d -r1.9.2.1 -r1.9.2.2 *** mx_glance.php 1 Nov 2007 13:53:42 -0000 1.9.2.1 --- mx_glance.php 24 Jan 2008 18:44:36 -0000 1.9.2.2 *************** *** 65,87 **** $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); //$mx_user->add_lang('modules/mx_glance'); ! //Images ! $recent_news_bullet_old = $images['folder_announce']; //$mx_user->img('announce_read', 'POST_ANNOUNCEMENT'); ! $recent_posts_bullet_old = $images['folder']; //$mx_user->img('topic_read', 'NEW_POSTS'); ! $recent_news_bullet_new = $images['folder_announce_new']; //$mx_user->img('announce_unread', 'POST_ANNOUNCEMENT'); ! $recent_posts_bullet_new = $images['folder_new']; //$mx_user->img('topic_unread', 'NEW_POSTS'); ! //Images SRC ! $recent_news_bullet_old_src = '<img src="' . $recent_news_bullet_old . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('announce_read', 'POST_ANNOUNCEMENT', false, '', 'src'); ! $recent_posts_bullet_old_src = '<img src="' . $recent_posts_bullet_old . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('topic_read', 'NEW_POSTS', false, '', 'src'); ! $recent_news_bullet_new_src = '<img src="' . $recent_news_bullet_new . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('announce_unread', 'POST_ANNOUNCEMENT', false, '', 'src'); ! $recent_posts_bullet_new_src = '<img src="' . $recent_posts_bullet_new . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('topic_unread', 'NEW_POSTS', false, '', 'src'); if ( !defined('PHPBB_URL') ) --- 65,112 ---- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); //$mx_user->add_lang('modules/mx_glance'); ! if (!(PORTAL_BACKEND == 'phpbb3')) ! { ! //Images ! $recent_news_bullet_old_src = $images['folder_announce']; //$mx_user->img('announce_read', 'POST_ANNOUNCEMENT'); ! $recent_posts_bullet_old_src = $images['folder']; //$mx_user->img('topic_read', 'NEW_POSTS'); ! $recent_news_bullet_new_src = $images['folder_announce_new']; //$mx_user->img('announce_unread', 'POST_ANNOUNCEMENT'); ! $recent_posts_bullet_new_src = $images['folder_new']; //$mx_user->img('topic_unread', 'NEW_POSTS'); ! //Images SRC ! $recent_news_bullet_old = '<img src="' . $recent_news_bullet_old_src . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('announce_read', 'POST_ANNOUNCEMENT', false, '', 'src'); ! $recent_posts_bullet_old = '<img src="' . $recent_posts_bullet_old_src . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('topic_read', 'NEW_POSTS', false, '', 'src'); ! $recent_news_bullet_new = '<img src="' . $recent_news_bullet_new_src . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('announce_unread', 'POST_ANNOUNCEMENT', false, '', 'src'); ! $recent_posts_bullet_new = '<img src="' . $recent_posts_bullet_new_src . '" border="0" width="19" height="18" alt="" title="" />'; //$mx_user->img('topic_unread', 'NEW_POSTS', false, '', 'src'); ! } ! else ! { ! //Images ! ! $recent_news_bullet_old = $mx_user->img('announce_read', 'POST_ANNOUNCEMENT'); ! ! $recent_posts_bullet_old = $mx_user->img('topic_read', 'NEW_POSTS'); ! ! $recent_news_bullet_new = $mx_user->img('announce_unread', 'POST_ANNOUNCEMENT'); ! ! $recent_posts_bullet_new = $mx_user->img('topic_unread', 'NEW_POSTS'); ! ! //Images SRC ! ! $recent_news_bullet_old_src = $mx_user->img('announce_read', 'POST_ANNOUNCEMENT', false, '', 'src'); ! ! $recent_posts_bullet_old_src = $mx_user->img('topic_read', 'NEW_POSTS', false, '', 'src'); ! ! $recent_news_bullet_new_src = $mx_user->img('announce_unread', 'POST_ANNOUNCEMENT', false, '', 'src'); ! ! $recent_posts_bullet_new_src = $mx_user->img('topic_unread', 'NEW_POSTS', false, '', 'src'); ! } if ( !defined('PHPBB_URL') ) *************** *** 146,150 **** // CHECK FOR BAD WORDS // Define censored word matches ! if (!defined('IN_PHPBB3')) { if ( !function_exists( 'obtain_word_list' ) ) --- 171,175 ---- // CHECK FOR BAD WORDS // Define censored word matches ! if (!(PORTAL_BACKEND == 'phpbb3')) { if ( !function_exists( 'obtain_word_list' ) ) *************** *** 281,285 **** $result = $db->sql_query($sql); ! if ( !defined( 'IN_PHPBB3' ) ) { if ( !function_exists( 'auth' ) ) --- 306,310 ---- $result = $db->sql_query($sql); ! if ( !(PORTAL_BACKEND == 'phpbb3') ) { if ( !function_exists( 'auth' ) ) *************** *** 322,326 **** $auth_user = array(); ! $auth_user = $mx_auth->acl_getf($recent_auth_level, true); //print_r($auth_user); --- 347,351 ---- $auth_user = array(); ! $auth_user = $phpbb_auth->acl_getf($recent_auth_level, true); //print_r($auth_user); *************** *** 484,492 **** else { ! $message_date = mx_create_date($board_config['default_dateformat'], $latest_news[$i]['topic_time'], $board_config['board_timezone']); } ! if ( function_exists('mx_get_username_string') && defined('IN_PHPBB3') ) { $last_poster = mx_get_username_string('username', $latest_news[$i]['topic_last_poster_id'], $latest_news[$i]['topic_last_poster_name'], $latest_news[$i]['topic_last_poster_colour']); --- 509,517 ---- else { ! $message_date = phpBB2::create_date($board_config['default_dateformat'], $latest_news[$i]['topic_time'], $board_config['board_timezone']); } ! if ( function_exists('mx_get_username_string') && (PORTAL_BACKEND == 'phpbb3') ) { $last_poster = mx_get_username_string('username', $latest_news[$i]['topic_last_poster_id'], $latest_news[$i]['topic_last_poster_name'], $latest_news[$i]['topic_last_poster_colour']); *************** *** 497,501 **** $topic_poster_color = mx_get_username_string('colour', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']); $topic_poster_full = mx_get_username_string('full', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']); ! $last_poster_full .= '<a href="' . mx_append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $latest_news[$i]['topic_last_post_id']) . '#' . $latest_news[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else --- 522,526 ---- $topic_poster_color = mx_get_username_string('colour', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']); $topic_poster_full = mx_get_username_string('full', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']); ! $last_poster_full .= '<a href="' . mx_append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $latest_news[$i]['topic_last_post_id']) . '#' . $latest_news[$i]['topic_last_post_id'] . '"><img src="' . $mx_user->img('icon_topic_latest', 'VIEW_LATEST_POST', false, '', 'src') . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else *************** *** 509,513 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } --- 534,538 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } *************** *** 554,558 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } --- 579,583 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } *************** *** 593,600 **** $topic_poster = ($latest_news[$i]['topic_poster'] == ANONYMOUS ) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $latest_news[$i]['topic_poster']) . '"><span ' . $topic_poster_style . '>' . $latest_news[$i]['author_username'] . '</span></a> '; $topic_poster_full = $topic_poster; - - $topic_replies = $latest_news[$i]['topic_replies']; } //$last_post_time = $mx_user->format_date($latest_news[$i]['post_time']); --- 618,624 ---- $topic_poster = ($latest_news[$i]['topic_poster'] == ANONYMOUS ) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $latest_news[$i]['topic_poster']) . '"><span ' . $topic_poster_style . '>' . $latest_news[$i]['author_username'] . '</span></a> '; $topic_poster_full = $topic_poster; } + $topic_replies = $latest_news[$i]['topic_replies']; //$last_post_time = $mx_user->format_date($latest_news[$i]['post_time']); *************** *** 605,609 **** else { ! $last_post_time = mx_create_date($board_config['default_dateformat'], $latest_news[$i]['post_time'], $board_config['board_timezone']); } --- 629,634 ---- else { ! //$last_post_time = phpBB2::create_date($board_config['default_dateformat'], $latest_news[$i]['post_time'], $board_config['board_timezone']); ! $last_post_time = $mx_user->format_date($latest_news[$i]['topic_last_post_time']); } *************** *** 649,653 **** 'LAST_POSTER_COLOUR' => $last_poster_color, 'LAST_POSTER_FULL' => $last_poster_full, ! 'TOPIC_AUTOR_ID' => $topic_autor_id, 'TOPIC_AUTHOR' => $topic_autor, 'TOPIC_AUTHOR_COLOUR' => $topic_poster_color, --- 674,678 ---- 'LAST_POSTER_COLOUR' => $last_poster_color, 'LAST_POSTER_FULL' => $last_poster_full, ! 'TOPIC_AUTOR_ID' => $topic_autor_id, 'TOPIC_AUTHOR' => $topic_autor, 'TOPIC_AUTHOR_COLOUR' => $topic_poster_color, *************** *** 665,669 **** ); } - } else --- 690,693 ---- *************** *** 692,702 **** $template->assign_block_vars('latest_news', array( ! 'TOPIC_FOLDER_IMG_SRC' => $recent_forums_bullet_old, ! 'LAST_POSTER' => 'None', ! 'TOPIC_POSTER' => 'None', ! 'TOPIC_AUTHOR' => 'None', ! 'TOPIC_REPLIES' => '0', ! 'TOPIC_TITLE' => 'None' ! )); } } --- 716,726 ---- $template->assign_block_vars('latest_news', array( ! 'TOPIC_FOLDER_IMG_SRC' => $recent_forums_bullet_old, ! 'LAST_POSTER' => 'None', ! 'TOPIC_POSTER' => 'None', ! 'TOPIC_AUTHOR' => 'None', ! 'TOPIC_REPLIES' => '0', ! 'TOPIC_TITLE' => 'None' ! )); } } *************** *** 741,745 **** else { ! $topic_date_time = mx_create_date($board_config['default_dateformat'], $latest_topics[$i]['topic_time'], $board_config['board_timezone']); } --- 765,769 ---- else { ! $topic_date_time = phpBB2::create_date($board_config['default_dateformat'], $latest_topics[$i]['topic_time'], $board_config['board_timezone']); } *************** *** 749,754 **** $newest_code = ( $unread_topics && $recent_show_new_bullets ) ? '&view=newest' : ''; - - //$last_post_time = $mx_user->format_date($latest_topics[$i]['post_time']); if ( function_exists( 'create_date' ) ) --- 773,776 ---- *************** *** 758,766 **** else { ! $last_post_time = mx_create_date($board_config['default_dateformat'], $latest_topics[$i]['post_time'], $board_config['board_timezone']); } ! if ( function_exists('mx_get_username_string') && defined('IN_PHPBB3') ) { $topic_poster = mx_get_username_string('username', $latest_topics[$i]['topic_poster'], $latest_topics[$i]['topic_first_poster_name'], $latest_topics[$i]['topic_first_poster_colour']); --- 780,789 ---- else { ! //$last_post_time = phpBB2::create_date($board_config['default_dateformat'], $latest_topics[$i]['post_time'], $board_config['board_timezone']); ! $last_post_time = $mx_user->format_date($latest_topics[$i]['post_time']); } ! if ( function_exists('mx_get_username_string') && (PORTAL_BACKEND == 'phpbb3') ) { $topic_poster = mx_get_username_string('username', $latest_topics[$i]['topic_poster'], $latest_topics[$i]['topic_first_poster_name'], $latest_topics[$i]['topic_first_poster_colour']); *************** *** 771,775 **** $last_poster_color = mx_get_username_string('colour', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']); $last_poster_full = mx_get_username_string('full', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']); ! $last_poster_full .= '<a href="' . mx_append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $latest_topics[$i]['topic_last_post_id']) . '#' . $latest_topics[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else --- 794,798 ---- $last_poster_color = mx_get_username_string('colour', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']); $last_poster_full = mx_get_username_string('full', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']); ! $last_poster_full .= '<a href="' . mx_append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $latest_topics[$i]['topic_last_post_id']) . '#' . $latest_topics[$i]['topic_last_post_id'] . '"><img src="' . $mx_user->img('icon_topic_latest', 'VIEW_LATEST_POST', false, '', 'src') . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else *************** *** 783,787 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } --- 806,810 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } *************** *** 828,832 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } --- 851,855 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } *************** *** 861,874 **** $topic_poster_style = ''; } - $topic_autor_id = append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u=' . $latest_topics[$i]['user_id']); $topic_autor = $latest_topics[$i]['username']; ! $topic_poster = ($latest_topics[$i]['topic_poster'] == ANONYMOUS ) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $latest_topics[$i]['topic_poster']) . '"><span ' . $topic_poster_style . '>' . $latest_topics[$i]['author_username'] . '</span></a> '; $topic_poster_full = $topic_poster; - - $topic_replies = $latest_topics[$i]['topic_replies']; } $recent_forums_total_info = count($i); --- 884,895 ---- $topic_poster_style = ''; } $topic_autor_id = append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u=' . $latest_topics[$i]['user_id']); $topic_autor = $latest_topics[$i]['username']; ! $topic_poster = ($latest_topics[$i]['topic_poster'] == ANONYMOUS ) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $latest_topics[$i]['topic_poster']) . '"><span ' . $topic_poster_style . '>' . $latest_topics[$i]['author_username'] . '</span></a> '; $topic_poster_full = $topic_poster; } + $topic_replies = $latest_topics[$i]['topic_replies']; $recent_forums_total_info = count($i); *************** *** 904,908 **** 'U_LAST_POST' => mx_append_sid( PHPBB_URL . 'viewtopic.' . $phpEx . '?' . 'f=' . $latest_topics[$i]['forum_id'] . '&t=' . $latest_topics[$i]['topic_id'] . '&p=' . $latest_topics[$i]['topic_last_post_id'] . '#p' . $latest_topics[$i]['topic_last_post_id']), 'TOPIC_POSTS' => $latest_topics[$i]['topic_replies'], ! 'TOPIC_TIME' => $topic_date_time, 'TOPIC_TITLE' => $latest_topics[$i]['topic_title'], 'TOPIC_VIEWS' => $latest_topics[$i]['topic_views'], --- 925,929 ---- 'U_LAST_POST' => mx_append_sid( PHPBB_URL . 'viewtopic.' . $phpEx . '?' . 'f=' . $latest_topics[$i]['forum_id'] . '&t=' . $latest_topics[$i]['topic_id'] . '&p=' . $latest_topics[$i]['topic_last_post_id'] . '#p' . $latest_topics[$i]['topic_last_post_id']), 'TOPIC_POSTS' => $latest_topics[$i]['topic_replies'], ! 'TOPIC_TIME' => $topic_date_time, 'TOPIC_TITLE' => $latest_topics[$i]['topic_title'], 'TOPIC_VIEWS' => $latest_topics[$i]['topic_views'], *************** *** 912,916 **** 'LAST_POSTER_COLOUR' => $last_poster_color, 'LAST_POSTER_FULL' => $last_poster_full, ! 'TOPIC_AUTOR_ID' => $topic_autor_id, 'TOPIC_AUTHOR' => $topic_autor, 'TOPIC_AUTHOR_COLOUR' => $topic_poster_color, --- 933,937 ---- 'LAST_POSTER_COLOUR' => $last_poster_color, 'LAST_POSTER_FULL' => $last_poster_full, ! 'TOPIC_AUTOR_ID' => $topic_autor_id, 'TOPIC_AUTHOR' => $topic_autor, 'TOPIC_AUTHOR_COLOUR' => $topic_poster_color, |