MyBB Hacks

Full Version: Create a new forum in X forum only if user has minimum post in X forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I would like to ask if there's a code to allow users with minimum X postnum to create a new thread in a specific forum.
I try to write better.

With this code <if $post['postnum'] >= 10 then>Create a new thread</if> users with minimum 10 posts in all forum can create a new thread.

But if I want minimum 10 posts in a specific X forum, how can I do (if it's possible)?

<if $thread['fid'] == 115 || $post['postnum'] >= 10 then>Create new thread
    <else>No
      </if>

But this code takes still postnum for all forums..I need a plugin? Frown

This is for a forum about exchange votes, I would like only users with minimum 10 posts in exchange votes forum can create new thread.

- If user has 10 posts in fid 115 and 0 in all forum = can creates new thread
- If user has 50 posts in all forum but 0 in fid 115 = can't create new thread in fid 115 but he can create new threads in other fids

Thank you in advance
1. Template conditionals shouldn't be used for permissions checking as it can't actually stop the user from doing specified action
2. It's not easy to know this information since it has to be tracked (or queried, if you don't mind the overhead), and cannot be obtained via conditional
i know this is old but change the || to && and it will check for both not one or the other. || is or. && is and. with or it will check if one or the other matches and display. and it will check that both matches and if none does it shows the else.

or is for wanting to check if one or the other is correct.

so in this case you want both to be checked so or is not needed.

Code:
<if $thread['fid'] == 115 && $post['postnum'] >= 10 then>Create new thread
    <else>No
      </if>

Reference URL's