XenForo 2.1 Ziyaretçilere İçerik Görünümünü Kısıtla

Argion

Kayıtlı Üye
Katılım
20 Mar 2020
Mesajlar
3
Beğeniler
0
Puanları
1
Yaş
40
Konum
Izmir
#1
Ziyaretçilerinizin karakter sayısını sınırlayarak içeriklerin görüntülenmesini kısıtlayın.

post_macros şablonunda bulun



HTML:
<article class="message-body js-selectToQuote">
<xf:ad position="post_above_content" arg-post="{$post}" />
{{ bb_code($post.message, 'post', $post) }}
<div class="js-selectToQuoteEnd">&nbsp;</div>
<xf:ad position="post_below_content" arg-post="{$post}" />
</article>
Kod:

Bununla değiştirin:

HTML:
<article class="message-body js-selectToQuote">
<xf:ad position="post_above_content" arg-post="{$post}" />
<xf:if is="!$xf.visitor.user_id">
<xf:set var="$snippetPost" value="{{ snippet($post.message, 300) }}" />
{{  bb_code($snippetPost, 'post', $post)  }}
<xf:if is="$snippetPost != $post.message">
<div class="blockMessage blockMessage--important blockMessage--iconic">
İçeriğin tamamını görüntülemek için lütfen giriş yapınız.
</div>
</xf:if>
<xf:else/>
{{ bb_code($post.message, 'post', $post) }}
</xf:if>
<div class="js-selectToQuoteEnd">&nbsp;</div>
<xf:ad position="post_below_content" arg-post="{$post}" />
</article>

($post.message, 300) bu kod parçasında 300 kısmına ne kadar karakterin görüneceğini belirleyin.
 
Üst