Jump to the post that solved this thread.
Solved: 5 Years ago No posting if hidden from online list
#1
Solved: 5 Years ago
Hello does anyone know if there is a way of denying posting privileges from members that choose to hide themselves from the Who's online list?

If a member ticks the box to hide themselves they can still post and send PMs. I would like them to get a message telling them that they can not post or send PMs whilst in hidden mode.

I know I could remove the right to be hidden but I don't want to do that, I want to suspend their privileges whilst they are hidden.

Thank you.

*I do have Template Conditionals plugin if it helps.
Reply
#2
Solved: 5 Years ago
You can use hooks(http://docs.mybb.com/1.8/development/plugins/hooks/) newreply_do_newreply_start , newthread_do_newthread_start and add a if condition where you check that if user has opted to hide themselves than they will not be able to create threads Smile
Reply
#3
Solved: 5 Years ago
(2016-05-04, 05:07 PM)WallBB Wrote: You can use hooks(http://docs.mybb.com/1.8/development/plugins/hooks/) newreply_do_newreply_start , newthread_do_newthread_start and add a if condition where you check that if user has opted to hide themselves than they will not be able to create threads Smile

Hello WallBB thank you for the information, but I'm not good at coding stuff.

Could you be a bit more specific on how the complete code should look and where they should go please?

I'm guessing one would go in "Newreply" template and the other in "Newthread" template. But I can't work out exactly where to put it and what it should look like.

Thank you.
Reply
#4
Solved: 5 Years ago
using template conditionals plugin :
<if $mybb->user['invisible'] == 1 then>
<h4>please note: invisible users can't post</h4>
<else>
existing code for posting
</if>

I prefer starting if condition below {$header} and ending it above {$footer}

edit: such code also needs to be added on showthread template for the quick reply !
Reply
#5
Solved: 5 Years ago
That got it M, I also added it to private_send too.

Thank you both very much for your help.

Smile
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)