Блок "Последние темы форума". NV recent topics

CabinetAdmin 03 фев 2013, 10:26 Сообщение

NV recent topics - позволяет вывести на главную страницу форума (список форумов и страницах page=1, page=2 и тд.)

Настройки и включение МОДа осуществляются при помощи меню "МОДУЛИ" -> MOD "Последние темы" -> "Конфигурация"

Исключить тот или иной форум в списке "Последние темы" можно в настройках конкретного форума (параметр "Показывать в "последних темах"")
Список последних тем формируется согласно правам доступа пользователя.

Изменения для клонов SUBSILVER2:

Открываем шаблон index_body.html, находим:

Код: Выделить всё

<!-- INCLUDE forumlist_body.html -->
После найденного вставляем:

Код: Выделить всё

<!-- IF RT_DISPLAY --><!-- INCLUDE recent_topics_body.html --><!-- ENDIF -->
Если после установки выскакивает ошибка значит в шаблонах стиля нет recent_topics_body.html.
В этом случае после:

Код: Выделить всё

<!-- INCLUDE forumlist_body.html -->
Вставляем:

Код: Выделить всё

<div id="pagecontent">
   <!-- IF RT_PAGINATION -->
      <table width="100%" cellspacing="1">
      <tr>
         <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{RT_PAGE_NUMBER}<br /></td>
         <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">
            <b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> {RT_PAGINATION}</b>
         </td>
      </tr>
      </table>
   <!-- ENDIF -->
   <table class="tablebg" width="100%" cellspacing="1">
      <tr class="nav">
         <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->6<!-- ELSE -->5<!-- ENDIF -->" valign="middle" align="center">{L_RECENT_TOPICS}</td>
      </tr>
      <tr>
         <!-- IF S_TOPIC_ICONS -->
            <th colspan="3">&nbsp;{L_TOPICS}&nbsp;</th>
         <!-- ELSE -->
            <th colspan="2">&nbsp;{L_TOPICS}&nbsp;</th>
         <!-- ENDIF -->
         <th>&nbsp;{L_REPLIES}&nbsp;</th>
         <th>&nbsp;{L_VIEWS}&nbsp;</th>
         <th>&nbsp;{L_LAST_POST}&nbsp;</th>
      </tr>

      <!-- BEGIN recenttopicrow -->
         <tr>
            <td class="row1" width="25" align="center">{recenttopicrow.TOPIC_FOLDER_IMG}</td>
            <!-- IF S_TOPIC_ICONS -->
               <td class="row1" width="25" align="center"><!-- IF recenttopicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{recenttopicrow.TOPIC_ICON_IMG}" width="{recenttopicrow.TOPIC_ICON_IMG_WIDTH}" height="{recenttopicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
            <!-- ENDIF -->
            <td class="row1">
               <!-- IF recenttopicrow.S_UNREAD_TOPIC --><a href="{recenttopicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
               {recenttopicrow.ATTACH_ICON_IMG} <!-- IF recenttopicrow.S_HAS_POLL or recenttopicrow.S_TOPIC_MOVED --><b>{recenttopicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {recenttopicrow.FIRST_POST_TIME}" href="{recenttopicrow.U_VIEW_TOPIC}" class="topictitle">{recenttopicrow.TOPIC_TITLE}</a>
               <!-- IF recenttopicrow.S_TOPIC_UNAPPROVED or recenttopicrow.S_POSTS_UNAPPROVED -->
                  <a href="{recenttopicrow.U_MCP_QUEUE}">{recenttopicrow.UNAPPROVED_IMG}</a>&nbsp;
               <!-- ENDIF -->
               <!-- IF recenttopicrow.S_TOPIC_REPORTED -->
                  <a href="{recenttopicrow.U_MCP_REPORT}">{recenttopicrow.REPORTED_IMG}</a>&nbsp;
               <!-- ENDIF -->
               <!-- IF recenttopicrow.PAGINATION -->
                  <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {recenttopicrow.PAGINATION} ] </p>
               <!-- ENDIF -->
               <p class="gensmall">{L_POST_BY_AUTHOR} {recenttopicrow.TOPIC_AUTHOR_FULL}
               &raquo; {recenttopicrow.FIRST_POST_TIME}
               <!-- IF recenttopicrow.U_VIEW_FORUM and recenttopicrow.FORUM_NAME -->
                  {L_IN} <a href="{recenttopicrow.U_VIEW_FORUM}" style="font-weight: bold;">{recenttopicrow.FORUM_NAME}</a>
               <!-- ENDIF -->
               </p>
            </td>
            <td class="row1" width="50" align="center"><p class="topicdetails">{recenttopicrow.REPLIES}</p></td>
            <td class="row2" width="50" align="center"><p class="topicdetails">{recenttopicrow.VIEWS}</p></td>
            <td class="row1" width="140" align="center">
               <p class="topicdetails" style="white-space: nowrap;">{recenttopicrow.LAST_POST_TIME}</p>
               <p class="topicdetails">{recenttopicrow.LAST_POST_AUTHOR_FULL}
                  <a href="{recenttopicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
               </p>
            </td>
         </tr>

      <!-- BEGINELSE -->

         <tr>
            <!-- IF S_TOPIC_ICONS -->
               <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
            <!-- ELSE -->
               <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
            <!-- ENDIF -->
         </tr>
      <!-- END recenttopicrow -->
      </table>
</div>
<br clear="all" />

Изменения для клонов PROSILVER

Открываем шаблон index_body.html, находим:

Код: Выделить всё

<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
Перед найденным добавляем:

Код: Выделить всё

<!-- IF RT_DISPLAY --><!-- INCLUDE recent_topics_body.html --><!-- ENDIF -->
Если после установки выскакивает ошибка значит в шаблонах стиля нет recent_topics_body.html. Установка будет следующая, находим:

Код: Выделить всё

<!-- INCLUDE forumlist_body.html -->
Перед найденным вставляем:

Код: Выделить всё

<!-- IF RT_PAGINATION -->
<div class="topic-actions">
   <div class="pagination">
      <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{RT_PAGE_NUMBER}</a> &bull; <span>{RT_PAGINATION}</span>
   </div>
</div>
<!-- ENDIF -->
<!-- BEGIN recenttopicrow -->
   <!-- IF not recenttopicrow.S_TOPIC_TYPE_SWITCH and not recenttopicrow.S_FIRST_ROW -->
      </ul>
      <span class="corners-bottom"><span></span></span></div>
   </div>
   <!-- ENDIF -->

   <!-- IF recenttopicrow.S_FIRST_ROW or not recenttopicrow.S_TOPIC_TYPE_SWITCH -->
      <div class="forumbg">
      <div class="inner"><span class="corners-top"><span></span></span>
      <ul class="topiclist">
         <li class="header">
            <dl class="icon">
            <dt>{L_RECENT_TOPICS}</dt>
               <dd class="posts">{L_REPLIES}</dd>
               <dd class="views">{L_VIEWS}</dd>
               <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
            </dl>
         </li>
      </ul>
      <ul class="topiclist topics">
   <!-- ENDIF -->
   
      <li class="row<!-- IF recenttopicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
         <dl class="icon" style="background-image: url({recenttopicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
            <dt style="<!-- IF recenttopicrow.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{recenttopicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{recenttopicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF recenttopicrow.S_UNREAD_TOPIC --><a href="{recenttopicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{recenttopicrow.U_VIEW_TOPIC}" class="topictitle">{recenttopicrow.TOPIC_TITLE}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> &bull; <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->
               <!-- IF recenttopicrow.S_TOPIC_UNAPPROVED or recenttopicrow.S_POSTS_UNAPPROVED --><a href="{recenttopicrow.U_MCP_QUEUE}">{recenttopicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
               <!-- IF recenttopicrow.S_TOPIC_REPORTED --><a href="{recenttopicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
               <!-- IF recenttopicrow.PAGINATION --><strong class="pagination"><span>{recenttopicrow.PAGINATION}</span></strong><!-- ENDIF -->
               <!-- IF recenttopicrow.ATTACH_ICON_IMG -->{recenttopicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {recenttopicrow.TOPIC_AUTHOR_FULL} &raquo; {recenttopicrow.FIRST_POST_TIME}
               <!-- IF recenttopicrow.U_VIEW_FORUM and recenttopicrow.FORUM_NAME --><br />{L_IN} <a href="{recenttopicrow.U_VIEW_FORUM}" style="font-weight: bold;">{recenttopicrow.FORUM_NAME}</a><!-- ENDIF -->
            </dt>
            <dd class="posts">{recenttopicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
            <dd class="views">{recenttopicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
            <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {recenttopicrow.LAST_POST_AUTHOR_FULL}
               <a href="{recenttopicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{recenttopicrow.LAST_POST_TIME}</span>
            </dd>
         </dl>
      </li>

   <!-- IF recenttopicrow.S_LAST_ROW -->
         </ul>
      <span class="corners-bottom"><span></span></span></div>
   </div>
   <!-- ENDIF -->

<!-- BEGINELSE -->
   <div class="panel">
      <div class="inner"><span class="corners-top"><span></span></span>
      <strong>{L_NO_TOPICS}</strong>
      <span class="corners-bottom"><span></span></span></div>
   </div>
<!-- END recenttopicrow -->
  • 0
Хочешь поблагодарить? Есть способы: заходи на форум, создавай темы, делись опытом и наработками, общайся!

Похожие темы