onay bekleyen mesajları son 10 sonulardan gizlemek.

Eklentiler ile ilgili soru, sorun ve tartışmalar.

onay bekleyen mesajları son 10 sonulardan gizlemek.

İleti wdp 10.11.2006, 18:49

merhaba.
sitemizde başlık onaylama modunu (phpBB2_Approve_Mod.1.0.10) kullnıyoruz... normalde onay bekleyen başlıkları forum başlıkları bölümünde görünmez yapabiliyoruz fakat son 10 konular listesinde başlıklar görünür oluyor...

onay bekleyen başlıkların son 10 konularda görünmemesini nasıl yapabiliriz?

kullndığımız approve mod için : http://www.phpbb.com/phpBB/viewtopic.ph ... sc&start=0
son 10 konular modumuz : ( alexis in hazırladığı )


Kod: Tümünü seç
######################################################################################
## MOD Adı   : Son Konular (gösterim ve cevap sayılı)
## Sürüm     : 1.0.0b   (phpbb)
## Yazar     : phpBB Türkiye  (ALEXIS)  < phpbb@canver.net >  www.canver.net
## Orj. Kod  : Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
##
## Açıklama  : ezportal "son konular" (recent topic) mod'unun modifiyesidir, karakter
##             limiti, gösterim ve cevap sayısı eklendi, yazar çıkarıldı.
##
## Kurulum zorluğu : kolay
## Kurulum süresi  : ~2 dk.
##
## Düzenlenen dosyalar (3) : includes/page_header.php
##                           language/lang_turkish/lang_main.php
##                           templates/subSilver/index_body.tpl
##
######################################################################################
##
## Destek      : http://www.canver.net
## Telif Hakkı : Copyleft ©2005 - Canver Networks
##
## Bu MOD GPL Lisansı altında paylaşıma sunulmuştur.
##
######################################################################################
## Yazar Notları:
##
##
##   Karakter Limiti
##   ---------------
##    $CFG['title_limit'] = '20';  ifadesindeki sayı karakter uzunluğunu ifade eder
##                                 ihtiyacınıza göre değiştirebilirsiniz.
##
## 
## "Smartor'un Recent Topics Block for Smartor's ezPortal" modundan geliştirilmiştir.
##                     Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
##
######################################################################################
## Mod Geçmişi:
##
##   15.06.2005|23.30 // v1.0.0b   (İlk kullanıcı sürümü)
##      - Deneme amaçlı ilk sürüm
##
######################################################################################
##
## Bu modu eklemeden önce lütfen dosyaların yedeğini alınız.
##
######################################################################################
#
#
##----[ AÇ ]--------------------------------------------------------------------------
#
#
includes/page_header.php

#
#-----[ BUL ]-------------------------------------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);

#
#-----[ ÖNCESİNE EKLE ]---------------------------------------------------------------
#
//
// Recent Topics
//

// Number of Recent Topics (not Forum ID)
$CFG['number_recent_topics'] = '20';

// 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'] = '';

// Son konular için karakter limiti
$CFG['title_limit'] = '50'; // Değeri ihtiyacınıza göre değiştirin


// sorgulamalar
$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);
}
$forums_data = array();
while( $row = $db->sql_fetchrow($result) )
{
   $forums_data[] = $row;
}

$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forums_data);

if( $CFG['exceptional_forums'] == '' )
{
   $except_forum_id = '\'start\'';
}
else
{
   $except_forum_id = $CFG['exceptional_forums'];
}

for ($i = 0; $i < count($forums_data); $i++)
{
   if ((!$is_auth_ary[$forums_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forums_data[$i]['forum_id']]['auth_view']))
   {
      if ($except_forum_id == '\'start\'')
      {
         $except_forum_id = $forums_data[$i]['forum_id'];
      }
      else
      {
         $except_forum_id .= ',' . $forums_data[$i]['forum_id'];
      }
   }
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_views, t.topic_replies, p.post_id, p.poster_id, p.post_time
      FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p
      WHERE t.forum_id NOT IN (" . $except_forum_id . ")
         AND t.topic_status <> 2
         AND p.post_id = t.topic_last_post_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++)
{
       // karakter limiti
   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(
      '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,

        'L_VIEW'    => $recent_topic_row[$i]['topic_views'] .' '. $lang['Views'],
        'L_REPLIES' => $recent_topic_row[$i]['topic_replies'] .' '. $lang['Replies'],

      'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
      )
   );
}
//
// END - Recent Topics
//

#
#-----[ BUL ]-------------------------------------------------------------------------
#
   'PRIVMSG_IMG' => $icon_pm,

#
#-----[ SONRASINA EKLE ]--------------------------------------------------------------
#
   // Recent Topics
   'L_RECENT_TOPICS' => $lang['Recent_topics'],

#
##----[ AÇ ]--------------------------------------------------------------------------
#
language/lang_turkish/lang_main.php

#
#-----[ BUL ]-------------------------------------------------------------------------
#
?>

#
#-----[ ÖNCESİNE EKLE ]---------------------------------------------------------------
#
// Recent Topics
$lang['Recent_topics'] = 'Son Konular';

#
##----[ AÇ ]--------------------------------------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ EN SONA EKLE ]----------------------------------------------------------------
#
# Bu kodları phpbb panonuzun istediğiniz sayfasına ve istediğiniz yerine ekleyebilirsiniz.
#
<br />
<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 -->
&raquo; <a href="{recent_topic_row.U_TITLE}" title="{recent_topic_row.L_TITLE}"><b>{recent_topic_row.L_SHORT_TITLE}</b></a>
<br />
&nbsp; &nbsp;
<span title="{recent_topic_row.S_POSTTIME}">{recent_topic_row.L_VIEW}, {recent_topic_row.L_REPLIES}</span><br />
<!-- END recent_topic_row -->
</span>
</td>
</tr>
</table>
    
<br />

#
#-----[ TÜM DOSYALARI KAYDET/KAPAT ]--------------------------------------------------
#
# SON

wdp
Üye
Üye
 
İleti: 157
Kayıt: 10.11.2005, 13:15

İleti

ALEXIS
10.11.2006, 19:35

$sql = "SELECT * FROM ". FORUMS_TABLE . " WHERE post_level <> 0 ORDER BY forum_id";


topic tablosunda tutuluyorsa onaylı/onaysız, böyle bir şey yap işte. Aşağıdakini tamamen uydurdum

WHERE post_level <> 0
Kullanıcı avatarı
ALEXIS
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08


Soru(n)lar & Tartışmalar



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron