XF 2.0 anonymise a specific forum

aana

Active member
Hello,

i am trying to hide the user block and signature on a specific forum. And on this same forum i would like to hide the avatar, user name, last answered user form the thread list.

I try this but ..

Code:
<xf:if is="$forum.node_id != 3">
               Hide content..
</xf:if>
 
90% solved.

Create à new member, remember name and id.

( use template modification )
In node_list_forum
HTML:
$0
<xf:if is="{$node.node_id} == yourNodeId AND (!$xf.visitor.is_admin OR !$xf.visitor.is_moderator)">
    <xf:set var="$extras.last_post_user_id" value="{{ 'yourNewMemberId' }}" />
    <xf:set var="$extras.last_post_username" value="{{ 'yourNewMemberName' }}" />
</xf:if>


In post_macros
HTML:
$0
<xf:if is="{$post.Thread.node_id} == yourNodeId AND (!$xf.visitor.is_admin OR !$xf.visitor.is_moderator)">
   <xf:set var="$post.user_id" value="{{ 'yourNewMemberId' }}" />
</xf:if>


In thread_list_macros
HTML:
$0
<xf:if is="{$thread.node_id} == yourNodeId AND (!$xf.visitor.is_admin OR !$xf.visitor.is_moderator)">
    <xf:set var="$thread.user_id" value="{{ 'yourNewMemberId' }}" />
    <xf:set var="$thread.last_post_username" value="{{ 'yourNewMemberName' }}" /> 
</xf:if>


My last problems :
members who post a message or thread should see their own messages correct infos
Do the same change for alerts
 
Last edited:
For alerts.

In account_alerts_popup AND account_alerts :
HTML:
<xf:if is="$alert->***->Thread->node_id == nodeId AND (!$xf.visitor.is_admin OR !$xf.visitor.is_moderator)">
       <xf:macro template="alert_macros" name="row" arg-alert="{$alert}" arg-ano="1"/>
<xf:else />
        <xf:macro template="alert_macros" name="row" arg-alert="{$alert}" arg-ano="0" />
</xf:if>


In alert_macros :
HTML:
<xf:macro name="row" arg-alert="!" arg-ano="0">

And:
HTML:
<xf:if is="$ano == 0">
    <xf:avatar user="$alert.User" size="xxs" defaultname="{$alert.username}" />
<xf:else />
     <xf:set var="$alert.user_id" value="userId" />
      <xf:avatar user="$alert.User" size="xxs" defaultname="userName" />
</xf:if>


Removing quote option.
In post_macros :
HTML:
<xf:if is="$thread.canReply() AND $thread.node_id != nodeId">
 
Last edited:
Top Bottom