alternity |
02-18-2007 03:06 PM |
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
And says "Invalid Forum specified. If you followed a valid link, please notify the administrator".
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 ////////////////////////////////////////////////////////////////////
....
|