XF 1.5 Как добавить блок

Статус
В этой теме нельзя размещать новые ответы.

Remontcik

Заблокирован
Сообщения
270
Реакции
53
Баллы
3,325
Как добавить блок в боковую панель? Новые сообщения (в темах), у меня этого нету
 

Вложения

  • Screenshot_1.png
    Screenshot_1.png
    28.7 KB · Просмотры: 67
Шаблон sidebar_new_posts:
Код:
<xen:require css="thread_list_simple.css" />

<ul>
<xen:foreach loop="$threads" value="$thread">
    <li id="thread-{$thread.thread_id}" class="threadListItem{xen:if $thread.isDeleted, ' deleted'}{xen:if $thread.lastPostInfo.isIgnored, ' ignored'}" data-author="{$thread.lastPostInfo.username}">

        <xen:avatar user="$thread.lastPostInfo" size="s" img="true" />
       
        <div class="messageInfo">
           
            <div class="messageContent">
                <div class="title">
                <xen:if is="{$thread.isNew} AND {$thread.haveReadData}">
                    <a href="{xen:link threads/unread, $thread}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                <xen:else />
                    <a href="{xen:link posts, $thread.lastPostInfo}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                </xen:if>
                </div>
            </div>

            <div class="additionalRow muted">
                {xen:phrase latest}: {$thread.lastPostInfo.username}, <xen:datetime time="$thread.lastPostInfo.post_date" />
            </div>
           
            <div class="additionalRow muted">
                <a href="{xen:link forums, $thread.forum}" class="forumLink">{$thread.forum.title}</a>
            </div>
        </div>
    </li>
</xen:foreach>
</ul>
 
Шаблон sidebar_new_posts:
Код:
<xen:require css="thread_list_simple.css" />

<ul>
<xen:foreach loop="$threads" value="$thread">
    <li id="thread-{$thread.thread_id}" class="threadListItem{xen:if $thread.isDeleted, ' deleted'}{xen:if $thread.lastPostInfo.isIgnored, ' ignored'}" data-author="{$thread.lastPostInfo.username}">

        <xen:avatar user="$thread.lastPostInfo" size="s" img="true" />
      
        <div class="messageInfo">
          
            <div class="messageContent">
                <div class="title">
                <xen:if is="{$thread.isNew} AND {$thread.haveReadData}">
                    <a href="{xen:link threads/unread, $thread}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                <xen:else />
                    <a href="{xen:link posts, $thread.lastPostInfo}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                </xen:if>
                </div>
            </div>

            <div class="additionalRow muted">
                {xen:phrase latest}: {$thread.lastPostInfo.username}, <xen:datetime time="$thread.lastPostInfo.post_date" />
            </div>
          
            <div class="additionalRow muted">
                <a href="{xen:link forums, $thread.forum}" class="forumLink">{$thread.forum.title}</a>
            </div>
        </div>
    </li>
</xen:foreach>
</ul>
ничего не изменилось
 
Потом не забудьте заинклудить его в шаблон forum_list, найдите в этом шаблоне :
Код:
<xen:hook name="forum_list_sidebar">
        <xen:if is="{$canViewMemberList}">
            <xen:include template="sidebar_online_users" />
        </xen:if>


И ниже добавьте:
Код:
<xen:if is="{$threads}">
            <div class="section threadList">
                <div class="secondaryContent">
                    <h3><a href="{xen:link find-new/posts}">{xen:phrase new_posts}</a></h3>
                    <xen:include template="sidebar_new_posts" />
                </div>
            </div>
        </xen:if>

ничего не изменилось
А должно было? Инклуд кто будет делать? Дед Мороз никак?
 
Статус
В этой теме нельзя размещать новые ответы.
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу