Neler yeni

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

  • Forumdan daha fazla yararlanmak için, profilinizi telefon numaranız 📱 ile doğrulayın ve daha ayrıcalıklı olun 😉
    Daha fazla bilgi!

Kullanım tekniği [cXF] Replies and Views on thread view 1.1.0 - Latest Post ana bölüme görüntülenme sayı ekleme

lfs_tab.latest_posts template editliyoruz. Not: Yorum kısmındaki kod orjinal kodun backupudur.

Sonuç:

1714597800664.png

HTML:
<ul class="content {$tab.tab_class}">
    <xf:if is="$threads is not empty || $stickedLinks is not empty">
       
        <xf:foreach loop="$stickedLinks" value="$stickedLink">
            <xf:macro template="lfs_tab_thread_definition_macros" name="sticked_link_item"
                      arg-stickedLink="{$stickedLink}" />
        </xf:foreach>

        <xf:foreach loop="$threads" value="$thread">
            <xf:set var="$extraData">
                <span class="postDate contentRow-minor">
                    <xf:if is="$thread.bs_lfs_is_sticked">
                        {{ phrase('lfs_sticked') }}
                        <xf:else />
                            <xf:fa icon="fa-solid fa-eye" title="" /> {{$thread.view_count}}
                    </xf:if>
                </span>
            </xf:set>

            <xf:macro template="lfs_tab_thread_definition_macros" name="thread_item"
                      arg-extraData="{$extraData}"
                      arg-thread="{$thread}"
                      arg-user="{$thread.LastPoster}"
                      arg-date="{$thread.last_post_date}"
                      arg-link="{{ link('threads/post', $thread, {'post_id': $thread.last_post_id}) }}" />
        </xf:foreach>
       
        <xf:else />
       
        <xf:macro template="lfs_macros" name="empty_block" />
       
    </xf:if>
</ul>
   
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
            link="lfs/tab" params="{{ {'tab_id': $tab.tab_id} }}"
            wrapperclass="hidden-pageNav js-lfsPageNav" />






<!--

<ul class="content {$tab.tab_class}">
    <xf:if is="$threads is not empty || $stickedLinks is not empty">
       
        <xf:foreach loop="$stickedLinks" value="$stickedLink">
            <xf:macro template="lfs_tab_thread_definition_macros" name="sticked_link_item"
                      arg-stickedLink="{$stickedLink}" />
        </xf:foreach>

        <xf:foreach loop="$threads" value="$thread">
            <xf:macro template="lfs_tab_thread_definition_macros" name="thread_item"
                      arg-thread="{$thread}"
                      arg-user="{$thread.LastPoster}"
                      arg-date="{$thread.last_post_date}"
                      arg-link="{{ link('threads/post', $thread, {'post_id': $thread.last_post_id}) }}" />
        </xf:foreach>
       
        <xf:else />
       
        <xf:macro template="lfs_macros" name="empty_block" />
       
    </xf:if>
</ul>
   
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
            link="lfs/tab" params="{{ {'tab_id': $tab.tab_id} }}"
            wrapperclass="hidden-pageNav js-lfsPageNav" />

-->
 
lfs_tab.latest_posts template editliyoruz. Not: Yorum kısmındaki kod orjinal kodun backupudur.

Sonuç:

Ekli dosyayı görüntüle 26235

HTML:
<ul class="content {$tab.tab_class}">
    <xf:if is="$threads is not empty || $stickedLinks is not empty">
     
        <xf:foreach loop="$stickedLinks" value="$stickedLink">
            <xf:macro template="lfs_tab_thread_definition_macros" name="sticked_link_item"
                      arg-stickedLink="{$stickedLink}" />
        </xf:foreach>

        <xf:foreach loop="$threads" value="$thread">
            <xf:set var="$extraData">
                <span class="postDate contentRow-minor">
                    <xf:if is="$thread.bs_lfs_is_sticked">
                        {{ phrase('lfs_sticked') }}
                        <xf:else />
                            <xf:fa icon="fa-solid fa-eye" title="" /> {{$thread.view_count}}
                    </xf:if>
                </span>
            </xf:set>

            <xf:macro template="lfs_tab_thread_definition_macros" name="thread_item"
                      arg-extraData="{$extraData}"
                      arg-thread="{$thread}"
                      arg-user="{$thread.LastPoster}"
                      arg-date="{$thread.last_post_date}"
                      arg-link="{{ link('threads/post', $thread, {'post_id': $thread.last_post_id}) }}" />
        </xf:foreach>
     
        <xf:else />
     
        <xf:macro template="lfs_macros" name="empty_block" />
     
    </xf:if>
</ul>
 
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
            link="lfs/tab" params="{{ {'tab_id': $tab.tab_id} }}"
            wrapperclass="hidden-pageNav js-lfsPageNav" />






<!--

<ul class="content {$tab.tab_class}">
    <xf:if is="$threads is not empty || $stickedLinks is not empty">
     
        <xf:foreach loop="$stickedLinks" value="$stickedLink">
            <xf:macro template="lfs_tab_thread_definition_macros" name="sticked_link_item"
                      arg-stickedLink="{$stickedLink}" />
        </xf:foreach>

        <xf:foreach loop="$threads" value="$thread">
            <xf:macro template="lfs_tab_thread_definition_macros" name="thread_item"
                      arg-thread="{$thread}"
                      arg-user="{$thread.LastPoster}"
                      arg-date="{$thread.last_post_date}"
                      arg-link="{{ link('threads/post', $thread, {'post_id': $thread.last_post_id}) }}" />
        </xf:foreach>
     
        <xf:else />
     
        <xf:macro template="lfs_macros" name="empty_block" />
     
    </xf:if>
</ul>
 
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
            link="lfs/tab" params="{{ {'tab_id': $tab.tab_id} }}"
            wrapperclass="hidden-pageNav js-lfsPageNav" />

-->
 

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.