проблема с модом 5tp

Поддержка старых модов или модов, созданных авторами не из нашего сообщества, а также любые вопросы, связанные с модами для phpBB 2.0.x, кроме относящихся к форуму Для авторов (phpBB 2.0.x).

проблема с модом 5tp

Сообщение OGS 26.10.2004 5:40

Народ! Ктонить пользовал мод 5tp Пять популярных тем. У меня проблемка нарисовалась. В трех колонках нет их названий. Чего делать?
Вот весь мод. Может ошибочка где?

Код: Выделить всё
#
#-----[ FIND IN index.php ]-----------------------------------------
#
   //
   // Okay, let's build the index
   //
   for($i = 0; $i < $total_categories; $i++)
   {
      $cat_id = $category_rows[$i]['cat_id'];

#
#-----[ ADD BEFORE ]------------------------------
#
   //
   // Okay, let's build the topic recent and popular
   //
$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']) > 40)
      {
         $line_topic_title = substr($line['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title = $line['topic_title'];
      }
      if (strlen($line2['topic_title']) > 40)
      {
         $line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title2 = $line2['topic_title'];
      }
      if (strlen($line3['topic_title']) > 40)
      {
         $line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
      }
      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)
      );
   }


#
#-----[ SAVE & CLOSE index.php ]------------------------------
#

#
#-----[ FIND IN templates/subSilver/index_body.tpl ]------------------------------
#
<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 -->

#
#-----[ ADD BEFORE ]------------------------------
#
<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>

&nbsp;

#
#-----[ SAVE & CLOSE templates/subSilver/index_body.tpl ]------------------------------
#

#
#-----[ FIND IN language/lang_english/lang_main.php ]------------------------------
#
$lang['Topics'] = 'Topics';

#
#-----[ ADD AFTER ]------------------------------
#
$lang['TopicsRecent'] = "Recent Topics";
$lang['TopicsPopular'] = "Popular Topics (by reply)";
$lang['TopicsPopularView'] = "Popular Topics (by view)";

#
#-----[ SAVE & CLOSE language/lang_english/lang_main.php ]------------------------------
#

#
#-----[ FIND IN language/lang_russian/lang_main.php ]------------------------------
#
$lang['Topics'] = 'Темы';

#
#-----[ ADD AFTER ]------------------------------
#
$lang['TopicsRecent'] = "Последние темы";
$lang['TopicsPopular'] = "Популярные темы (по ответам)";
$lang['TopicsPopularView'] = "Популярные темы (по просмотрам)";

#
#-----[ SAVE & CLOSE language/lang_russian/lang_main.php ]------------------------------
#

#
#-----[ DONE ]------------------------------
#
OGS
phpBB 1.0.0
 
Сообщения: 9
Зарегистрирован: 19.10.2004 16:55


Сообщение Xpert 26.10.2004 7:57

Да, ошибка есть и она в этом моде не одна, тут весь мод - одна сплошная ошибка, отступления от правил тут и там, полное несоответствие обязательным условиям для модов. Ставить не советую, из почти аналогов можете попробовать мод Glance.

Где скачали такое чудо?
Эксперт - это человек, который избегает мелких ошибок на пути к грандиозному провалу.
Любая более-менее сложная задача имеет несколько простых, изящных, лёгких для понимания неправильных решений
Аватара пользователя
Xpert
phpBB Guru
 
Сообщения: 5636
Зарегистрирован: 13.03.2004 21:27
Откуда: msk.ru

Сообщение OGS 26.10.2004 10:03

Xpert писал(а):.......
Где скачали такое чудо?

На просторах инета блин :oops:
Величайший мод из модов лежит тута!
OGS
phpBB 1.0.0
 
Сообщения: 9
Зарегистрирован: 19.10.2004 16:55

Сообщение OGS 27.10.2004 18:35

Ваш Glance воще не встал. Даже криво. Может подскажите чего поменять в коде надо. Вы ж всетаки специалист.
OGS
phpBB 1.0.0
 
Сообщения: 9
Зарегистрирован: 19.10.2004 16:55


Вернуться в Поддержка модов для phpBB 2.0.x

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0