It could be done with a custom user field and a template edit with conditional statement.
ShowSimilarThreadsWidget and figure I need to edit the xfes_widget_similar_threads template:<xf:if is="$threads is not empty">
<div class="block" {{ widget_data($widget) }}>
<div class="block-container">
<xf:if is="$style == 'full'">
<h3 class="block-header">{{ $title ?: phrase('xfes_similar_threads') }}</h3>
<div class="block-body">
<div class="structItemContainer">
<xf:foreach loop="$threads" value="$thread">
<xf:macro name="thread_list_macros::item"
arg-allowInlineMod="{{ false }}"
arg-thread="{$thread}" />
</xf:foreach>
</div>
</div>
<xf:else />
<h3 class="block-minorHeader">{{ $title ?: phrase('xfes_similar_threads') }}</h3>
<ul class="block-body">
<xf:foreach loop="$threads" value="$thread">
<li class="block-row">
<xf:macro name="thread_list_macros::item_new_threads"
arg-thread="{$thread}" />
</li>
</xf:foreach>
</ul>
</xf:if>
</div>
</div>
</xf:if>
xen:if is="!{$visitor.customFields.ShowSimilarThreadsWidget}"> and </xen:if>?<xf:if is="{$xf.visitor.Profile.custom_fields.ShowSimilarThreadsWidget}">
<xf:if is="$threads is not empty">
<div class="block" {{ widget_data($widget) }}>
<div class="block-container">
<xf:if is="$style == 'full'">
<h3 class="block-header">{{ $title ?: phrase('xfes_similar_threads') }}</h3>
<div class="block-body">
<div class="structItemContainer">
<xf:foreach loop="$threads" value="$thread">
<xf:macro name="thread_list_macros::item"
arg-allowInlineMod="{{ false }}"
arg-thread="{$thread}" />
</xf:foreach>
</div>
</div>
<xf:else />
<h3 class="block-minorHeader">{{ $title ?: phrase('xfes_similar_threads') }}</h3>
<ul class="block-body">
<xf:foreach loop="$threads" value="$thread">
<li class="block-row">
<xf:macro name="thread_list_macros::item_new_threads"
arg-thread="{$thread}" />
</li>
</xf:foreach>
</ul>
</xf:if>
</div>
</div>
</xf:if>
</xf:if>
We use essential cookies to make this site work, and optional cookies to enhance your experience.