بابهت: نیشاندانی دواین پهیام له پهڕهی سهرهتا
سڵاو،
لهم بابهت باس لهچۆنیهتی نیشاندانی دواین پهیام دهکهین له پهڕهی سهرهتا،
نمونه،
بۆ جێبهجێ کردنی ئهم ههنگاوانه بکه،
پهڕهی index.php بکهوه،
له له دێڕی 68 بگهڕی بۆ ئهمه،
$query = array(
'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster',
'FROM' => 'categories AS c',
'JOINS' => array(
array(
'INNER JOIN' => 'forums AS f',
'ON' => 'c.id=f.cat_id'
),
array(
'LEFT JOIN' => 'forum_perms AS fp',
'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
)
),
'WHERE' => 'fp.read_forum IS NULL OR fp.read_forum=1',
'ORDER BY' => 'c.disp_position, c.id, f.disp_position'
);بیگۆڕه بۆ ئهمه،
$query = array(
'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, t.subject',
'FROM' => 'categories AS c',
'JOINS' => array(
array(
'INNER JOIN' => 'forums AS f',
'ON' => 'c.id=f.cat_id'
),
array(
'LEFT JOIN' => 'topics AS t',
'ON' => 't.last_post_id=f.last_post_id'
),
array(
'LEFT JOIN' => 'forum_perms AS fp',
'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
)
),
'WHERE' => 'fp.read_forum IS NULL OR fp.read_forum=1',
'ORDER BY' => 'c.disp_position, c.id, f.disp_position'
);ههر لهههمان پهڕگه له دێڕی 205 بگهڕێ بۆ ئهمه،
$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.format_time($cur_forum['last_post']).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite></li>';بیگۆڕه بۆ ئهمه،
$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.limit_characters(forum_htmlencode($cur_forum['subject'])).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite><strong>'.format_time($cur_forum['last_post']).'</strong></li>';پاشان ئهم پهڕگهیه پاشهکهوت بکه و باری بکهوه.
پاشان ئهم پهڕگهیه بکهوه include/Functions.php
له دێڕی 111 بگهرێ بۆ ئهم کۆده،
//
// Common helpers and forum's wrappers for PHP functions
//ئهمهی لهدوا زیاد بکه،
function limit_characters ($str)
{
if ( strlen ( $str ) <= 30 )
{
return $str;
}
else {
return substr ( $str, 0, 30 ) . '...';
}
}پاشان پهڕگهی Functions.php پاشاکهوت بکه و باری بکهوه.
سهرکهوتوبن.