[ resmi görüntülemek için tıklayın ]
Kod: Tümünü seç
#-----[ Open]------------------------------------------
#
includes/page_header.php
#
#-----[ Find ]------------------------------------------
#
define('HEADER_INC', TRUE);
#
#-----[ Add After ]------------------------------------------
#
// number of recent topics
$CFG['number_recent_topics'] = '10';
// Forums which you dont want them to appear in the scroll bar
$CFG['exceptional_forums'] = '';
#
#-----[ Find ]------------------------------------------
#
$s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : '';
#
#-----[ Add After ]------------------------------------------
#
//
// Recent Topics
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG['exceptional_forums'] == '' )
{
$except_forum_id = '\'start\'';
}
else
{
$except_forum_id = $CFG['exceptional_forums'];
}
for ($i = 0; $i < count($forum_data); $i++)
{
if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
{
if ($except_forum_id == '\'start\'')
{
$except_forum_id = $forum_data[$i]['forum_id'];
}
else
{
$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
}
}
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_replies, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
$template->assign_block_vars('recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
'L_REPLIES' => intval($recent_topic_row[$i]['topic_replies']),
'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
'S_POSTER' => $recent_topic_row[$i]['username'],
'S_POSTTIME' => $lang['Reply_time'] .': ' . create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
}
//
// END - Recent Topics
//
#
#-----[ Find]------------------------------------------
#
'L_SEARCH_SELF' => $lang['Search_your_posts'],
#
#-----[ Add After]------------------------------------------
#
// Recent Topics
'L_RECENT_TOPICS' => $lang['Recent_topics'],
'L_AUTHOR' => $lang['Replier'],
'L_VIEW_AUTHOR' => $lang['View_replier'],
'L_TOTAL_REPLIES' => $lang['Total_replies'],
#
#-----[ Open]-------------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ Find ]---------------------------------------------
#
// That's all Folks!
#
#-----[ Add Before ]----------------------------------------
#
// Last 10 posts
$lang['Recent_topics'] = 'Son Konular';
$lang['Reply_time'] = 'Konuyu Açan';
$lang['Replier'] = 'Son Yazan';
$lang['View_replier'] = 'Profile';
$lang['Total_replies'] = 'Cevaplama';
#
# If you want the scroll bar to apear in all pages do this
#
#-----[ Open]-------------------------------------------------------
#
templates/subSilver/overall_header.tpl (Bu kodu eğer tüm forumlarda üst tarafta görünmesini istiyorsanız ekleyin.www.forumum.org)
#
#-----[ Find ]---------------------------------------------
# You will find it in the end of the page
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
</tr>
</table></td>
</tr>
</table>
<br />
#
#-----[ add after]----------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25" align="center"><span class="cattitle">{L_RECENT_TOPICS}</span></td>
</tr>
<tr>
<td class="row1" align="left" height="30"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="right" scrolldelay="50" scrollamount="2">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}" title="{recent_topic_row.S_POSTTIME}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a> ||
{L_AUTHOR}: <a href="{recent_topic_row.U_POSTER}" title="{L_VIEW_AUTHOR}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> || {L_TOTAL_REPLIES} [ {recent_topic_row.L_REPLIES} ] .::.
<!-- END recent_topic_row -->
</marquee>
</span>
</td>
</tr>
</table><br />
#
# If you want the Scroll bar to appear on the Main page of the forum do this
#
#-----[ Open]-------------------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ Find ]---------------------------------------------
#
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>
#
#-----[ Add After ]----------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25" align="center"><span class="cattitle">{L_RECENT_TOPICS}</span></td>
</tr>
<tr>
<td class="row1" align="left" height="30"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="right" scrolldelay="50" scrollamount="2">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}" title="{recent_topic_row.S_POSTTIME}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a> ||
{L_AUTHOR}: <a href="{recent_topic_row.U_POSTER}" title="{L_VIEW_AUTHOR}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> || {L_TOTAL_REPLIES} [ {recent_topic_row.L_REPLIES} ] .::.
<!-- END recent_topic_row -->
</marquee>
</span>
</td>
</tr>
</table><br />
#
#-----[ Close and Save all]----------------------------------------
#
# END