Ana Sayfada Son 10 Mesaj
Ana Sayfada Son 10 Mesaj
arkadaşlar ben de ana sayfada gönderilen son 10 msjın yayınlanmasını istiyorum şimdden teşekkür ederim
phpBB2.x - MOD İstekleri
portal için istiyorum aslında ama forum indexe de ola bilir
ezPortal için:
Forum Ana Sayfa için:
Kod: Tümünü seç
#
#-----[ AÇ ]-------------------------------------------------------
#
portal.php
#
#-----[ BUL ]-------------------
#
// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';
#
#-----[ ALTINA EKLE ]---------------------------------------
#
#
// Number of Recent Topics (not Forum ID)
$CFG['number_recent_topics'] = '10';
// Excluding forums for Recent Topics, eg. '2,4,10' (note: my Recent Topics script has its own permission checking, so you can leave this variable blank)
$CFG['exceptional_forums'] = '';
#
#-----[ BUL ]---------------------------------------------
#
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
#
#-----[ ALTINA EKLE ]---------------------------------------
#
//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$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, 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'],
'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' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
}
//
// END - Recent Topics
//
#
#-----[ BUL ]---------------------------------------------
#
'L_VOTE_BUTTON' => $lang['Vote'],
#
#-----[ ALTINA EKLE ]----------------------------------------
#
// Recent Topics
'L_RECENT_TOPICS' => $lang['Recent_topics'],
#
#-----[ AÇ ]-------------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ BUL ]---------------------------------------------
#
$lang['No_poll'] = 'No poll at the moment';
#
#-----[ ALTINA EKLE ]----------------------------------------
#
$lang['Recent_topics'] = 'Recent topics'; // Recent Topics
#
#-----[ AÇ ]-------------------------------------------------------
#
language/lang_turkish/lang_main.php
#
#-----[ BUL ]---------------------------------------------
#
?>
#
#-----[ ÜSTÜNE EKLE ]----------------------------------------
#
$lang['Recent_topics'] = 'Son Başlıklar'; // Recent Topics
#
#-----[ AÇ ]-------------------------------------------------------
#
templates/subSilver/portal_body.tpl
#
#-----[ BUL ]---------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_STATISTICS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br /> </span></td>
</tr>
</table>
<br />
#
# Kayan versiyon için
#-----[ ALTINA EKLE ]----------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_RECENT_TOPICS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="up" height="200" scrolldelay="100" scrollamount="2">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a><br />
by <a href="{recent_topic_row.U_POSTER}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> on {recent_topic_row.S_POSTTIME}<br /><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<br />
#
# Normal versiyon için
#-----[ VEYA ]------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_RECENT_TOPICS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}">{recent_topic_row.L_TITLE}</a><br />
by <a href="{recent_topic_row.U_POSTER}">{recent_topic_row.S_POSTER}</a> on {recent_topic_row.S_POSTTIME}<br /><br />
<!-- END recent_topic_row -->
</span></td>
</tr>
</table>
<br />
#
#-----[ TÜM DOSYALARI KAYDET KAPAT ]------------------------------------------
#
# EoF
Kod: Tümünü seç
##############################################################
## MOD Title: Integrated Toplist
## MOD Author: buweichiu < mods@xpoo.net > (Buwei Chiu) http://bws.xpoo.net
## MOD Description: This will add Toplist on the index for those style that's hard to use OOHOO's ADV-TOP5.
## MOD Version: 1.0.3
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit:
## index.php
## templates/subSilver/index_body.tpl
##
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod is based on OOHOO's ADV-TOP5 2.1.0
##
##############################################################
## MOD History:
##
## 2005-01-11 - Version 1.0.0
## - inititla release
## 2005-01-12 - Version 1.0.1
## - fix some message_die problem.
## 2005-01-16 - Version 1.0.2
## - fix some Var. problem.
## 2005-01-19 - Version 1.0.3
## - fix for PHP3 compatibility
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ AÇ ]------------------------------------------
#
index.php
#
#-----[ BUL ]------------------------------------------
#
//
// Find which forums are visible for this user
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
#
#-----[ ALTINA EKLE ]------------------------------------------
#
//
// Integrated Toplist 1.0.3 by bu Based on OOHOO's ADV-TOP5 (20050119)
//
// This work is licensed under the Creative Commons Attribution-ShareAlike License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/
//
// MOD START
//
// Option of Toplist Start
//
// Topics text length
$MAX_STR_LEN = 60;
// Topics to display (Default: 5)
$MAX_TOPICS = 5;
// 0 => users can see all topics including authorized issue(but they cant read the posts)
// 1 => users can see only authorized topics
$AUTH_SECRUITY = 1;
// Order by
// topic_last_post_id (Default)
// topic_replies
// topic_views
$sortby="topic_last_post_id";
//
// Option of Toplist End
//
function cutStr($str) {
global $MAX_STR_LEN;
$str = (strlen($str) > $MAX_STR_LEN) ? (substr($str, 0, $MAX_STR_LEN - 1) . "...") : $str;
return $str;
}
// Find which forums are visible for this user
$is_auth_ary_top5 = array();
$is_auth_ary_top5 = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
$auth_forum_ary_top5 = array();
// Get forum info
$sql = "SELECT forum_id FROM " . FORUMS_TABLE;
if( !$q_forums = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Toplist ERROR: Fetch forum info fail', __LINE__, __FILE__, $sql);
}
// Authorized forums info
while( $forum_row = $db->sql_fetchrow($q_forums) )
{
$forum_id1 = $forum_row['forum_id'];
if( $is_auth_ary_top5[$forum_id1]['auth_read'] == 1)
{
if(function_exists("array_push"))
{
array_push($auth_forum_ary_top5, $forum_id1);
} else {
$auth_id=count($auth_forum_ary_top5);
$auth_forum_ary_top5[$auth_id]=$forum_id1;
}
}
}
if( sizeOf($auth_forum_ary_top5) == 0 || !$AUTH_SECRUITY )
{
$auth_forums_top5 = "";
}
else
{
$auth_forums_top5 = 'AND f.forum_id IN(';
if(sizeOf($auth_forum_ary_top5) > 1)
{
$auth_forums_top5 .= implode (',', $auth_forum_ary_top5);
}
else
{
$auth_forums_top5 .= $auth_forum_ary_top5[0];
}
$auth_forums_top5 .= ')';
}
// query
$sql = "SELECT topic_id, topic_title, topic_poster, topic_views, topic_replies, topic_last_post_id, f.forum_id, forum_name
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE t.forum_id = f.forum_id
AND topic_moved_id = '0'
$auth_forums_top5
ORDER BY $sortby DESC LIMIT 0, $MAX_TOPICS";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Toplist ERROR: Fetch topic info fail', __LINE__, __FILE__, $sql);
}
// fetch rows
while( $rows = $db->sql_fetchrow($result) )
{
$topic_url = append_sid("viewtopic.$phpEx?t=" . $rows['topic_id']);
$forum_url = append_sid("viewforum.$phpEx?f=" . $rows['forum_id']);
$topic_poster = $rows['topic_poster'];
$topic_last_post_id = $rows['topic_last_post_id'];
// Grab topic poster and last replier data
$sql = "SELECT post_username, user_id, username
FROM " . POSTS_TABLE . ", " . USERS_TABLE . "
WHERE topic_id = '" . $rows['topic_id'] . "'
AND poster_id = user_id
ORDER BY post_id LIMIT 0, 1";
if( !$p_result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Toplist ERROR: Fetch topic poster fail', __LINE__, __FILE__, $sql);
}
$p_row = $db->sql_fetchrow($p_result);
$poster_name = ( $topic_poster != ANONYMOUS ) ? $p_row['username'] : ( !$p_row['post_username'] ? $lang['Guest'] : $p_row['post_username']);
$poster_url = ( $topic_poster != ANONYMOUS && !$p_row['post_username'] ) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&u=$topic_poster") . '" target="_top">' . "$poster_name</a>") : $poster_name;
$sql = "SELECT post_username, user_id, username, post_time
FROM " . POSTS_TABLE . ", " . USERS_TABLE . "
WHERE post_id = '$topic_last_post_id'
AND poster_id = user_id";
if( !$r_result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Toplist ERROR: Fetch topic last replier fail', __LINE__, __FILE__, $sql);
}
$r_row = $db->sql_fetchrow($r_result);
$replier_id = $r_row['user_id'];
$replier_name = ( $replier_id != ANONYMOUS ) ? $r_row['username'] : ( !$r_row['post_username'] ? $lang['Guest'] : $r_row['post_username']);
$replier_url = ( $replier_id != ANONYMOUS && !$r_row['post_username'] ) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&u=$replier_id") . '" target="_top">' . "$replier_name</a>") : $replier_name;
$last_post_url = append_sid("viewtopic.$phpEx?p=$topic_last_post_id#$topic_last_post_id");
$template->assign_block_vars("toprow", array(
'FORUM_NAME' => $rows['forum_name'],
'FORUM_URL' => $forum_url,
'TOPIC' => cutStr($rows['topic_title']),
'TOPIC_URL' => $topic_url,
'TOPIC_VIEWS' => $rows['topic_views'],
'TOPIC_REPLIES' => $rows['topic_replies'],
'POST_TIME' => create_date($board_config['default_dateformat'], $r_row['post_time'], $board_config['board_timezone']),
'POSTER_URL' => $poster_url,
'REPLIER_URL' => $replier_url,
'LAST_POST_URL' => $last_post_url
));
}
// MOD END
//
// Integrated Toplist 1.0.3 by bu Based on OOHOO's ADV-TOP5 (20050119)
//
#
#-----[ BUL ]------------------------------------------
#
'L_POSTS' => $lang['Posts'],
#
#-----[ ALTINA EKLE ]------------------------------------------
#
'ICON_URL' => $images['icon_latest_reply'],
'ICON_ALT' => $lang['View_latest_post'],
'L_AUTHOR' => $lang['Author'],
#
#-----[ AÇ ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ BUL ]------------------------------------------
#
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>
#
#-----[ ALTINA EKLE ]------------------------------------------
#
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th align="center" class="thCornerL" width="20%"> {L_FORUM} </th>
<th align="center" class="thTop" width="40%"> {L_TOPICS} </th>
<th align="center" class="thTop" nowrap> {L_AUTHOR} </th>
<th align="center" class="thTop" nowrap> {L_REPLIES} </th>
<th align="center" class="thTop" nowrap> {L_VIEWS} </th>
<th align="center" class="thCornerR" nowrap> {L_LASTPOST} </th>
</tr>
<!-- BEGIN toprow -->
<tr>
<td class="row1" nowrap><span class="forumlink"><a href="{toprow.FORUM_URL}" target="_top" class="forumlink">{toprow.FORUM_NAME}</a></span></td>
<td class="row2" nowrap><span class="topictitle"><a href="{toprow.TOPIC_URL}" target="_top" class="topictitle">{toprow.TOPIC}</a></span></td>
<td class="row1" align="center" nowrap><span class="name">{toprow.POSTER_URL}</span></td>
<td class="row2" align="center" nowrap><span class="postdetails">{toprow.TOPIC_REPLIES}</span></td>
<td class="row1" align="center" nowrap><span class="postdetails">{toprow.TOPIC_VIEWS}</span></td>
<td class="row2" align="center" nowrap><span class="postdetails">{toprow.POST_TIME}<br />{toprow.REPLIER_URL} <a href="{toprow.LAST_POST_URL}" target="_top"><img src="{ICON_URL}" border="0" alt="{ICON_ALT}" /></a></span></td>
</tr>
<!-- END toprow -->
</table>
</td>
</tr>
</table>
#
#-----[ TÜM DOSYALARI KAYDET/KAPAT ]------------------------------------------
#
# SoN
http://www.phpbb2.de adresinden phpBBplus'ı yükleyebilirsiniz.
Evet, bu modu yüklerseniz başlıkların altına kolay cevap paneli yapabilirsiniz.
http://www.phpbbhacks.com/download/586

saol bayadır calışan hızlı cevap arıyodum sen söyledin calışti abi acayip işime yaradı saoltaNGo yazdı:Evet, bu modu yüklerseniz başlıkların altına kolay cevap paneli yapabilirsiniz.
http://www.phpbbhacks.com/download/586
Forum Ana Sayfa için:
Kod:
##############################################################
## MOD Title: Integrated Toplist
## MOD Author: buweichiu < mods@xpoo.net > (Buwei Chiu) http://bws.xpoo.net
## MOD Description: This will add Toplist on the index for those style that's hard to use OOHOO's ADV-TOP5.
## MOD Version: 1.0.3
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit:
## forums.html
## templates/subSilver/index_body.tpl
##
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod is based on OOHOO's ADV-TOP5 2.1.0
##
##############################################################
## MOD History:
##
## 2005-01-11 - Version 1.0.0
## - inititla release
## 2005-01-12 - Version 1.0.1
## - fix some message_die problem.
## 2005-01-16 - Version 1.0.2
## - fix some Var. problem.
## 2005-01-19 - Version 1.0.3
## - fix for PHP3 compatibility
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ AÇ ]------------------------------------------
#
forums.html
tango forum ana sayfada olan forums.html yi bulamadım yoq galiba bende şimdi napcam
Kod:
##############################################################
## MOD Title: Integrated Toplist
## MOD Author: buweichiu < mods@xpoo.net > (Buwei Chiu) http://bws.xpoo.net
## MOD Description: This will add Toplist on the index for those style that's hard to use OOHOO's ADV-TOP5.
## MOD Version: 1.0.3
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit:
## forums.html
## templates/subSilver/index_body.tpl
##
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod is based on OOHOO's ADV-TOP5 2.1.0
##
##############################################################
## MOD History:
##
## 2005-01-11 - Version 1.0.0
## - inititla release
## 2005-01-12 - Version 1.0.1
## - fix some message_die problem.
## 2005-01-16 - Version 1.0.2
## - fix some Var. problem.
## 2005-01-19 - Version 1.0.3
## - fix for PHP3 compatibility
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ AÇ ]------------------------------------------
#
forums.html
tango forum ana sayfada olan forums.html yi bulamadım yoq galiba bende şimdi napcam
Kimler çevrimiçi
Bu forumu görüntüleyen kullanıcılar: Google [Bot] ve 1 misafir