Easily create forms with no HTML or PHP knowledge. Questions can be made compulsory and are checked before the form is submitted. Forms can be previewed. (You can create multiple forms)
I'm sorry if this has already been answered (I did search through the thread), but how would I go about creating a hook that checked to see if a users post count was above 10? I have no PHP knowledge. (At best, all I can do is look at a chunk of code and get the general understanding of what it does)
The reason I ask this is because my forum is dedicated to an online game, and I want to be able to give people the option to create a forum for their clan. I want there to be a minimum post requirement for them to be able to do this, because in the past I have had to check manually and it's sort of a pain for me to do.
I'm sorry if this has already been answered (I did search through the thread), but how would I go about creating a hook that checked to see if a users post count was above 10? I have no PHP knowledge. (At best, all I can do is look at a chunk of code and get the general understanding of what it does)
The reason I ask this is because my forum is dedicated to an online game, and I want to be able to give people the option to create a forum for their clan. I want there to be a minimum post requirement for them to be able to do this, because in the past I have had to check manually and it's sort of a pain for me to do.
Thanks!
Add the following php code to Form Hook: Form Start:
PHP Code:
if($vbulletin->userinfo['posts'] < 10) { $errormessage = "You need 10 posts to use this form."; eval('print_output("' . fetch_template('STANDARD_ERROR') . '");'); }
If you want to remove the question as well look at the bbcode code and text you wish removed and add it exactly into hook where X is:
Form Hook: Before Submit:
$formoutput = str_replace("X", "", $formoutput);
Still not removing anything. What i am using is a for sale listing form, and one question is does your item come with a scope. yes/no = radio checkbox.
Then if the answer is no the next question they are told to ignore, but if yes the next question they fill in the type of scope.
So if they choose "no" and don't fill in the type of scope, this is then submitted with a space/gap in the for sale thread, if i click on edit thread i have to remove [b][size=3][/size][/b] from the post to remove the space/gap between the item for sale listing. Maybe i have to tell the form somehow to ignore the next question if the answer is "no"
See pic for example of gap between rows.
Add the following php code to Form Hook: Form Start:
PHP Code:
if($vbulletin->userinfo['posts'] < 10)
{
$errormessage = "You need 10 posts to use this form.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}