
bilen arkadaşlardan rica ederim bi göz atarlarsa çok sevinirim
###########################################################
## MOD Ismi: Konu Istatistikleri
## MOD Sürümü: v1.0.1
## MOD Açiklamasi: Forum Ana Sayfasinda, En Son Gönderilenler, En Çok Cevaplananlar,
## En Çok Görüntülenenler, seklinde Konu Istatistikleri. Ayrica En Son
## Gönderilenler kayan sekilde olup, bu bölümünde sadece sizin
## belirleyeceginiz özel forumlardan mesajlar gösterebilirsiniz.
## Ihtiyaç duyulmadiginda bu özellik kapatilabilir. Eklentiye bakiniz.
##
## Kurulum Seviyesi: Kolay
## Kurulum Süresi: 2 Dakika
##
## Degisecek Dosyalar: 2
## index.php
## templates/senin_tema/index_body.tpl
##
## Eklenecek Dosyalar: 3
## images/arrow1.gif
## images/arrow2.gif
## images/arrow3.gif
##
##############################################################
##
## Yazar Notlari: Bu benim üçüncü modum![]()
##
## Bu Mod phpBB sürümü 2.0.20 üzerinde test edilmistir.
##
##############################################################
##
## 25-05-2006 - Sürüm 1.0.1
## - En Son Gönderilenler bölümünde yazar olarak, basligi yazan kisi
## yerine, en son mesaji yazan kisinin gösterilmesi ayarlandi.
##
## 25-12-2005 - Sürüm 1.0.0
## - Ilk Sürüm
##
###############################################################################
## Destek: türkphpbb < admin@********** > http://www.**********
###############################################################################
## Bu MODu kurmadan önce, degisecek tüm dosyalarin yedegini almaniz tavsiye edilir.
###############################################################################
#
#-----[ KOPYALA ]-----------------------------------------------------
#
images/arrow.gif <-----> images/arrow1.gif
images/arrow.gif <-----> images/arrow2.gif
images/arrow.gif <-----> images/arrow3.gif
#
#-----[ AÇ ]-----------------------------------------------------
#
index.php
#
#-----[ BUL ]-----------------------------------------------------
#
{
$l_total_user_s = $lang['Registered_users_total'];
}
#
#-----[ SONRASINA EKLE ]--------------------------------
# büyük parantezden sonra ekle
# Not: forum_ids (forum numaralari), sadece special_forums (özel forumlar)
# ayarini 1 yaparak aktif hale getirirseniz gereklidir. Buraya konularinin
# görüntülenmesini istediginiz forumlarin numaralarini virgülle ayirarak yaziniz.
#
//
// Son Konular
//
// ############ Ayarlar #########################
$CFG['title_limit'] = '35'; // Karakter limiti, ihtiyaca göre degistir
$topic_limit = '10'; // Görüntülenecek mesajlarin sayisi
$special_forums = '0'; // özel forumlar ('0' = hayir; '1' = evet)
$forum_ids = '1,2'; // özel forum numaralari, tek tek virgülle ayirin
// ############ Ayarlar Son #########################
$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);
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata);
$except_forums = '\'start\'';
for( $f = 0; $f < count($forums); $f++ )
{
if( (!$is_auth_ary[$forums[$f]['forum_id']]['auth_read']) || (!$is_auth_ary[$forums[$f]['forum_id']]['auth_view']) )
{
if( $except_forums == '\'start\'' )
{
$except_forums = $forums[$f]['forum_id'];
}
else
{
$except_forums .= ','. $forums[$f]['forum_id'];
}
}
}
$where_forums = ( $special_forums == '0' ) ? 't.forum_id NOT IN ('. $except_forums .')' : 't.forum_id NOT IN ('. $except_forums .') AND t.forum_id IN ('. $forum_ids .')';
$sql = "SELECT t.*, f.forum_id, u.user_id, u.username, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time, pt.*
FROM ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u, ". POSTS_TABLE ." p, ". POSTS_TABLE ." p2, ". USERS_TABLE ." u2, ". POSTS_TEXT_TABLE ." pt
WHERE $where_forums AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id AND t.topic_last_post_id = pt.post_id
ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
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;
}
$list_i = 1;
for ($i = 0; $i < $number_recent_topics; $i++)
{
if (strlen($recent_topic_row[$i]['topic_title']) > $CFG['title_limit'])
{
$short_title = substr($recent_topic_row[$i]['topic_title'], 0, $CFG['title_limit'])."...";
}
else
{
$short_title = $recent_topic_row[$i]['topic_title'];
}
$template->assign_block_vars('recent_topic_row', array(
'NUMBER_LATEST' => $list_i,
'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_SHORT_TITLE' => $short_title,
'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
'S_POSTER' => $recent_topic_row[$i]['last_poster'],
'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
$list_i++;
}
//
// SON - Son Konular
//
#
#-----[ BUL ]-----------------------------------------------------
#
//
// Generate the page
//
#
#-----[ ÖNCESINE EKLE ]--------------------------------
# LIMIT 5 = Bu deger gösterilecek konularin adetini belirler (toplam 3 defa).
#
# Baslikta karakter uzunlugunu belirlemek için, asagidaki bölümlerde 6 defa
# bulabileceginiz 32 olan degeri azaltarak veya çogaltarak ayarlayabilirsiniz.
#
# Forumlarinizin "Görüntüleme" ve "Okuma" ayarlarini "Kullanici" olarak seçtiginiz
# zaman, asagidaki kodlarda 3 defa "d.auth_view=0" bulup, bunlardaki "0" olan
# degeri "1" olarak degistirmelisiniz. Aksi takdirde forumunuzda görüntü alamazsiniz.
#
// Let's add some more code, this will be fun.
$active_topics_sql="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_last_post_id DESC
LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);
$active_topics_sql2="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_replies DESC
LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);
$active_topics_sql3="SELECT a.topic_id,a.topic_title, a.topic_views, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_views DESC
LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);
while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
{
if (strlen($line['topic_title']) > 32)
{
$line_topic_title = substr($line['topic_title'], 0, 32)." ...";
}
else
{
$line_topic_title = $line['topic_title'];
}
if (strlen($line2['topic_title']) > 32)
{
$line_topic_title2 = substr($line2['topic_title'], 0, 32)." ...";
}
else
{
$line_topic_title2 = $line2['topic_title'];
}
if (strlen($line3['topic_title']) > 32)
{
$line_topic_title3 = substr($line3['topic_title'], 0, 32)." ...";
}
else
{
$line_topic_title3 = $line3['topic_title'];
}
$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
$poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
$poppostc = $line2['topic_replies'];
$popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
$popviewpostc = $line3['topic_views'];
$template->assign_block_vars('topicrecentpopular', array(
'TOPICSPOPULAR' => $poppost,
'TOPICSPOPULARC' => $poppostc,
'TOPICSPOPULARVIEW' => $popviewpost,
'TOPICSPOPULARVIEWC' => $popviewpostc,
'TOPICSRECENT' => $lastpost)
);
}
// You added more pointless code, go you!
#
#-----[ AÇ ]-----------------------------------------------------
#
templates/senin_tema/index_body.tpl
#
#-----[ BUL ]-----------------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
#
#-----[ ÖNCESINE EKLE ]--------------------------------
#
<!-- Konu Istatistikleri -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline">
<tr>
<th colspan="4" class="thHead" height="25" align="center"><align="center" valign="top"><b>Konu İstatistikleri</b></th>
</tr>
<!-- / Konu Istatistikleri -->
<!-- Son Konular -->
<tr>
<td width="34%">
<table width="100%" cellpadding="1" cellspacing="1" border="0" class="bodyline">
<tr>
<td colspan="2" class="catHead" align="center" height="25"><span class="gen"><b>En Son Gönderilenler</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="up" height="72" scrolldelay="100" scrollamount="2">
<!-- BEGIN recent_topic_row -->
<img src="images/arrow1.gif" border"0" width="9" height="9"> Konu: <b>{recent_topic_row.NUMBER_LATEST}.</b> <a href="{recent_topic_row.U_TITLE}" title="{recent_topic_row.L_TITLE}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()"><b>{recent_topic_row.L_SHORT_TITLE}</b></a><br />
<img src="images/arrow2.gif" border"0" width="9" height="9"> Yazan: <a href="{recent_topic_row.U_POSTER}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()"><b>{recent_topic_row.S_POSTER}</b></a><br />
<img src="images/arrow3.gif" border"0" width="9" height="9"> Tarih: <b>{recent_topic_row.S_POSTTIME}</b></span><br /><hr />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<!-- / Son Konular -->
<td width="34%">
<!-- En Çok Cevaplananlar -->
<table width="100%" cellpadding="1" cellspacing="1" border="0" class="bodyline">
<tr>
<td colspan="2" class="cathead" align="center" height="25"><span class="gen"><b>En Çok Cevaplananlar</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="31%" class="row1" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
<td width="6%" class="row1" align="center" valign="middle"><span class="gensmall"><b>{topicrecentpopular.TOPICSPOPULARC}</b></span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<!-- / En Çok Cevaplananlar -->
<td width="34%">
<!-- En Çok Görüntülenenler -->
<table width="100%" cellpadding="1" cellspacing="1" border="0" class="bodyline">
<tr>
<td colspan="2" class="cathead" align="center" height="25"><span class="gen"><b>En Çok Görüntülenenler</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="31%" class="row1" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
<td width="6%" class="row1" align="center" valign="middle"><span class="gensmall"><b>{topicrecentpopular.TOPICSPOPULARVIEWC}</b></span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
</td>
</tr>
</table>
<!-- / En Çok Görüntülenenler -->
<br />
#
#-----[ TÜM DOSYALARI KAPAT/KAYDET ]------------------------------------------
#
#SoN
bu kısmı almazsam forum açılmıyo hata veriyo hata bu$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
Could not query forums information
DEBUG MODE
SELECT * FROM phpbb_config
Line : 122
File : index.php
eger bu kısmı da alırsam{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
bu hatayı veriyor...Could not query recent topics information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.t' at line 3
SELECT t.*, f.forum_id, u.user_id, u.username, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time, pt.* FROM phpbb_topics t, phpbb_forums f, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2, phpbb_posts_text pt WHERE t.forum_id NOT IN ('start') AND t.forum_id IN () AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id AND t.topic_last_post_id = pt.post_id ORDER BY t.topic_last_post_id DESC LIMIT
Line : 160
File : index.php
forum şu an çalışmıyor