![]() |
How to hide forum threads unless post count is X - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Community Archive (https://community.mybb.com/forum-106.html) +--- Forum: Archived Forums (https://community.mybb.com/forum-143.html) +---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html) +----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html) +------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html) +------ Thread: How to hide forum threads unless post count is X (/thread-176262.html) |
How to hide forum threads unless post count is X - soulfoam - 2015-08-26 Hello, I'm trying to figure out a way so that users of a certain usergroup must have X number of posts before viewing a thread. They should still be able to view the threads list, but when they open I'd like it to say a custom message if possible to. Like "You need X posts to view threads in this forum, please do not make spam posts, X number of HQ posts is required" or something like that. RE: How to hide forum threads unless post count is X - Ad Bakker - 2015-08-26 Check whether this plugin is doing what you want: http://community.mybb.com/thread-144715.html?highlight=hide+until RE: How to hide forum threads unless post count is X - soulfoam - 2015-08-26 (2015-08-26, 03:50 PM)Ad Bakker Wrote: Check whether this plugin is doing what you want: I already have that, that is NOT what I want. That makes it so once they reply they can see content. I want it so certain usergroups must have for example 10 posts before they can view threads inside the "OFF - Topic" section. But they should still be able to browse the thread list, just not open any threads. RE: How to hide forum threads unless post count is X - Ad Bakker - 2015-08-26 Then you need a new plugin for that. But few people will still be prepared to invest time into products for MyBB 1.6, with MyBB 2.0 on the horizon. RE: How to hide forum threads unless post count is X - niere8 - 2015-08-26 I think you have to use Template Conditionals. If I understand well what you want, the code should be: - In showthread, after {$header} : <if $mybb->user['usergroup'] == X && $mybb->user['postnum'] < 10 then> You need X posts to view threads in this forum, please do not make spam posts, X number of HQ posts is required <else> The normal showthread code </if> If user is in the usergroup X and he has less than 10 posts in all forums, then he will see message. Put this code in showthread only and not in forumdisplay_thread, so all users will can see thread list. Link: http://mybbhacks.zingaburga.com/showthread.php?tid=464 RE: How to hide forum threads unless post count is X - soulfoam - 2015-08-27 (2015-08-26, 06:56 PM)niere8 Wrote: I think you have to use Template Conditionals. If its in the template, wouldn't that be for EVERY forum...? Which would mean no one could post anywhere? RE: How to hide forum threads unless post count is X - niere8 - 2015-08-27 (2015-08-27, 12:52 PM)soulfoam Wrote: If its in the template, wouldn't that be for EVERY forum...? Which would mean no one could post anywhere? You can use it only on a specific forum ID or for every forum. If only for a specific forum try:
$mybb->user['usergroup'] == X is the usergroup $mybb->user['postnum'] < 10 need minimum 10 posts on the whole forum $GLOBALS['fid'] == X the ID of the forum I advise you to set the right usergroup and the promotion of groups. For example call usergroups : "Members registered" from 0 to 2 posts, "Users" from 3 to 50 posts, "Experts" from 51 posts to 100 posts and so on or how you want. In this way you can easily check the permissions and also more easy for Template Conditionals. For usergroup number ID: Quote:Go to ACP>User and Groups>Groups> Pick the group you are looking for and in the URL look for a number after GID, that number is the group ID and a FYI gid means group ID. For example Guests is always 1, if you didn't change it. RE: How to hide forum threads unless post count is X - soulfoam - 2015-08-27 (2015-08-27, 01:31 PM)niere8 Wrote:(2015-08-27, 12:52 PM)soulfoam Wrote: If its in the template, wouldn't that be for EVERY forum...? Which would mean no one could post anywhere? Thanks so much for that post. I'll try it ![]() Also promotions don't work because if you allow viewing they can see threads, but if you take away viewing they can't see the forum at all.. I want them to be able to see the forum is there, and all the threads names and stuff, but don't want them to actually be able to open the threads inside that forum. |