بابهت: زیادکردنی نوێترین سهردێر و کاتی ناردنی لهتهنیشت ههرمهکۆیهك
سڵاو،
زیادکردنی نوێترین سهردێر لهتهنیشت ههرمهکۆیهک وه کاتی ناردنی،
سهرهتا پهڕگهی 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
بیکهوه بگهڕێ بۆ ئهم کۆده لهدێڕی 110:
//
// 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 ) . '...';
}
}واتا بهم شێوهیه،
//
// 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 ) . '...';
}
}ئیستا ئهویش خهزن بکهو باریان بکهوه شوێنی خۆیان،
ئیستا بڕۆ سهرهتا مهکۆکهت ئهنجامهکهی دهبینی، وهک ئهم وێنهیه،
سهرکهوتوبن