The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Form Hack Details »» | |||||||||||||||||||||||||
Form Hack 4.1 Features: Ever wanted an online form that a user can fill out, which when submitted gets:
Or any combination or all of the above? Well, this is the hack for you! You can use this for:
Or anything you like - this hack is totally customizable via the AdminCP. The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms. Format of the form:
This is customizable via the hook. Also:
INSTALLATION Easy - takes only a few minutes:
Done! Use this hack to make as many forms as you like! Enjoy! Updates: Version 4.0: (09/15/2006)
Version 4.1: (04/24/2008)
MAKE SURE YOU CLICK INSTALL! You will get an email when a new version is released. Abe1 with rights from Dr Erwin Loh Supporters / CoAuthors Show Your Support
|
Comments |
#302
|
|||
|
|||
I've used the search feature that's built into the AdminCP to search all templates.
I've searched for the following in all templates: applyanswers begin template end template <!-- BEGIN TEMPLATE: applyanswers --> <!-- END TEMPLATE: applyanswers --> Nothing comes up. That's searching through all of the templates and all of the styles. I was getting these lines even before I modified the hack. I installed it and immediately tested it. |
#303
|
||||
|
||||
OK, I finally managed a workaround to this problem (if you can call it that)... basically, I copied the build_new_post function into a separate file (for instance, includes/functions_formhack.php) and renamed the function to build_newform_post. I then commented out the relevant forum permission settings to avoid the post going into the moderation queue, then in the formhack plugin, within the "if ($_REQUEST['action'] == "submit")" braces I included a "require_once" of the functions file. The call to build the new post then went to build_newform_post. Seems to work fine...
|
#304
|
|||
|
|||
Quote:
Quote:
Right, off to headbutt the wall a few times.... |
#305
|
|||
|
|||
I cannot get a form I've created to show up. When I try to access it vB gives me the following error:
Code:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/www/web2/web/newthread.php(71) : eval()'d code on line 39 I've looked over my code but I can't figure out what is wrong for the life of me. Any help would be extremely appreciated . EDIT: Found the error! I didn't put a comma after declaring one of my datatypes. I've corrected the code below to show that. However, now I have a different error message and still says the Invalid Forum specified error. The new error seems to be coming from the script part, which doesn't make sense because I haven't touched it at all. Here's the error: Code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/web2/web/newthread.php(71) : eval()'d code on line 278 Code:
// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'. // After, change the form name. You can't have 2 forms with the same name. // Name of this form $formname = "form"; if ($_REQUEST['do'] == $formname) { // ####################################################################### // ######################## CUSTOMIZE VARIABLES ########################## // ####################################################################### //////////////////////////////////////////////////////////////////////////////////////////////////// ////// BEGIN CUSTOMIZATION BELOW//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //VARIABLES //Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two. //////////////////////////////////////////////////////////////////////////////////////////////////// // Part 1 $vbulletin->input->clean_array_gpc('p', array( 'radioanswer1' => TYPE_STR, 'radioanswer2' => TYPE_STR, 'radioanswer3' => TYPE_STR, 'radioanswer4' => TYPE_STR, 'radioanswer5' => TYPE_STR, 'radioanswer6' => TYPE_STR, 'radioanswer7' => TYPE_STR, 'radioanswer8' => TYPE_STR, 'answer1' => TYPE_STR, 'answer2' => TYPE_STR, 'answer3' => TYPE_STR, 'answer4' => TYPE_STR, 'answer5' => TYPE_STR, 'longanswer1' => TYPE_STR, 'longanswer2' => TYPE_STR, 'longanswer3' => TYPE_STR, 'longanswer4' => TYPE_STR, 'longanswer5' => TYPE_STR, 'longanswer6' => TYPE_STR )); // Part 2 $radioanswer1 = $vbulletin->GPC['radioanswer1']; $radioanswer2 = $vbulletin->GPC['radioanswer2']; $radioanswer3 = $vbulletin->GPC['radioanswer3']; $radioanswer4 = $vbulletin->GPC['radioanswer4']; $radioanswer5 = $vbulletin->GPC['radioanswer5']; $radioanswer6 = $vbulletin->GPC['radioanswer6']; $radioanswer7 = $vbulletin->GPC['radioanswer7']; $radioanswer8 = $vbulletin->GPC['radioanswer8']; $answer1 = $vbulletin->GPC['answer1']; $answer2 = $vbulletin->GPC['answer2']; $answer3 = $vbulletin->GPC['answer3']; $answer4 = $vbulletin->GPC['answer4']; $answer5 = $vbulletin->GPC['answer5']; $longanswer1 = $vbulletin->GPC['longanswer1']; $longanswer2 = $vbulletin->GPC['longanswer2']; $longanswer3 = $vbulletin->GPC['longanswer3']; $longanswer4 = $vbulletin->GPC['longanswer4']; $longanswer5 = $vbulletin->GPC['longanswer5']; $longanswer6 = $vbulletin->GPC['longanswer6']; //////////////////////////////////////////////////////////////////////////////////////////////////// //USERGROUPS ALLOWED //You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array. //To enable this feature, remove the '//' before the 'if'. //////////////////////////////////////////////////////////////////////////////////////////////////// // if (!in_array($vbulletin->userinfo['usergroupid'], array(2,6))) print_no_permission(); //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE //////////////////////////////////////////////////////////////////////////////////////////////////// // Name of the main template $maintemplate = "memberappcss"; // Name of the answer template $answertemplate = "memberappcssanswers"; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED /////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE POSTED - 1 = yes, 0 = no $formforum = "1"; //FORUM TO POST NEW THREAD IN //You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list. $formforumid = "24"; //ENABLE POLL TO BE CREATED - 1 = yes, 0 = no $formpoll = "0"; $polloption[1] = "Yes"; $polloption[2] = "No"; $polloption[3] = "Maybe"; ` //Make poll public - 1 = yes, 0 = no $pollpublic = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no $formreply = "0"; //EXISTING THREAD ID FOR FORM TO REPLY IN $formreplythreadid = "12345"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no $formpm = "0"; //USERNAME TO PM TO (separate multiple usernames with a ';') $formpmname = "Abe"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no $formemail = "0"; //EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';') $formemailaddress = "youremail@yourforums.com"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE ATTACHMENTS - 1 = yes, 0 = no //attachments can only be used if the form is going to make a new thread or post $allow_attachments = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //REDIRECT OPTIONS: // 0 - thank you message (thread, reply, pm, or email) // 1 - redirect to post (thread or reply) // 2 - redirect to thread (thread only) // 3 - redirect to forum (thread only) // 4 - redirect to editpost (thread or reply) // // Feel free to change the thank you message if you choose option 0 //////////////////////////////////////////////////////////////////////////////////////////////////// $redirectoption = "2"; $errormessage = "Thank you for submitting this form!"; //This is the thank you message //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no //If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it. //////////////////////////////////////////////////////////////////////////////////////////////////// $answerall = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //TITLE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole title) //////////////////////////////////////////////////////////////////////////////////////////////////// $formtitle = "Application"; //////////////////////////////////////////////////////////////////////////////////////////////////// //TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error) //You may use variables from the form for this. //////////////////////////////////////////////////////////////////////////////////////////////////// $posttitle = "Test"; //////////////////////////////////////////////////////////////////////////////////////////////////// //PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// $formpurpose = "If you wish to join The Legion's Counter-Strike Source Division you will need to fill out this application as completely as possible. Once you have finished this form you will be redirected to the post, where you will need to wait for your sponsor to post his approval, at which point you will be added to The Legion's member list!"; $question1 = "What is your screen name:"; $explain1 = "Please enter your screen name here."; $question2 = "What is your real name:"; $explain2 = "Please enter your real name here, this is optional and you don't need to answer if you would prefer not to."; $question3 = "Who was your recruiter/how did you find us:"; $explain3 = "Please enter the name of the person who recruited you here or if you found us someplace else please tell us where."; $question4 = "What is your age:"; $explain4 = "Please specify your age. The Legion does not discriminate in any way based on your age and if your uncomforable giving this information than you don't need to."; $question5 = "What is your xFire screen name:"; $explain5 = "Please tell us your xFire screen name. If you do not have xFire is is extremely advised that you get it, as The Legion uses xFire for clan communication and to help judge how active members are."; $longquestion1 = "What clan experiance do you have:"; $longexplain1 = "Please tell us about what clan's you've been in, how long you were a member, what positions you held, etc. Feel free to be as detailed as you want."; $longquestion2 = "What gaming experiance do you have:"; $longexplain2 = "Please tell us what games you have played over the years and your experience in them, and also what games you are currently playing."; $longquestion3 = "What leadership positions have you held:"; $longexplain3 = "Please tell us about any leadership positions you've had and what your responsibilities were. This can be anywhere, in a clan, at school, in a club, at work, etc."; $longquestion4 = "Why do you want to join The Legion:"; $longexplain4 = "Please tell us why you wish to join The Legion."; $radioquestion1 = "What kind of gamer do you consider yourself to be:"; $radiochoice1a = "Occasional gamer, I game a few times each week."; $radiochoice1b = "Weekend warrior, I'm too busy to play during the week."; $radiochoice1c = "Fulltime gamer, I play every day as much as possible."; $radioquestion2 = "What is your internet speed:"; $radiochoice2a = "Dialup"; $radiochoice2b = "DSL/Cable"; $radiochoice2c = "T1/ISDN or Faster"; //////////// Division Specific Questions ////////// $longquestion5 = "What hours are you available for game play:"; $longexplain5 = "Please tell us during which hours of the week are you usually avaliable for gaming?"; $longquestion6 = "What is your preferred weapons combination:"; $longexplain6 = "Please tell us what weapons you prefer to use when playing Counter-Strike Source."; $radioquestion3 = "You must have a Microphone. Do you currently have one?:"; $radiochoice3a = "yes"; $radiochoice3b = "no"; $radioquestion4 = "You must have X-Fire. Do you currently have it?:"; $radiochoice4a = "yes"; $radiochoice4b = "no"; $radioquestion5 = "You must have Ventrilo. Do you currently have it?:"; $radiochoice5a = "yes"; $radiochoice5b = "no"; $radioquestion6 = "Do you understand that you will be required to attend practices:"; $radiochoice6a = "yes"; $radiochoice6b = "no"; $radioquestion7 = "Are you aware that we have a Code of Conduct?:"; $radiochoice7a = "yes"; $radiochoice7b = "no"; $radioquestion8 = "Have you read our Code of Conduct and agreed to it?:"; $radiochoice8a = "yes"; $radiochoice8b = "no"; $vbtextquestion = "Is there anything else you'd like to add?:"; $vbtextexplain = "If you have any other information you would like us to know please tell us here."; //////////////////////////////////////////////////////////////////////////////////////////////// ////// END OF CUSTOMIZATION //////////////////////////////////////////////////////////////////// .... |
#306
|
||||
|
||||
I see some of your problem, Find all instances of ?:";
get rid of : That will stop some if not all errors. EDIT: I also deleted all :....didnt work...Give me a min.... THis is line 278 $_REQUEST['action'] = "form"; It must say stay the same |
#307
|
||||
|
||||
Disable the option in your vb main settings not to show the template name.
|
#308
|
||||
|
||||
This is proving a major pain for me. My forms need to be able to post to threads, but with 'Guest Post Image Verification' turned off I get ENORMOUS amounts of spam. Any suggestions as to how I could combat this?
|
#309
|
||||
|
||||
Yes, dont allow guest to post. Set usergroup setting for guest, not to be able to post. Make them register.
|
#310
|
|||
|
|||
Form installed and works fine... I'll be using it for Feedback uses.
|
#311
|
|||
|
|||
SWEET! Thanks a million!
I didn't even know that was an option to set! All fixed now! Now I'm going to move on to making the 'New Thread' button in the forums where the forms will be posted, lead directly to the form, instead of a new thread. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|