MyBB Community Forums

Full Version: No posting if hidden from online list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
(05-04-2016, 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.
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 !
That got it M, I also added it to private_send too.

Thank you both very much for your help.

Smile