Son 5 mesajlar,en çok okunan konular modu yardım

phpBB 2.0.x sürümleri için MODlar hakkında ihtiyacınız olan desteği buradan sorarak alabilirsiniz.
acemi_77
Kayıtlı Kullanıcı
Mesajlar: 111
Kayıt: 15.12.2006, 18:09
İletişim:

Son 5 mesajlar,en çok okunan konular modu yardım

Mesaj gönderen acemi_77 »

Kod: Tümünü seç

######################################################## 
## Mod İsmi:    The last Five and the Five popular (answers/views) on index.php 
## Mod Versiyonu:  1.1.0 
## Yapımcısı:       Andrey Politov aka Sergeant < andypolv@mail.ru > 
##   Hack Updated to phpBB 2.0.11 Compatibility by: Thoul <thoul@users.sourceforge.net> 
##   Hack Updated based on code created by FB-ke 
## Description:  Adds small table (3 columns) on the top of the forum index 
##               with 5 last posts, 5 popular (with maximum answers) and 5 
##               popular (with maximum views). It helps to provide easy access 
##               to the last topics and keep on the top interesting topics. 
## 
## Installation Level:  Easy 
## Installation Time:   5 Minutes 
## Files To Edit:       3 (4 if you have Russian language installed) 
##                      index.php 
##                      templates/subSilver/index_body.tpl 
##                      language/lang_english/lang_main.php 
##                      language/lang_russian/lang_main.php 
## 
## Included Files:      none 
## 
######################################################## 
## 
## Installation Notes: 
## 
## Follow the steps below. 
## 
######################################################## 


# 
#-----[ AÇ ]------------------------------------------ 
# 
index.php 

# 
#-----[ BUL ]------------------------------------------ 
# 

   // 
   // Okay, let's build the index 
   // 
   for($i = 0; $i < $total_categories; $i++) 
   { 
      $cat_id = $category_rows[$i]['cat_id']; 


# 
#-----[ ÖNCESİNE EKLE ]------------------------------------------ 
# 

//------------------------------------------------------------------------ 
// Top Topics on Index 1.1.0 - Kod başlıyor 
// 
   // Get forum auth information to insure privacy of hidden topics 
   $topics_auth = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata); 
   $topics_auth_sql = ''; 
   foreach($topics_auth as $k=>$v) 
   { 
      if( $v['auth_view'] && $v['auth_read'] ) 
      { 
         $topics_auth_sql .= (( empty($topics_auth_sql) ) ? '': ', ') . $k; 
      } 
   } 
   // 
   // Okay, let's build the topic recent and popular 
   // 
   $active_topics_sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_last_post_id 
      FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE. ' f 
      WHERE t.forum_id IN (' . $topics_auth_sql . ') 
         AND f.forum_id = t.forum_id 
      ORDER BY %1$s DESC 
      LIMIT 0,5'; 
   $active_topics_sql_a = sprintf($active_topics_sql, 'topic_last_post_id'); 
   $active_topics_sql_b = sprintf($active_topics_sql, 'topic_replies'); 
   $active_topics_sql_c = sprintf($active_topics_sql, 'topic_views'); 
   $recent_row = $popular_row = $viewed_row = array(); 

   if( !$active_topics_a = $db->sql_query($active_topics_sql_a)) 
   { 
      message_die(GENERAL_ERROR, 'Could not retrieve recent topics', '', __LINE__, __FILE__, $active_topics_sql_a); 
   } 
   $recent_row = $db->sql_fetchrowset($active_topics_a); 
   $db->sql_freeresult($active_topics_a); 

   if( !$active_topics_b = $db->sql_query($active_topics_sql_b)) 
   { 
      message_die(GENERAL_ERROR, 'Could not retrieve popular topics', '', __LINE__, __FILE__, $active_topics_sql_b); 
   } 
   $popular_row = $db->sql_fetchrowset($active_topics_b); 
   $db->sql_freeresult($active_topics_b); 

   if( !$active_topics_c = $db->sql_query($active_topics_sql_c)) 
   { 
      message_die(GENERAL_ERROR, 'Could not retrieve most viewed topics', '', __LINE__, __FILE__, $active_topics_sql_c); 
   } 
   $viewed_row = $db->sql_fetchrowset($active_topics_c); 
   $db->sql_freeresult($active_topics_c); 

   $template->assign_vars(array( 
      'L_TOPICSRECENT' => $lang['TopicsRecent'], 
      'L_TOPICSPOPULAR' => $lang['TopicsPopular'], 
      'L_TOPICSPOPULARVIEW' => $lang['TopicsPopularView']) 
   ); 

   for( $i = 0; $i < 5; $i++ ) 
   { 
      $recent_topic_title = $recent_row[$i]['topic_title']; 
      $popular_topic_title = $popular_row[$i]['topic_title']; 
      $viewed_topic_title = $viewed_row[$i]['topic_title']; 

      if( strlen($recent_topic_title) > 40 ) 
      { 
         $recent_topic_title = substr($recent_topic_title, 0, 40) . '...'; 
      } 

      if( strlen($popular_topic_title) > 40 ) 
      { 
         $popular_topic_title = substr($popular_topic_title, 0, 40) . '...'; 
      } 

      if( strlen($viewed_topic_title) > 40 ) 
      { 
         $viewed_topic_title = substr($viewed_topic_title, 0, 40) . '...'; 
      } 

      $recent_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id'] . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>'; 
      $popular_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id'] . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>'; 
      $popular_total_replies = $popular_row[$i]['topic_replies']; 
      $viewed_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id'] . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>'; 
      $viewed_total_replies = $viewed_row[$i]['topic_views']; 

      $template->assign_block_vars('topicrecentpopular', array( 
         'TOPICSPOPULAR' => $popular_post, 
         'TOPICSPOPULARC' => $popular_total_replies, 
         'TOPICSPOPULARVIEW' => $viewed_post, 
         'TOPICSPOPULARVIEWC' => $viewed_total_replies, 
         'TOPICSRECENT' => $recent_post) 
      ); 
   } 
// 
// Top Topics on Index 1.1.0 - Kod tamamlandı 
//------------------------------------------------------------------------ 

# 
#-----[ AÇ ]------------------------------------------ 
# 
(Not hangi temayı kullanıyorsanız o temaya ait TPL dosyalarını açacaksınız.) 

templates/subSilver/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">&nbsp;{L_FORUM}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th> 
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th> 
  </tr> 
  <!-- BEGIN catrow --> 

# 
#-----[ ÖNCESİNE EKLE ]------------------------------------------ 
# 

<!-- Top Topics on Index 1.1.0 - Begin Code Addition --> 
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> 
  <tr> 
   <th width="25%" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICSRECENT}&nbsp;</th> 
   <th width="38%" colspan="2" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICSPOPULAR}&nbsp;</th> 
   <th width="37%" colspan="2" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICSPOPULARVIEW}&nbsp;</th> 
  </tr> 
  <!-- BEGIN topicrecentpopular --> 
  <tr> 
   <td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSRECENT}</span></td> 
   <td width="31%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td> 
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td> 
   <td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td> 
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td> 
  </tr> 
  <!-- END topicrecentpopular --> 
</table> 
<!-- Top Topics on Index 1.1.0 - End Code Addition --> 


# 
#-----[ AÇ ]------------------------------------------ 
# 
(Not; tabii biz burada türkçe dil paketimizin içine giriyoruz) 

language/lang_english/lang_main.php 


# 
#-----[ BUL ]------------------------------------------ 
# 

// 
// That's all, Folks! 
// ------------------------------------------------- 


# 
#-----[ ÖNCESİNE EKLE ]------------------------------------------ 
# 

//------------------------------------------------------------------------ 
// Top Topics on Index 1.1.0 - Begin Code Addition 
// 
$lang['TopicsRecent'] = "Recent Topics"; 
$lang['TopicsPopular'] = "Popular Topics (by reply)"; 
$lang['TopicsPopularView'] = "Popular Topics (by view)"; 
// 
// Top Topics on Index 1.1.0 - End Code Addition 
//------------------------------------------------------------------------ 


# 
#-----[ TÜM DOSYALARDAKİ DEĞŞİKLİKLERİ KAYDET VE DOSYALARI KAPAT - MOD KURULUMU TAMAMLANMIŞTIR]------------------------------------------ 
#
Bu modu kurduğumuz zaman ingilizce olarak gözüküyor
nasıl türkçeye çevirilir çevirebilecek biri varmı?
Teşekkürler
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

Kod: Tümünü seç

# 
#-----[ AÇ ]------------------------------------------ 
# 
(Not; tabii biz burada türkçe dil paketimizin içine giriyoruz) 

language/lang_english/lang_main.php 


# 
#-----[ BUL ]------------------------------------------ 
# 

// 
// That's all, Folks! 
// ------------------------------------------------- 


# 
#-----[ ÖNCESİNE EKLE ]------------------------------------------ 
# 

//------------------------------------------------------------------------ 
// Top Topics on Index 1.1.0 - Begin Code Addition 
// 
$lang['TopicsRecent'] = "Son Konular"; 
$lang['TopicsPopular'] = "Popüler Konular (cevaplanmaya göre)"; 
$lang['TopicsPopularView'] = "Popüler konular (görülmeye göre)"; 
// 
// Top Topics on Index 1.1.0 - End Code Addition 
//------------------------------------------------------------------------ 


# 
#-----[ TÜM DOSYALARDAKİ DEĞŞİKLİKLERİ KAYDET VE DOSYALARI KAPAT - MOD KURULUMU TAMAMLANMIŞTIR]------------------------------------------
acemi_77
Kayıtlı Kullanıcı
Mesajlar: 111
Kayıt: 15.12.2006, 18:09
İletişim:

Mesaj gönderen acemi_77 »

Teşekkürler Pikachu
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

orda
popüler konular (görülmeye göre) yazıyor onu görüntülemeye göre yap daha iyi bi anlatım olur.
BLooD
Uzaklaştırıldı
Mesajlar: 409
Kayıt: 15.11.2006, 19:36
Konum: Manisa
İletişim:

Mesaj gönderen BLooD »

şu modun ön görünümünü gösterirmisin bana arkadaşım ? :roll: aradığım şey gibi bişi bu :) ondan kussura bakma zahmet olacak ama :cry: :roll:
İmza, kurallara aykırı olduğu için site yönetimi tarafından değiştirildi.
acemi_77
Kayıtlı Kullanıcı
Mesajlar: 111
Kayıt: 15.12.2006, 18:09
İletişim:

Mesaj gönderen acemi_77 »

BLooD yazdı:şu modun ön görünümünü gösterirmisin bana arkadaşım ? :roll: aradığım şey gibi bişi bu :) ondan kussura bakma zahmet olacak ama :cry: :roll:
http://www.gs1905.kayyo.com/index.php
burdan önizlemesine bakabilirsin
BLooD
Uzaklaştırıldı
Mesajlar: 409
Kayıt: 15.11.2006, 19:36
Konum: Manisa
İletişim:

Mesaj gönderen BLooD »

şey bu modu paylaşma ihtimalin var mı kardeş :roll: :cry:
İmza, kurallara aykırı olduğu için site yönetimi tarafından değiştirildi.
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

mod yukarıda yazıyor ya zaten.
BLooD
Uzaklaştırıldı
Mesajlar: 409
Kayıt: 15.11.2006, 19:36
Konum: Manisa
İletişim:

Mesaj gönderen BLooD »

pikachu yazdı:mod yukarıda yazıyor ya zaten.
SQL'u yok ki :S site açılmıyor :S :cry:
İmza, kurallara aykırı olduğu için site yönetimi tarafından değiştirildi.
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

sensitene indexbody.tpl dosyasını atmamışsın galiba.
BLooD
Uzaklaştırıldı
Mesajlar: 409
Kayıt: 15.11.2006, 19:36
Konum: Manisa
İletişim:

Mesaj gönderen BLooD »

pikachu yazdı:sensitene indexbody.tpl dosyasını atmamışsın galiba.
ne biliyim öle yazıodu öle yaptım :D yanlışmı yapmışım :roll:
İmza, kurallara aykırı olduğu için site yönetimi tarafından değiştirildi.
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

eğer düzenleyip geri yolladıysanöle bir sorun olmazdı sanırsam.
asi_romser
Kayıtlı Kullanıcı
Mesajlar: 67
Kayıt: 20.04.2006, 18:49
İletişim:

Hataa

Mesaj gönderen asi_romser »

Forumun İndek Sayfasında Hata Var Kardeş Biliyosun Ki Bir Boşluk bile Modu Bozabiliyor Sen Bu Modu Buraya Ekleme İStersen Nerden İndirdiysen Adresi ver biz indirelim Verdiği Hata Şu...



Genel Hata

Could not retrieve recent topics

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 f.forum_id = t.forum_id ORDER BY topic_l

SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_last_post_id FROM phpbb_topics t, phpbb_forums f WHERE t.forum_id IN () AND f.forum_id = t.forum_id ORDER BY topic_last_post_id DESC LIMIT 0,5

Line : 455
File : index.php



İndex.php ye 10 kere baktım bi hata yok verdiği line dada hiç bi hata yok modu kaldırıyorum site düzeliyor baştan yüklüyorum Hata...
asi_romser
Kayıtlı Kullanıcı
Mesajlar: 67
Kayıt: 20.04.2006, 18:49
İletişim:

Re: Hataa

Mesaj gönderen asi_romser »

asi_romser yazdı:Forumun İndek Sayfasında Hata Var Kardeş Biliyosun Ki Bir Boşluk bile Modu Bozabiliyor Sen Bu Modu Buraya Ekleme İStersen Nerden İndirdiysen Adresi ver biz indirelim Verdiği Hata Şu...



Genel Hata

Could not retrieve recent topics

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 f.forum_id = t.forum_id ORDER BY topic_l

SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_last_post_id FROM phpbb_topics t, phpbb_forums f WHERE t.forum_id IN () AND f.forum_id = t.forum_id ORDER BY topic_last_post_id DESC LIMIT 0,5

Line : 455
File : index.php



İndex.php ye 10 kere baktım bi hata yok verdiği line dada hiç bi hata yok modu kaldırıyorum site düzeliyor baştan yüklüyorum Hata...

Arkadaşlar Yabancı Bi siteden Buldum Gerçeğini Yaptım Çalıştı O kodda Hata Var...
acemi_77
Kayıtlı Kullanıcı
Mesajlar: 111
Kayıt: 15.12.2006, 18:09
İletişim:

Re: Hataa

Mesaj gönderen acemi_77 »

asi_romser yazdı:
asi_romser yazdı:Forumun İndek Sayfasında Hata Var Kardeş Biliyosun Ki Bir Boşluk bile Modu Bozabiliyor Sen Bu Modu Buraya Ekleme İStersen Nerden İndirdiysen Adresi ver biz indirelim Verdiği Hata Şu...



Genel Hata

Could not retrieve recent topics

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 f.forum_id = t.forum_id ORDER BY topic_l

SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_last_post_id FROM phpbb_topics t, phpbb_forums f WHERE t.forum_id IN () AND f.forum_id = t.forum_id ORDER BY topic_last_post_id DESC LIMIT 0,5

Line : 455
File : index.php



İndex.php ye 10 kere baktım bi hata yok verdiği line dada hiç bi hata yok modu kaldırıyorum site düzeliyor baştan yüklüyorum Hata...

Arkadaşlar Yabancı Bi siteden Buldum Gerçeğini Yaptım Çalıştı O kodda Hata Var...
Dostum kodda hata olduğunu zannetmiyorum
çünkü ben o kodu denedim oluyor
Kilitli

“2.0.x MOD Destek” sayfasına dön

Kimler çevrimiçi

Bu forumu görüntüleyen kullanıcılar: Hiç bir kayıtlı kullanıcı yok ve 4 misafir