If & else Conditional Statements

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
371
Points
103

Reputation:

You can try using this condition:

HTML:
<xf:if is="$xf.visitor.message_count|number <  200">
     <script>
        $(document).bind('copy', function(e){
             alert ('message'); // Make alert for your visitors.
             return false;
        });
   </script>
</xf:if>
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
205
Points
53

Reputation:

You can try using this condition:

HTML:
<xf:if is="$xf.visitor.message_count|number <  200">
     <script>
        $(document).bind('copy', function(e){
             alert ('message'); // Make alert for your visitors.
             return false;
        });
   </script>
</xf:if>
Soft4WinThank you for your response.
I tried it but it not working
 
View previous replies…

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
205
Points
53

Reputation:

message_count includes the count of threads aswell as posts. Internally threads are also kind of posts , just their position in first in a thread.
Soft4WinIt's working with 150 and not working with 200 for me.
But it's fine.
Many thanks, bro.
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
205
Points
53

Reputation:

Yaa don't know why it have that weird behavior, I did faced such issues earlier aswell, not sure if i fixed it at that time, can't remember atm.
Soft4WinHello dear,
Just for your kind information, I removed this code and back to using the general one that I used before because the last one you shared (150) is disabling the coping for other groups as well, the issue I thinks is regards what it counts posts with $xf. visitor.message_count|number < 150? or it's not comfortable with Java!
It's strange!
 
Top