mcclayn
На будущее
http://www.phpbbguru.net/community/view ... A%F2%EE%F0
automan писал(а):VVVas, большое тебе спасибо
еще маленький вопросик получается что картинкане меняется на
можно ли как то это исправить, или это сложно?
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]-----------------------------------------
#
$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'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
#
#-----[ REPLACE WITH ]---------------------------------
#
$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="' . ($unread_topics ? $images['icon_newest_reply'] : $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'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';<img src="' . $images['icon_latest_reply'] . '" border="0" alt="' .<img src="' . ($unread_topics ? $images['icon_newest_reply'] : $images['icon_latest_reply']) . '" border="0" alt="' .#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]-----------------------------------------
#
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 )
WHERE f.forum_parent = '{$forum_id}'
ORDER BY f.cat_id, f.forum_order";
break;
#
#-----[ REPLACE WITH ]----------------------------------------
#
default:
$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 )
WHERE f.forum_parent = '{$forum_id}'
ORDER BY f.cat_id, f.forum_order";
break;
#
#-----[ FIND ]-----------------------------------------
#
if ( $subforum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . '<br />';
$last_post .= ( $subforum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($subforum_data[$j]['post_username'] != '' ) ? $subforum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $subforum_data[$j]['user_id']) . '">' . $subforum_data[$j]['username'] . '</a> ';
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_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>';
}
#
#-----[ REPLACE WITH ]---------------------------------
#
if ( $subforum_data[$j]['forum_last_post_id'] )
{
$topic_title = (strlen($subforum_data[$j]['topic_title']) < $max_topic_length) ? '' : $subforum_data[$j]['topic_title'];
$subforum_data[$j]['topic_title'] = (strlen($subforum_data[$j]['topic_title']) > $max_topic_length) ? substr($subforum_data[$j]['topic_title'], 0, $max_topic_length) . '…' : $subforum_data[$j]['topic_title'];
$last_post_time = create_date($board_config['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title . '">' . $subforum_data[$j]['topic_title'] . '</a><br/>';
$last_post .= $last_post_time . '<br/>';
$last_post .= ( $subforum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($subforum_data[$j]['post_username'] != '' ) ? $subforum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $subforum_data[$j]['user_id']) . '">' . $subforum_data[$j]['username'] . '</a> ';
}
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------
#
# EoM#
# --- [ Найти ] ----
#
$last_post = $last_post_time . '<br />';
#
# --- [ Заменить на ] ----
#
$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'] . '">' . $last_post_time . '</a> </br>';
#
# --- [ Найти ] ----
#
$last_post .= '<a href="'
#
# --- [ В строке, Найти ] ----
#
$last_post
#
# --- [ Заменить на ] ----
#
// $last_post
#
# EoM
#
Shock13666 писал(а):Реально и нетяжело.
$last_post = $last_post_time . '<br />';$last_post .= $last_post_time . '<br />';#
# --- [ Найти ] ----
#
$last_post .= $last_post_time . '<br />';
#
# --- [ Заменить на ] ----
#
$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'] . '">' . $last_post_time . '</a> </br>'; #
# --- [ Найти ] ----
#
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
#
# --- [ Заменить на ] ----
#
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '">';
#
# --- [ Найти ] ----
#
$last_post .= $last_post_time . '<br/>';
#
# --- [ Заменить на ] ----
# И вот тут надо экспериментировать
$last_post .= $last_post_url . $last_post_time . '</a><br/>';
#
# --- [ Найти ] ----
# Строка 646
$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> ';
#
# --- [ Заменить на ] ----
#
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '">';
#
# --- [ Найти ] ----
# Строка 661
$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> ';
#
# --- [ Заменить на ] ----
#
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '">';
# Догадался, что я делаю?
# --- [ Открыть ] ----
#
viewforum.TPL
#
# --- [ Найти и удалить ] ----
#
{topicrow.NEWEST_POST_IMG}
#
# --- [ Найти ] ----
#
{topicrow.LAST_POST_TIME}
#
# --- [ Заменить на ] ----
#
{topicrow.NEWEST_POST_IMG}{topicrow.LAST_POST_TIME}</a>
Вернуться в Анонсы и поддержка модов для phpBB 2.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0