Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Form Hack Details »»
Form Hack
Version: 4.1, by Abe1 Abe1 is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.x Rating:
Released: 09-14-2006 Last Update: 04-23-2008 Installs: 1216
Uses Plugins Template Edits
 
No support by the author.

Form Hack 4.1


Features:

Ever wanted an online form that a user can fill out, which when submitted gets:
  • Posted into a new thread in a forum of your choice
  • Create a new poll in the new thread with options of your choice
  • Posted as a reply in an existing thread of your choice
  • PMed to you or someone else
  • Emailed to an email address you specify
  • Choose to redirect to the post, thread or forum, or a custom thank you message
  • Choose to redirect to edit post
  • See a preview before they submit

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:
  • Moderator Applications
  • Quiz Submit Form which gets PMed to a moderator
  • Contact Form that goes to PM, email or thread
  • Guests to apply to be members
  • Report a Moderator form that goes as a PM to you
  • Guests can PM you for whatever reason
  • Order form to buy things
  • Donation form
  • News or Articles submissions that can go straight to a thread

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:
  • One main input question
  • 3 Radio buttons Choice questions
  • 3 Normal text input questions
  • 1 Drop down menu
  • 3 Check boxes
  • 1 Long answer question
  • 1 VB message editor text box question
  • Upload attachments

This is customizable via the hook.

Also:
  • You can set the usergroups you want access to this form.
  • Depending on your forum permissions, if the new thread is in a public forum, members can reply to it. This hack allows a form to submit the new thread or post wherever you want it to go.
  • Force the user to answer all questions.

INSTALLATION
Easy - takes only a few minutes:
  • Import the XML into products. (admin cp -> Plug-in System -> Manage Products -> Add/Import Product)
  • Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!
  • To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

Done!

Use this hack to make as many forms as you like!

Enjoy!

Updates:

Version 4.0: (09/15/2006)
  • Ported over for vb3.6
  • Send to multiple emails.
  • Send multiple PMs.
  • Parse emails for BBCode
  • And finally, ATTACHMENTS!

Version 4.1: (04/24/2008)
  • Fixed for vb 3.6.10
  • Small bug fixed.
  • List of the 2 quick edits are in the zip file so you don't have to start making a form from scratch.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #802  
Old 12-17-2007, 05:59 AM
GreysAnatomy's Avatar
GreysAnatomy GreysAnatomy is offline
 
Join Date: May 2005
Location: Chocoland
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've d/led the hack again, re-installed it and set everything up again, but with the same result. This time, I didn't change anything in the lower part of the code and removed all html as well as any special symbols but it still doean't work.

PHP 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 "moderatorsearch";

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(
'longanswer1' => TYPE_STR
'longanswer2' => TYPE_STR
'longanswer3' => TYPE_STR
'longanswer4' => TYPE_STR
'longanswer5' => TYPE_STR
'longanswer6' => TYPE_STR
));

// Part 2
$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(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 "moderatorsearch";
// Name of the answer template
$answertemplate "moderatoranswers";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "18";

//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 "Sarah Walker";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail "1";

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress "webmaster@chuck-boards.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 "0";

$errormessage "Thank you for submitting your application. We will let you know if you've made it!"//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 "Moderator Search - Round 2";

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "$formtitle";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose "Please answer all the questions. Read them carefully, then state what you think is wrong with the scenario and provide examples of PMs or posts if necessary.";

////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion1 "Question 1";
$longexplain1 "Someone has posted in a thread. Their signature contains 5 animated icons with pictures of an upcoming episode.";

$longquestion2 "Question 2:";
$longexplain2 "While browsing the boards, you notice the following post in the Couples subforum: plz h3lp me. i w4Nt A cUst0m 4vat4R BuT d0n'T kn0w wh3r3 to Upl04d it. h3lP!";

$longquestion3 "Question 3:";
$longexplain3 "A friend of yours PMs you to ask if you could change his/her username to Ellie Bartowski.";

$longquestion4 "Question 4:";
$longexplain4 "You come across a minor disagreement between two members but decide to leave them alone and resolve their differences. When you log in the next day, there have been multiple other people jumping in and the whole thread has turned into a fighting arena.";

$longquestion5 "Question 5:";
$longexplain5 "You come across a forum that looks like a clone from Chuck Boards - same subforum names, same avatars, same headers.";

$longquestion6 "Why me?";
$longexplain6 "Please write a short essay on why we should pick you to become a moderator.";


////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$vbtextquestion "Please write down a paragraph about how you like this forum.";
$vbtextexplain "For example, what makes this forum different from all other forums?";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////// 
I'd be really grateful if anyknow could tell me what's wrong with this plugin. I didn't change the templates btw. They're still the same as posted above.

Oh, I now get the error message:
PHP Code:
Parse errorsyntax errorunexpected T_CONSTANT_ENCAPSED_STRINGexpecting ')' in /home/schneefl/public_html/chuck-boards.com/newthread.php(71) : eval()'d code on line 38 
Line 38 is the following:
PHP Code:
$longanswer5 $vbulletin->GPC['longanswer5']; 
Reply With Quote
  #803  
Old 12-17-2007, 06:37 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GreysAnatomy View Post
I've d/led the hack again, re-installed it and set everything up again, but with the same result. This time, I didn't change anything in the lower part of the code and removed all html as well as any special symbols but it still doean't work.

PHP 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 "moderatorsearch";
 
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(
'longanswer1' => TYPE_STR
'longanswer2' => TYPE_STR
'longanswer3' => TYPE_STR
'longanswer4' => TYPE_STR
'longanswer5' => TYPE_STR
'longanswer6' => TYPE_STR
));
 
// Part 2
$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(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 "moderatorsearch";
// Name of the answer template
$answertemplate "moderatoranswers";
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "18";
 
//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 "Sarah Walker";
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail "1";
 
//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress "webmaster@chuck-boards.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 "0";
 
$errormessage "Thank you for submitting your application. We will let you know if you've made it!"//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 "Moderator Search - Round 2";
 
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "$formtitle";
 
////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////
 
$formpurpose "Please answer all the questions. Read them carefully, then state what you think is wrong with the scenario and provide examples of PMs or posts if necessary.";
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////
 
$longquestion1 "Question 1";
$longexplain1 "Someone has posted in a thread. Their signature contains 5 animated icons with pictures of an upcoming episode.";
 
$longquestion2 "Question 2:";
$longexplain2 "While browsing the boards, you notice the following post in the Couples subforum: plz h3lp me. i w4Nt A cUst0m 4vat4R BuT d0n'T kn0w wh3r3 to Upl04d it. h3lP!";
 
$longquestion3 "Question 3:";
$longexplain3 "A friend of yours PMs you to ask if you could change his/her username to Ellie Bartowski.";
 
$longquestion4 "Question 4:";
$longexplain4 "You come across a minor disagreement between two members but decide to leave them alone and resolve their differences. When you log in the next day, there have been multiple other people jumping in and the whole thread has turned into a fighting arena.";
 
$longquestion5 "Question 5:";
$longexplain5 "You come across a forum that looks like a clone from Chuck Boards - same subforum names, same avatars, same headers.";
 
$longquestion6 "Why me?";
$longexplain6 "Please write a short essay on why we should pick you to become a moderator.";
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////
 
$vbtextquestion "Please write down a paragraph about how you like this forum.";
$vbtextexplain "For example, what makes this forum different from all other forums?";
 
////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////// 
I'd be really grateful if anyknow could tell me what's wrong with this plugin. I didn't change the templates btw. They're still the same as posted above.

Oh, I now get the error message:
PHP Code:
Parse errorsyntax errorunexpected T_CONSTANT_ENCAPSED_STRINGexpecting ')' in /home/schneefl/public_html/chuck-boards.com/newthread.php(71) : eval()'d code on line 38 
Line 38 is the following:
PHP Code:
$longanswer5 $vbulletin->GPC['longanswer5']; 
I believe line 38 that they are talking about is in newthread.php.
Reply With Quote
  #804  
Old 12-17-2007, 10:07 AM
GreysAnatomy's Avatar
GreysAnatomy GreysAnatomy is offline
 
Join Date: May 2005
Location: Chocoland
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't change anything in there at all. But ever since I've modified the customized plugin, the origianl one doesn't work either and keeps giving me the same error message. I think I'm giving up on this hack.
Reply With Quote
  #805  
Old 12-17-2007, 12:10 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GreysAnatomy View Post
This time, I didn't change anything in the lower part of the code and removed all html as well as any special symbols but it still doean't work.
That could be why it does not work. If you added code in the upper part of the plugin then you also have to make sure you added the variables in the lower part.
Reply With Quote
  #806  
Old 12-18-2007, 06:55 PM
zmmmzz zmmmzz is offline
 
Join Date: Nov 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does it work with 3.7???
Reply With Quote
  #807  
Old 12-19-2007, 07:48 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zmmmzz View Post
does it work with 3.7???
Yes it does.
Reply With Quote
  #808  
Old 12-19-2007, 06:53 PM
zmmmzz zmmmzz is offline
 
Join Date: Nov 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woohoo!!! thanks
Reply With Quote
  #809  
Old 12-20-2007, 08:44 AM
theoz1 theoz1 is offline
 
Join Date: Dec 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theoz1 View Post
well it got rid of teh description, im g uessing something needs to be changed in one of these 2 sections?

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
'normalanswer4' => TYPE_STR,
'normalanswer5' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$normalanswer3 = $vbulletin->GPC['normalanswer3'];
$normalanswer4 = $vbulletin->GPC['normalanswer4'];
$normalanswer5 = $vbulletin->GPC['normalanswer5'];
$longanswer1 = $vbulletin->GPC['longanswer1'];


//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What site is this being played on?";
$explain1 = "Please enter the poker site";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your poker account";
$explain2 = "May only use 1 account";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Total Amount of Money";
$explain3 = "Please enter the amount here.";

//Question 4
$question4 = "Number of shares";
$explain4 = "#";

$question5 = "Cost for each share";
$explain5 = "How much is each worth";

been trying to figure out how to do it, but still cant get it.
Reply With Quote
  #810  
Old 12-22-2007, 08:03 AM
shcchief shcchief is offline
 
Join Date: Nov 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I can't get question 4 to come out on the email or the PM.

I do the website for a gaming clan so here is what I believe to be the relevant code:

Code:
<tr>
<td class="alt1" valign="middle">
<b>$question4</b><br />
$explain4</td>
<td class="alt1" valign="middle" colspan="2">
<input type="text" size="30" value="$answer4" name="answer4" /></td>
</tr>
Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'answer4' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'vbtextquestion' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$vbtextanswer  = $vbulletin->GPC['vbtextanswer'];
Code:
//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "What is your Xfire username?";
$explain4 = "Enter your Xfire username.";
As I said it's only question 4 that doesn't get emailed or PM'ed...
Reply With Quote
  #811  
Old 12-22-2007, 05:22 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$answer4 is not a default variable that is included in the hack. Any additional variables that you add you also have to add in the lower part of the plugin.

Look for a code in the lower part of the plugin that looks like this:
Code:
 
    if ($answerall == "1")
    {
        if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == '')
        {
            $errormessage = "$bbuserinfo[username], you need to answer every question!";
            eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
            exit();
        }
You will need to ad the "OR $answer4" in there in the proper format.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06440 seconds
  • Memory Usage 2,431KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (6)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete