Преогромнейшее спасибо!

Код: Выделить всё
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]-----------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] : $lang['Guest']) : $forum_data[$j]['username'];
#
#-----[ REPLACE WITH ]---------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
Код: Выделить всё
$max_topic_length = 30;
if ( $forum_data[$j]['forum_last_post_id'] )
{
$forum_data[$j]['topic_title'] = (strlen($forum_data[$j]['topic_title']) > $max_topic_length) ? substr($forum_data[$j]['topic_title'], 0, $max_topic_length) . '…' : $forum_data[$j]['topic_title'];
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $forum_data[$j]['topic_id']) . '">' . $forum_data[$j]['topic_title'] . '</a>';
$last_post .= ' <a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a><br />';
$last_post .= $last_post_time . '<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] : $lang['Guest']) : $forum_data[$j]['username'];
}
Код: Выделить всё
/////////////
if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . ' ';
$topic_id = $topic_rowset[$i]['topic_moved_id'];
$folder_image = $images['folder'];
$folder_alt = $lang['Topics_Moved'];
$newest_post_img = '';
}
else
{
if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = $images['folder_sticky'];
$folder_new = $images['folder_sticky_new'];
}
else if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder = $images['folder_locked'];
$folder_new = $images['folder_locked_new'];
}
else
{
if($replies >= $board_config['hot_threshold'])
{
$folder = $images['folder_hot'];
$folder_new = $images['folder_hot_new'];
}
else
{
$folder = $images['folder'];
$folder_new = $images['folder_new'];
}
}
$newest_post_img = '';
if( $userdata['session_logged_in'] )
{
if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
$unread_topics = true;
if( !empty($tracking_topics[$topic_id]) )
{
if( $tracking_topics[$topic_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if( !empty($tracking_forums[$forum_id]) )
{
if( $tracking_forums[$forum_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if( $unread_topics )
{
$folder_image = $folder_new;
$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
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder_new;
$folder_alt = ( $topic_rowset[$i]['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> ';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
////////////
Код: Выделить всё
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]-----------------------------------------
#
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
ORDER BY f.cat_id, f.forum_order";
break;
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
break;
#
#-----[ REPLACE WITH ]----------------------------------------
#
case 'postgresql':
// [start] Last Forum Topic On Index
// [FIND] , u.user_id ### [AFTER] , t.topic_title, t.topic_id
// [FIND] , " . USERS_TABLE . " u ### [AFTER] , " . TOPIC_TABLE . " t
// [FIND] AND u.user_id = p.poster_id ### [AFTER] AND t.topic_id = p.topic_id
// [FIND] NULL, NULL ### [AFTER] , NULL, NULL
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . TOPIC_TABLE . " t
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
AND t.topic_id = p.topic_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
// [end] Last Forum Topic On Index
break;
case 'oracle':
// [start] Last Forum Topic On Index
// [FIND] , u.user_id ### [AFTER] , t.topic_title, t.topic_id
// [FIND] , " . USERS_TABLE . " u ### [AFTER] , " . TOPIC_TABLE . " t
// [FIND] AND u.user_id = p.poster_id(+) ### [AFTER] AND t.topic_id = p.topic_id(+)
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . TOPIC_TABLE . " t
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
AND t.topic_id = p.topic_id(+)
ORDER BY f.cat_id, f.forum_order";
break;
// [end] Last Forum Topic On Index
default:
// [start] Last Forum Topic On Index
// [FIND] , u.user_id ### [AFTER] , t.topic_title, t.topic_id
// [FIND] (( ### [AFTER] (
// [FIND] LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) ### [AFTER] LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id
FROM ((( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
ORDER BY f.cat_id, f.forum_order";
// [end] Last Forum Topic On Index
break;
Код: Выделить всё
$max_topic_length = 30;
if ( $forum_data[$j]['forum_last_post_id'] )
{
$forum_data[$j]['topic_title'] = (strlen($forum_data[$j]['topic_title']) > $max_topic_length) ? substr($forum_data[$j]['topic_title'], 0, $max_topic_length) . '…' : $forum_data[$j]['topic_title'];
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $forum_data[$j]['topic_id']) . '">' . $forum_data[$j]['topic_title'] . '</a>';
$last_post .= ' <a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a><br />';
$last_post .= $last_post_time . '<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] : $lang['Guest']) : $forum_data[$j]['username'];
}