vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

GreysAnatomy 12-17-2007 05:59 AM

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']; 


attroll 12-17-2007 06:37 AM

Quote:

Originally Posted by GreysAnatomy (Post 1402670)
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.

GreysAnatomy 12-17-2007 10:07 AM

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. :(

attroll 12-17-2007 12:10 PM

Quote:

Originally Posted by GreysAnatomy (Post 1402730)
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.

zmmmzz 12-18-2007 06:55 PM

does it work with 3.7???

attroll 12-19-2007 07:48 AM

Quote:

Originally Posted by zmmmzz (Post 1403864)
does it work with 3.7???

Yes it does.

zmmmzz 12-19-2007 06:53 PM

woohoo!!! thanks

theoz1 12-20-2007 08:44 AM

Quote:

Originally Posted by theoz1 (Post 1400354)
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.

shcchief 12-22-2007 08:03 AM

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...

attroll 12-22-2007 05:22 PM

$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.

stepdg 12-22-2007 06:38 PM

I *really* like this mod. I have working forms for several different forums. The issue is updating the FORUMDISPLAY.PHP code so that it will use specific URL's with the right form for the right forum. I know I could put a drop-down/select in the form and use the same form for all the forums, but each form is specific to each forum.

Has anyone come up with a way (IF/THEN perhaps) to accomplish this? I've looked around for a hack/mod to make this change from within the VB administrator area but haven't found anything.

Any help would be greatly appreciated!!

shcchief 12-23-2007 04:03 AM

Quote:

Originally Posted by attroll (Post 1406950)
$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.

Thanks mate, I did that but no change.

Any other ideas?

zmmmzz 12-23-2007 05:07 AM

how can I add tags to the form?

xTerMn8R 12-23-2007 05:18 AM

I love this Hack, and gotta say its keeping me busy but the work is paying off big dividends as the site is working great... Very streamlined, and neat with these news integrated Forms.

I do have a question, How can I have the date and time automatically inserted into form like we do for $bbuserinfo[username] stuff?

Thanks again for this GREAT hack...

Tom
www.isrl-simracing.org

attroll 12-23-2007 05:34 AM

Quote:

Originally Posted by shcchief (Post 1407280)
Thanks mate, I did that but no change.

Any other ideas?

Did you also add the variables to your form and formanswers templates?

attroll 12-23-2007 05:36 AM

Quote:

Originally Posted by xTerMn8R (Post 1407305)
I love this Hack, and gotta say its keeping me busy but the work is paying off big dividends as the site is working great... Very streamlined, and neat with these news integrated Forms.

I do have a question, How can I have the date and time automatically inserted into form like we do for $bbuserinfo[username] stuff?

Thanks again for this GREAT hack...

Tom
www.isrl-simracing.org

I am just curious as to why you need this because the date and time are posted in the thread it creates just like when a user creates a thread in the forums.

shcchief 12-23-2007 06:36 AM

Damn, there must be a way to get question 4 to appear in emails/PM's - can't see what I've missed.

attroll 12-23-2007 07:01 AM

Quote:

Originally Posted by shcchief (Post 1407339)
Damn, there must be a way to get question 4 to appear in emails/PM's - can't see what I've missed.

I asked you a question in post #817?

Brundlefly 12-24-2007 12:45 PM

I had a need to create a poll based off the answers provided in the form. Hope this helps someone else.

Below
Code:

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
Add
Code:

if ($checkboxanswer1_1 == '' AND $checkboxanswer1_2 == '' AND $checkboxanswer1_3 == '' AND  $checkboxanswer1_4 == '' AND $checkboxanswer1_5 == '' AND $checkboxanswer1_6 == '' AND $checkboxanswer1_7 == '' AND $checkboxanswer1_8 == '')
                        {
                                $formpoll = "0";
                        }
                        else
                        {
                                $formpoll = "1";
                        }

$polloption[1] = "Poll Option 1";
$polloption[2] = "Poll Option 2";
$polloption[3] = "Poll Option 2";

Remove
Code:

$formforum = "1";
The above creates a poll if the cited checkboxes are checked.

I haven't tried to use this with entry fields as I was using checkboxes which worked quite well. If someone comes up with other variations for this please post. It may come in handy to others.

GPTB 12-28-2007 11:58 AM

This is great and I have this set up so that it automatically makes a post into my moderators-only forum.

However, the threads automatically generated state that they are "Moderated" and so they do not display to all my mods?

Does anyone know why?

afmarko99 01-01-2008 03:51 PM

That is probably a setting for your Moderator forum not necissarily the form hack. Check the forum settings for moderate new posts or something like that.

Spinball 01-02-2008 06:34 PM

Quote:

Originally Posted by attroll (Post 1400363)
Why would someone use double quotes in the thread title anyways?

We have people selling TVs.
42" TV for sale
32" TV For Sale.
It's VERY common and I need to fix it.

Dubi 01-02-2008 06:51 PM

Hi

First of all, thanks for this mod, it's just what I'm looking for.

But the point that would make it perfect for me would be that the generated post were closed automatically.

It's possible to do?

Thanks in advance

shcchief 01-04-2008 06:18 AM

Quote:

Originally Posted by attroll (Post 1407351)
I asked you a question in post #817?

mmm didn't see that one, I figured it out and that was the solution anyway, thanks for your input mate, appreciate it.

fodvapor 01-08-2008 05:53 PM

All i want are 5 questions :

aao username

honor

do you have ventrilo installed with a working mic

previous clans

can you help pay for a server

And i dont want that huge vb text box or the tell us about yourself...any help is appreciated !

Great mod

siliconfinance 01-10-2008 07:38 AM

Is it possible to do multiple polls?

Elenna 01-10-2008 02:23 PM

Quote:

Originally Posted by siliconfinance (Post 1418842)
Is it possible to do multiple polls?

Yes. In the plugin, it states

Quote:

// 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.

YvaN 01-11-2008 01:12 AM

Hi all... :)

I have a problem with this hack, only the preview work : when I click to submit, it's just make a preview, and the reset button don't work... :(


Form hack :

Code:

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

Form template :

Code:

<input type="submit" value="Envoyer" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<input type="submit" value="Pr?visualiser" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<input type="reset" value="Annuler" name="reset" style="font-family: Verdana; font-size: 10pt" class="button" />

PS : sorry for my poor english, but I'm speak only french... ;)

Elenna 01-11-2008 02:32 AM

YvaN,

My buttons work. Here is the code for what I have:
Code:

<input type="submit" value="Submit" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<input type="submit" value="Preview" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<input type="reset" value="Reset" name="reset" style="font-family: Verdana; font-size: 10pt" class="button" />

Try replacing mine with yours to see if it works? Did you maybe change the <form> values?

YvaN 01-11-2008 12:08 PM

Thx Elenna, but I've just translate the value of the buttons... it's the same thing with the buttons in English... :(

What do you say by : "Did you maybe change the <form> values"

Elenna 01-11-2008 12:47 PM

The top of that template should look like this:
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $formtitle</title>
</head>
<body>
$header
$navbar
<!-- main -->
<if condition="$preview">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
 <td class="tcat">
  Preview
 </td>
</tr>
<tr>
 <td class="alt1">
$preview
</td>
</tr>
</table>
</if>
<br />
<form name="vbform" action="newthread.php" method="post"<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
<input type="hidden" value="$formname" name="do" />
<input type="hidden" value="submit" name="action" />
<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />

Do you know if you have changed anything in that section? If something is wrong there, that would cause those buttons to work.

The <form> part is what tells those Submit/Reset buttons what to do. Without the <form> section, those buttons won't do anything.

YvaN 01-11-2008 01:17 PM

I found it! Putting buttons in English, it works now... I don't understand why, but it works ! :D

Someone has a solution to bring them into french?

Dubi 01-11-2008 08:37 PM

Quote:

Originally Posted by YvaN (Post 1419558)
I found it! Putting buttons in English, it works now... I don't understand why, but it works ! :D

Someone has a solution to bring them into french?

Maybe I've the trick, try this:

In template:

PHP Code:

<input type="submit" value="Envoyer" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<
input type="submit" value="Pr?visualiser" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" />
<
input type="reset" value="Annuler" name="reset" style="font-family: Verdana; font-size: 10pt" class="button" /> 

And then in the plugin script find this:

PHP Code:

if ($_POST['submit'] == 'Submit'

and change to...

PHP Code:

if ($_POST['submit'] == 'Envoyer'

I hope that it works for you :rolleyes:

YvaN 01-11-2008 10:10 PM

Big thx Dubi, all works now... :)

zmmmzz 01-12-2008 01:32 AM

is there a way to add tags from the form???

Elenna 01-12-2008 04:41 AM

How do you mean, Zmmmzz? Can you give an example?

killugood9000 01-12-2008 07:23 PM

Hi ive been using this hack for dome time and love it. Our gaming clan uses it for applications and its set to post to forum that our registered users can and cannot see. I want to try to get one application to post to more than one forum. I have searched this thread and cannot find any option for this. Could someone tell me what the variables should look like for this to happen or mabey point me to a thread that has already answered this question. Million thanks and great Mod.

Elenna 01-13-2008 05:12 PM

I haven't tried this yet - anyone know if this can post to a forum that the user doesn't have access to? i.e. Reporting bad behavior goes into a non-public forum that only admins can see?

nothing4me 01-13-2008 09:00 PM

Is there a way to require attachments? Like force a user to upload one?

z0diac 01-13-2008 10:10 PM

I'm sure I'm just not seeing things properly, but I've imported the xml file and can't find where to configure this product, or where it shows up in my forum for people to use.

??


All times are GMT. The time now is 10:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02943 seconds
  • Memory Usage 2,024KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (9)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete