- Reaction score
- 48
- Points
- 55
Compatibility with XenForo: 2.1
Prohibit reactions in certain forums and/or for specific user groups.
Edit Template: post_macros
Find near Line: 138 -> <xf:contentcheck>
after <xf:contentcheck> and before
insert:
under the following line of code
insert:
After you have saved this, the button "Like" is missing in the forums with the registered node_ids.
The same applies globally to the user groups whose IDs are entered in isMemberOf.
Of course, only one of the two modifications can also be used.
If now also the same user groups, and / or in the same forums already forgiven reactions are to be hidden, search the following line of code in the same template: (arround the Linenumber 272)
before add:
after </div> add:
Prohibit reactions in certain forums and/or for specific user groups.
Edit Template: post_macros
Find near Line: 138 -> <xf:contentcheck>
after <xf:contentcheck> and before
PHP:
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
insert:
PHP:
<xf:comment>Deny reaction edit-1</xf:comment>
<xf:if is="!in_array($__globals.forum.node_id, [5,14,16,27])">
<xf:if is="!$xf.visitor.isMemberOf([14,17,24,29])">
under the following line of code
PHP:
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
insert:
PHP:
</xf:if>
</xf:if>
After you have saved this, the button "Like" is missing in the forums with the registered node_ids.
The same applies globally to the user groups whose IDs are entered in isMemberOf.
Of course, only one of the two modifications can also be used.
If now also the same user groups, and / or in the same forums already forgiven reactions are to be hidden, search the following line of code in the same template: (arround the Linenumber 272)
PHP:
<div class="reactionsBar js-reactionsList {{ $post.reactions ? 'is-active' : '' }}">
before add:
PHP:
<xf:comment>Deny visible reaction edit-2</xf:comment>
<xf:if is="!in_array($__globals.forum.node_id, [5,14,16,27])">
<xf:if is="!$xf.visitor.isMemberOf([14,17,24,29])">
after </div> add:
PHP:
</xf:if>
</xf:if>
XenForo is a commercial Internet forum software package written in PHP. It was developed by former vBulletin developers, and it is designed to enhance community engagement and provide forum owners with a powerful platform to build and manage their online communities.