XenForo LEECH warning message below the quick response

alodda

Loyal Member
Registered
Here is a tutorial to achieve this result:

Screenshot_20210402-201938_Chrome.jpg

Add in EXTRA.less:

CSS:
.leechWarning {
background: # bc2931;
text-align: center;
color: #fff;
padding: 5px;
border-radius: 2px;
}


And in the TEMPLATE quick_reply_macros
add above:

HTML:
<div class="formButtonGroup">

This:
HTML:
<p class="leechWarning"><i class="fa fa-warning"></i> Attention :</span> <br>It is forbidden to leech<br>● Repeating characters or words, example: "Thankssssss" or "Thank you thank you thank you thank you thank you".<br>● SPAM message, example: "uybby ytrcvbni bbjnh uvutft cghvcaas".<br><b>NB : If you do not respect this warning your account will be banned from the forum.</p>

Edit the text like you want, 😉
 

Kapelio

Registered
1617388503665.png

You can create an article where you can tell us how to create a similar notification, as in the screenshot.
However, it is only displayed in certain sections related to the sale. Is it really possible to do this with a modification?
 

Marks-Man

Loyal Member
View attachment 302

You can create an article where you can tell us how to create a similar notification, as in the screenshot.
However, it is only displayed in certain sections related to the sale. Is it really possible to do this with a modification?
Hi, message can be displayed according to specific node but I am not sure. here is conditional node sample example:

CSS:
<xen:if is="{$quickNavSelected} != 'node-3'">
<div class="breadBoxTop">
<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
Replace "node-3" with "node-55" or any number you want. Repeat for bottom breadcrumbs if necessary.
 

Marks-Man

Loyal Member
Hi, message can be displayed according to specific node but I am not sure. here is conditional node sample example:
can be done according to user groups
<xf:if is="{{$user.isMemberOf('3, 4, 6')}}">
your content
</xf:if>

multiple examples I am not sure what you want to do
<xf:if is="!$xf.visitor.user_id">
Show only guests
<xf:else />
Show only members
</xf:if>

<xf:if is="in_array($thread.node_id, [11,12])">
 

alodda

Loyal Member
Registered
can be done according to user groups


multiple examples I am not sure what you want to do

this is correct
<xf:if is="in_array($thread.node_id, [11,12])">

Example:
if you want to post the message only in node 42,43,58

HTML:
<xf:if is="$xf.visitor.user_id and in_array($__globals.forum.node_id, [42,43,58])">
   <p class="leechWarning"><i class="fa fa-warning"></i> Warning :</span><br>It is forbidden to leech :
<br>● Repeating characters or words, example: "Thankssssss" or "Thank you thank you thank you thank you thank you".
<br>● SPAM message, example: "uybby ytrcvbni bbjnh uvutft cghvcaas".
<br><b>NB :</b> If you do not respect this warning your account will be banned from the forum.</p>
  <else if>
</xf:if>

Example : Message visible only to admin -> use this code

HTML:
<xf:if is="$xf.visitor.isMemberOf(3)">
<p class="leechWarning"><i class="fa fa-warning"></i> Warning :</span><br>It is forbidden to leech :
<br>● Repeating characters or words, example: "Thankssssss" or "Thank you thank you thank you thank you thank you".
<br>● SPAM message, example: "uybby ytrcvbni bbjnh uvutft cghvcaas".
<br><b>NB :</b> If you do not respect this warning your account will be banned from the forum.</p>
</xf:if>

For multi group use this

HTML:
<xf:if is="{{ $xf.visitor.isMemberOf([3,13,14,15]) }}">
Your Code Here
</xf:if>

Another Example:

show if the member has less than 100 post

HTML:
<xf:if is="{$xf.visitor.message_count} < 100">
<p class="leechWarning"><i class="fa fa-warning"></i> Warning :</span><br>It is forbidden to leech :
<br>● Repeating characters or words, example: "Thankssssss" or "Thank you thank you thank you thank you thank you".
<br>● SPAM message, example: "uybby ytrcvbni bbjnh uvutft cghvcaas".
<br><b>NB :</b> If you do not respect this warning your account will be banned from the forum.</p>
    <xf:else />
</xf:if>


there is a lot you can do with the conditions
 
Last edited:
Back
Top Bottom