disallow creating threads - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Development (https://community.mybb.com/forum-68.html) +---- Thread: disallow creating threads (/thread-186399.html) |
disallow creating threads - patrick - 2015-11-16 I'd like to disallow a user to create threads. Same as the MyBB system, but user based in stead of group based. I'm using a custom profile field to do so, but I'm unable to figure out what variable I have to set to accomplish this. I tried to set $mybb->usergroup['canpostthreads'] = 0; but the publish button is still there What variable allows to remove this permission? RE: disallow creating threads - expat - 2015-11-16 LOL i just asked that question yesterday...its an option in the usergroup
I misread but you said user based? RE: disallow creating threads - Leefish - 2015-11-16 set them to moderated posting? in the modcp, go to their profile. RE: disallow creating threads - patrick - 2015-11-17 Hi Leefish, I don't want to moderate posting, just new threads. Do you know what variable I have to set in the plugin script to force moderate posting after confirming that he's creating a new thread? @expat, did you try to set $mybb->usergroup['canpostthreads'] = 0; ? I did, and it didn't work. The user is still able to click the button, and he'll see the normal create thread form. You can ignore the "user based" part, because I know how to detect the user's settings. RE: disallow creating threads - expat - 2015-11-17 you can take the group off creating threads completely, also you prevent the user from creating thread.... BUT i dont think there is ready function to hide the button RE: disallow creating threads - RateU - 2015-11-17 (2015-11-16, 05:45 PM)patrick Wrote: I'd like to disallow a user to create threads. Same as the MyBB system, but user based in stead of group based. I always do the same thing (using the profile fields as user based settings) BTW, what hook you use in your plugin script? Will it be applied to all forums or for a specific forum(s) only? RE: disallow creating threads - patrick - 2015-11-18 global_start. It's the same hook I use to prevent certain users to give reputation using $mybb->usergroup['cangivereputations'] = 0; It will be used only for a few forums. RE: disallow creating threads - RateU - 2015-11-18 Since I don't know how the script looks like (so I can't test it), not quite sure why it doesn't work for you (I also use the global_start hook). Please make sure there is no other scripts (plugins and/or core edits) interfere it. Or try to take a long route by using multiple hooks. |