T

Permissions to view custom thread fields

tomeksromek

New Member
Any idea how can I make custom thread fields visible only for registered members? And If user in not registered there will be custom message?
 

tomeksromek

New Member
Nah, not this ty


Code:
<xf:macro template="prism_macros" name="setup" />

<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code">
<div class="bbCodeBlock-title">
{{ $config.phrase ?: phrase('code') }}{$xf.language.label_separator}
</div>
<div class="bbCodeBlock-content" dir="ltr">

<xf:if is="$xf.visitor.isMemberOf([1])">
<code>
<b><a href="{{ link('login') }}" data-xf-click="overlay" data-follow-redirects="on"><i class="fas fa-sign-in-alt"></i> {{ phrase('log_in') }}</a></b>
or
<a href="{{ link('register') }}" data-xf-click="overlay" data-follow-redirects="on"><i class="fas fa-plus-square"></i> {{ phrase('register') }}</a>
</code>
<b>in order to view content</b>
<xf:else />
<pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang="{{ $language ?: '' }}"><code>{$content}</code></pre>
</xf:if>
</div>
</div>
I was thinking about making it in this way, but it doesn't work
 
Top Bottom