PDA

View Full Version : New Posting Features - Form Hack


Pages : 1 2 3 [4] 5 6

PH03N1X
11-25-2007, 05:38 AM
Oi mate, you really gotta make thsi hack easier to work with, maybe a bit normal.. lol

sbkp
11-29-2007, 04:09 PM
I haven't been able to find what I'm looking for in the 51 pages of comments here, so I'll post: Is there a way to put this form in a thread? I'd like to have a sticky thread with a few links for online support resources, and then right there in the post, the form to request support. I'm not familiar enough with vBulletin (or certainly this mod) to determine if Form Hack can do such a thing.

Thanks.

Brundlefly
12-02-2007, 10:47 AM
I haven't been able to find what I'm looking for in the 51 pages of comments here, so I'll post: Is there a way to put this form in a thread? I'd like to have a sticky thread with a few links for online support resources, and then right there in the post, the form to request support. I'm not familiar enough with vBulletin (or certainly this mod) to determine if Form Hack can do such a thing.

Thanks.

Perhaps editing the forum properties will get you close to what you want.

Goto:
Forums and Moderators
Forum Manager
Click to edit the forum
Enter the form URL using Forum Link

theoz1
12-06-2007, 04:42 AM
I cant get this thing to make a thread. i followed i think page 10 and put this under Forum display
<if condition="$foruminfo[forumid] == 16">
<!-- controls above thread list -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?do=form" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above thread list -->
</if>

when i make the form it says the right message but doesnt post anywhere. Someone please help me

attroll
12-06-2007, 06:04 AM
First you either create a forum or use an existing forum
Find out the ID of the forum
go into your Plugins & Products
Edit the Plugin
Scroll down through the plugin code until you find $formforumid = "16"; and replace 16 with your forum ID you want the form to be posted in.

jwocky
12-06-2007, 06:22 PM
Ive installed this hack and its great, but the vb editor box doesnt show the icon for the attachment manager (to easily place attachments inline with the text of the post)

Anyone else notice this or have this issue ?

theoz1
12-07-2007, 02:10 PM
First you either create a forum or use an existing forum
Find out the ID of the forum
go into your Plugins & Products
Edit the Plugin
Scroll down through the plugin code until you find $formforumid = "16"; and replace 16 with your forum ID you want the form to be posted in.

Yea I did that, this is my coding, I havent changed any of the coding.

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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,5,6,7,11,12))) 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 = "form";
// Name of the answer template
$answertemplate = "formanswers";

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

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

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

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

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

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

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

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



////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Your BAP has been submitted, make sure you have sent your BAP fee."; //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 = "2";

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

$formtitle = "BAP Form";

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

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

$formpurpose = "Complete the form in order to put up a BAP. You must send the BAP fee before this will be posted.";

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

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

$normalquestion1 = "Title for you BAP";

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "All information you are wanting put down.";
$vbtextexplain = "For example, Why people should by your shares, stats, etc";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

attroll
12-08-2007, 06:12 AM
Yea I did that, this is my coding, I havent changed any of the coding.

In this forum you have titled "Buy a Piece" with a forum id of 16 do you have the forum permissions set for each user group so that they are allowed to post new threads to this forum?

theoz1
12-08-2007, 07:19 AM
Yea, but it has to be accepted by a mod before it will show up. I also have the new thread link directed to where it will go str8 to the form page and than Im wanting it to be posted in that forum.

atomhead
12-08-2007, 03:04 PM
This is awesome but it would be even awesomer :) if these things could be modified through the ACP rather than within the code.

attroll
12-08-2007, 11:27 PM
Yea, but it has to be accepted by a mod before it will show up. I also have the new thread link directed to where it will go str8 to the form page and than Im wanting it to be posted in that forum.
I think the problem is that with this hack it will not let you post to the moderation que. You have to either have it post without moderation of it will not post at all. There are some work around for this that you could so though.

TheHeartSmasher
12-08-2007, 11:32 PM
Can this be made into a more customizable, user friendly plugin which allows multiple forms to be posted in in separate forums?

theoz1
12-09-2007, 07:15 AM
Still doesnt work even though I took it off of moderation que. Do I need to edit any coding in my admin cp?

xTerMn8R
12-09-2007, 02:36 PM
Will this hack work in vb 3.5.4... Man this is exactly what I've been looking for for days....

Please please please work with 3.5.4 (fingers crossed as I kneel and PRAY....)

attroll
12-09-2007, 02:41 PM
Still doesnt work even though I took it off of moderation que. Do I need to edit any coding in my admin cp?
Did you set up your template "formanswers"?

xTerMn8R
12-09-2007, 03:43 PM
Mine not working either .. .getting the following error

Invalid Forum specified. If you followed a valid link, please notify the administrator

I put the forum ID in and actually set to it NOT to post to thread...

I'll keep poking away at it

xTerMn8R
12-09-2007, 04:16 PM
Sorry! This forum is not accepting new posts.

I uninstalled the product to insure I didnt mess up the code and reinstalled.

The only thing I've changed in the plugin hook is to e-mail and PM the form all other options Forum, Post, attachments etc... are set to "0"

Man I knew this was to good to be true...

ANY and alll help deeply appreciated

thank you
Tom

I really wanna click that Installed button and if this works you DEFINITLY get my Nom of the month Vote

attroll
12-09-2007, 04:25 PM
Sorry! This forum is not accepting new posts.

I uninstalled the product to insure I didnt mess up the code and reinstalled.

The only thing I've changed in the plugin hook is to e-mail and PM the form all other options Forum, Post, attachments etc... are set to "0"

Man I knew this was to good to be true...

ANY and alll help deeply appreciated

thank you
Tom

I really wanna click that Installed button and if this works you DEFINITLY get my Nom of the month Vote
It will work. Did you read this post https://vborg.vbsupport.ru/showpost.php?p=1396000&postcount=757.

xTerMn8R
12-09-2007, 06:54 PM
Yup I had done all that but still wasnt working ... turns out I went and got version 3.5 for vb 3.5.4 which is what I'm running and it still wouldnt work...

:) But I fixed it ... there was a conflict with another product Name "contracts", once i disabled it she came right up ... Nowwwwwwwww will version 4.0 work in 3.5.4 that is the question...

:) I'm Nominating this for MOTM even if this ver doesnt work on my Vb cause this 1 of the best hacks I've seen for vB and has made my Life extremely easier now...

Thanks so much to ABE for this Great Project... and to all who help support it as well...

Thumbs Up Guys...

Tom

theoz1
12-10-2007, 03:41 AM
Did you set up your template "formanswers"?

Well this is what it has:

$formtitle
$bbuserinfo[username]

$normalquestion1
$normalanswer1

$normalquestion2
$normalanswer2

$normalquestion3
$normalanswer3

$normalquestion4
$normalanswer4

$normalquestion5
$normalanswer5

$normalquestion6
$normalanswer6

------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------

attroll
12-10-2007, 04:05 AM
Well this is what it has:

$formtitle
$bbuserinfo[username]

------------------------------------------------------
Let me ask you a question.

Did you try using this and seeing if it worked before you make any modifications to the files?

Or did you install it and start moding the hack right away before making sure it worked?

I am just asking this to try to narrow down what it might be.

theoz1
12-10-2007, 06:57 AM
modifications first.

theoz1
12-10-2007, 07:00 AM
should I go ahead and reinstall it and try it out?

attroll
12-10-2007, 07:13 AM
should I go ahead and reinstall it and try it out?
What have you got to lose because it is not working now.

First I would uninstall it the proper way.

Then I would reinstall it and the only think I would double check before trying it, is to make sure the forum ID is a valid forum. I would make the forum ID a starndard forum to start with, one that everyone had access to and can post to.

Then I would try and see if it works.

If it works then it is something in one of your setting or something you did when doing modifications to the hack.

If it does not work I would do the same things that xTerMn8R did and disable each one of your plugins one at a time and try it is time to see if it starts working. This will let you know if another plugin is causing the problem.

theoz1
12-10-2007, 09:26 AM
Alright, well I want to first tell you how much I appreciate your help attroll. I reinstalled it and it worked. It even worked with it having to be verified by a mod. So I went ahead and changed some of the questions and did everything like i did before, and it stopped working after making changes to these parts: ( I had added a question 4 and 5 but deleted it after it stopped working, but still no luck.) Its pretty late here right now, so ill prob. reinstall it again and save it for each line I change until I find the problem.

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "male";
$dropdownchoice1c = "female";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "All the information you are wanting put down.";
$vbtextexplain = "For example, Why people should by your shares, stats, etc.";

xTerMn8R
12-10-2007, 02:39 PM
If you add a question you will need to add the varibles for it in part 1 and 2 of the Hook, Just copy the varibles of the question ya copied and paste them back in and make the #change on the end. ie.. 'question1' /'answer1' --->'question2'/'answer2'

Then you need to adjust the formanswer template to contain the Varibles.

Then goto the form Template and add/Remove the table content to the form

Form Template = Whats DISPLAYED (The Page Layout)

Form Answers= Declares answer varibles

What I did was make a copy of the plugin, disabled it, and kept it as a backup of the original before i started choppin up the code, Ya also may want to Copy the original code from plugin and temlplates and paste it in a txt file and print it before ya chop... As mine was progressing thats what I did. I did 1 thing at a time and then test , then another thing... then test thats how I got mine working .. . Now my code is stripped out and clean and very easy to understand.

BTW this is my favorite Hack...

Good Luck
Termi
www.superskunkracing.org

xTerMn8R
12-11-2007, 11:21 PM
I've installed it and everything works perfect on the default install with NO changes, but as soon as I set "Answer all to "1" it tells me I have to answer all the question before i can submit but they are all answered.. Does the same thing with My form and I have totally seperate Templates and Plugin Code (Varibles, Questions etc... ) I have printed the originals and mine and compared everything and I dont know whats wrong here...


Thx in advance for any and all help

Tom:(

attroll
12-12-2007, 03:01 AM
I believe you have to remove all the variables further down in the plugin that you are not using. The reason is because it is looking for these questions to be answered. This is just my guess.

This is what my variable look like thaat i am referring to:
if ($normalanswer1 == '' OR $normalanswer2 == '' OR $normalanswer3 == '' OR $normalanswer4 == '' OR $normalanswer5 == '' OR $normalanswer6 == '' OR $normalanswer7 == '' OR $normalanswer8 == '' OR $normalanswer9 == '' OR $normalanswer10 == '' OR $normalanswer11 == '' OR $normalanswer12 == '' OR $normalanswer13 == '' OR $normalanswer14 == '' OR $normalanswer15 == '' OR $normalanswer16 == '' OR $normalanswer17 == '' OR $normalanswer18 == '' OR $normalanswer19 == '' OR $normalanswer20 == '' OR $normalanswer21 == '' OR $normalanswer22 == '' OR $normalanswer23 == '' OR $normalanswer24 == '' OR $normalanswer25 == '' OR $normalanswer26 == '' OR $normalanswer27 == '' OR $normalanswer28 == '' OR $normalanswer29 == '' OR $normalanswer30 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3 AND $checkboxchoice1_4 AND $checkboxchoice1_5 AND $checkboxchoice1_6 AND $checkboxchoice1_7 AND $checkboxchoice1_8 AND $checkboxchoice1_9 AND $checkboxchoice1_10 AND $checkboxchoice1_11 AND $checkboxchoice1_12 AND $checkboxchoice1_13 AND $checkboxchoice1_14 AND $checkboxchoice1_15 AND $checkboxchoice1_16 AND $checkboxchoice1_17 AND $checkboxchoice1_18 AND $checkboxchoice1_19 AND $checkboxchoice1_20 AND $checkboxchoice1_21 AND $checkboxchoice1_22 AND $checkboxchoice1_23 AND $checkboxchoice1_24 AND $checkboxchoice1_25 AND $checkboxchoice1_26 AND $checkboxchoice1_27 AND $checkboxchoice1_28 AND $checkboxchoice1_29 AND $checkboxchoice1_30 AND $checkboxchoice1_31 AND $checkboxchoice1_32 AND $checkboxchoice1_33 AND $checkboxchoice1_34 AND $checkboxchoice1_35 AND $checkboxchoice1_36 AND $checkboxchoice1_37 AND $checkboxchoice1_38 AND $checkboxchoice1_39 AND $checkboxchoice1_40 AND $checkboxchoice1_41 AND $checkboxchoice1_42 AND $checkboxchoice1_43 AND $checkboxchoice1_44 AND $checkboxchoice1_45 AND $checkboxchoice1_46 AND $checkboxchoice1_47 AND $checkboxchoice1_48 AND $checkboxchoice1_49 AND $checkboxchoice1_50) OR $longanswer1 == '')

xTerMn8R
12-12-2007, 05:14 AM
Yeah I did that ....

theoz1
12-12-2007, 07:44 AM
WOOT found the problem, except theres been one other problem all along. Hopefully this should be very simple. Thanks in advance and for everything so far :).

This is the first coding:
// 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'];

than this is the questions and answers

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

and after filling out a form I get this, w/o the questions:
BAP Form
pokermainstream

BAP Title
test1111
















------------------------------------------------------
All information you are wanting put down.

test

xTerMn8R
12-12-2007, 02:50 PM
Well I've gotten real good at making forms but I'm having a lot of troubles with my SUBMIT options (redirect)

When I choose 0 it just sends me to a Thankyou mesage and just sits there. which is great cause I want to thank my users for taking the time to fill out the form But I need my forms to call another form upon submitting as well. My forms get posted in a Forum that users dont have permissions to View (can Post and thats working fine)

What i'd like to see happen is that the Thank you comes up for say 10 seconds then they get re-directed to another form.

Here's my work flow...

1) First form "Age verification" ------> upon submitting (pm me, Post to forum, and redirect to next form)-------> "Application Form". -------->upon submitting (pm me, Post to forum, and redirect to next form)----------> Pricing and details--------------->upon submitting (Pm Me Post to forum and return to forum Home Page)

the Pms and Post are already working fine its just the re-direct that doesnt seem to work for me and as soon as I try messing with that code it give me the Ole "Invalid Forum Link or summin"

Man I've been up till 5am 3 days in a row working with this Can someone PLEASE help me out ...

I love the hack just wish it was a bit more flexable in the submit area...

Thanks to everyone for again for any and ALL help

Peace out...
Tom

xTerMn8R
12-12-2007, 03:34 PM
Ok I got it found a URL redirect post here...

https://vborg.vbsupport.ru/showthread.php?p=1204796&highlight=redirect#post1204796

that helped ...

Thanks a million MilkCarton ^5

attroll
12-12-2007, 04:17 PM
WOOT found the problem, except theres been one other problem all along. Hopefully this should be very simple. Thanks in advance and for everything so far :).


and after filling out a form I get this, w/o the questions:
BAP Form
pokermainstream

BAP Title
test1111

------------------------------------------------------
All information you are wanting put down.

test

It sounds like you neeed to edit the template called "formanswers" and add those variables in there.

atomhead
12-13-2007, 12:40 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=150424" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=150424</a> >

theoz1
12-13-2007, 06:02 AM
not sure whats wrong but i keep messing wtih it, and it either just starts saying normalquestion1 or it doesnt say anything. It also has the instruction part underneath it.

Preview
BAP Form
pokermainstream

BAP Title
asdf

What site is this being played on?
Please enter the poker site

What is your poker account
May only use 1 account

Total Amount of Money
Please enter the amount here.

Number of shares
#

Cost for each share
How much is each worth

------------------------------------------------------
All information you are wanting put down.

asf

coding:
$formtitle
$bbuserinfo[username]

$normalquestion1
$normalanswer1

$normalquestion2
$normalanswer2

$normalquestion3
$normalanswer3

$normalquestion4
$normalanswer4

$normalquestion5
$normalanswer5

$normalquestion6
$normalanswer6

$question1
$explain1

$question2
$explain2

$question3
$explain3

$question4
$explain4

$question5
$explain5

------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------

attroll
12-13-2007, 06:46 AM
not sure whats wrong but i keep messing wtih it, and it either just starts saying normalquestion1 or it doesnt say anything. It also has the instruction part underneath it.
$question1
$explain1

$question2
$explain2

$question3
$explain3

$question4
$explain4

$question5
$explain5

------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------

That is because your doing it wrong. You using question and explain variables. You suppose to use question and answer variables like this:


$question1
$answer1

$question2
$answer2

$question3
$answer3

theoz1
12-13-2007, 07:37 AM
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";

Spinball
12-13-2007, 07:47 AM
Folks, I have a problem with quotes in this hack.
If someone uses a double quote in the thread title, the text is truncated at the point of the quote.
If I put the php function addslashes in there, the slash appears in the resulting thread.
Anyone had a problem like this and found a solution?

attroll
12-13-2007, 08:00 AM
Folks, I have a problem with quotes in this hack.
If someone uses a double quote in the thread title, the text is truncated at the point of the quote.
If I put the php function addslashes in there, the slash appears in the resulting thread.
Anyone had a problem like this and found a solution?
Why would someone use double quotes in the thread title anyways?

xTerMn8R
12-15-2007, 05:05 AM
Hey folks,
Anyone know how to extract the users listed e-mail addy like we do the "username" automatically onto a form?
Thanks
Tom

zmmmzz
12-15-2007, 06:25 PM
will this hack work with 3.7 beta 2?

JokeAss
12-15-2007, 06:50 PM
Great addon!

Too bad it doesn't have a flashy GUI to design forms :p

GreysAnatomy
12-16-2007, 05:28 PM
I've managed to install everything but something's still not working and I can't figure out why. It creates a new thread in the proper subfourm but it lists all answers under the first question and after that, it lists questions 2-6.

I'm using 6 long questions and the following is my answers template:

$formtitle
$bbuserinfo[username]


-----------------------------------------------------
$longquestion1

$longanswer1


$longquestion2

$longanswer2


$longquestion3

$longanswer3


$longquestion4

$longanswer4


$longquestion5

$longanswer5


$longquestion6

$longanswer6

------------------------------------------------------

Does anyone know what I'm doing wrong here?

attroll
12-16-2007, 06:00 PM
I've managed to install everything but something's still not working and I can't figure out why. It creates a new thread in the proper subfourm but it lists all answers under the first question and after that, it lists questions 2-6.

I'm using 6 long questions and the following is my answers template:

Does anyone know what I'm doing wrong here?

It is hard to isolate and help without seeing all your code. It looks like it should be working correctly.

The answers template looks right and it should be working correctly as long at you have your plugin set up right.

A lot of people make the mistake when editing there plugin and thinking that only have to edit Part 1 and Part 2 of the plugin code. But they also have to edit and add code below this line:

if ($answerall == "1")

GreysAnatomy
12-16-2007, 06:46 PM
The following is the second part of my plugin code:
// ################################################## #####################\
// ######################## START MAIN SCRIPT ############################\
// ################################################## #####################\
if ($_REQUEST['action'] == '')\
\{\
$_REQUEST['action'] = "form";\
\}\
\
\
$bbuserinfo = $vbulletin->userinfo;\
\
// start navbar\
$navbits = array();\
$navbits['newthread.php?' . $vbulletin->session->vars['sessionurl'] . "do=$formname"] = $formtitle;\
\
$navbits = construct_navbits($navbits);\
eval('$navbar = "' . fetch_template('navbar') . '";');\
\
if ($_REQUEST['action'] == "submit")\
\{\
\
if ($answerall == "1")\
\{\
if ($longanswer1 == '' OR $longanswer2 == '' OR $longanswer3 == '' OR $longanswer4 == '' OR $longanswer5 == '' OR $longanswer6 == '')\
\{\
$errormessage = "$bbuserinfo[username], you need to answer every question!";\
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');\
exit();\
\}\
\}\
\
$vbulletin->input->clean_array_gpc('p', array(\
'wysiwyg' => TYPE_BOOL,\
'message' => TYPE_STR\
));\
\
if ($vbulletin->GPC['wysiwyg'])\
\{\
require_once(DIR . '/includes/functions_wysiwyg.php');\
$vbtextanswer = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);\
\}\
else\
\{\
$vbtextanswer =& $vbulletin->GPC['message'];\
\}\
\
eval('$formsend = "' . fetch_template("$answertemplate") . '";');\
\
$posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);\
$poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_UINT);\
\
if ($_POST['submit'] == 'Submit')\
\{\
if ($formforum == "1")\
\{\
$foruminfo = verify_id('forum', $formforumid, 0, 1);\
$forumperms = fetch_permissions($foruminfo[forumid]);\
$newpost['username'] =& $vbulletin->userinfo['username'];\
$newpost['message'] =& $formsend;\
$newpost['title'] =& $posttitle;\
$newpost['parseurl'] = '1';\
$newpost['poststarttime'] = $poststarttime;\
$newpost['posthash'] = $posthash;\
\
if ($vbulletin->userinfo['autosubscribe'] != -1)\
\{\
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];\
\}\
else\
\{\
$newpost['emailupdate'] = 9999;\
\}\
\
if ($vbulletin->userinfo['signature'] != '')\
\{\
$newpost['signature'] = '1';\
\}\
else\
\{\
$newpost['signature'] = '0';\
\}\
\
build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);\
\
if ($formpoll == "1")\
\{\
$threadinfo = verify_id('thread', $newpost[threadid], 0, 1);\
$polloptions = count($polloption);\
$question = $posttitle;\
$vbulletin->GPC['options'] = $polloption;\
\
$counter = 0;\
$optioncount = 0;\
$badoption = '';\
while ($counter++ < $polloptions)\
\{ // 0..Pollnum-1 we want, as arrays start with 0\
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])\
\{\
$badoption .= iif($badoption, ', ') . $counter;\
\}\
if (!empty($vbulletin->GPC['options']["$counter"]))\
\{\
$optioncount++;\
\}\
\}\
\
// Add the poll\
$poll =& datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);\
\
$counter = 0;\
while ($counter++ < $polloptions)\
\{\
if ($vbulletin->GPC['options']["$counter"] != '')\
\{\
$poll->set_option($vbulletin->GPC['options']["$counter"]);\
\}\
\}\
\
$poll->set('question', $question);\
$poll->set('dateline', TIMENOW);\
$poll->set('active', '1');\
$poll->set('public', $pollpublic);\
\
$pollid = $poll->save();\
//end create new poll\
\
// update thread\
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');\
$threadman->set_existing($threadinfo);\
$threadman->set('pollid', $pollid);\
$threadman->save();\
\}\
\}\
\
if ($formreply == "1")\
\{\
$threadinfo = verify_id('thread', $formreplythreadid, 0, 1);\
$forumperms = fetch_permissions($threadinfo[forumid]);\
$newpost['username'] =& $vbulletin->userinfo['username'];\
$newpost['message'] =& $formsend;\
$newpost['title'] =& $posttitle;\
$newpost['parseurl'] = "1";\
$newpost['poststarttime'] = $poststarttime;\
$newpost['posthash'] = $posthash;\
\
if ($vbulletin->userinfo['autosubscribe'] != -1)\
\{\
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];\
\}\
else\
\{\
$newpost['emailupdate'] = 9999;\
\}\
\
if ($vbulletin->userinfo['signature'] != '')\
\{\
$newpost['signature'] = '1';\
\}\
else\
\{\
$newpost['signature'] = '0';\
\}\
\
build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);\
\}\
\
if ($formpm == "1")\
\{\
$vbulletin->GPC['message'] =& $formsend;\
$vbulletin->GPC['title'] =& $posttitle;\
$vbulletin->GPC['recipients'] =& $formpmname;\
\
$pm['message'] =& $vbulletin->GPC['message'];\
$pm['title'] =& $vbulletin->GPC['title'];\
$pm['recipients'] =& $vbulletin->GPC['recipients'];\
\
// create the DM to do error checking and insert the new PM\
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);\
\
$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);\
$pmdm->set('fromusername', $vbulletin->userinfo['username']);\
$pmdm->setr('title', $pm['title']);\
$pmdm->setr('message', $pm['message']);\
$pmdm->set_recipients($pm['recipients'], $permissions);\
$pmdm->set('dateline', TIMENOW);\
\
// everything's good!\
$pmdm->save();\
\}\
\
if ($formemail == "1")\
\{\
require_once(DIR . '/includes/class_bbcode_alt.php');\
$plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());\
$plaintext_parser->set_parsing_language($touserinfo['languageid']);\
$formsend = $plaintext_parser->parse($formsend);\
\
$emails = explode(';', $formemailaddress);\
foreach ($emails AS $email)\
\{\
vbmail($email, $posttitle, $formsend);\
\}\
\}\
\
if ($redirectoption == "1")\
\{\
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";\
eval(print_standard_redirect('redirect_postthanks' ));\
exit();\
\}\
if ($redirectoption == "2")\
\{\
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]";\
eval(print_standard_redirect('redirect_postthanks' ));\
exit();\
\}\
if ($redirectoption == "3")\
\{\
$vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]";\
eval(print_standard_redirect('redirect_postthanks' ));\
exit();\
\}\
if ($redirectoption == "4")\
\{\
$vbulletin->url = 'editpost.php?do=editpost&' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";\
eval(print_standard_redirect('redirect_postthanks' ));\
exit();\
\}\
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');\
exit();\
\}\
else\
\{\
require_once('./includes/class_bbcode.php');\
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());\
$preview = $parser->do_parse($formsend);\
\
$_REQUEST['action'] = 'form';\
\}\
\}\
\
if ($_REQUEST['action'] == 'form')\
\{\
if (($formforum OR $formreply) AND $allow_attachments)\
\{\
if ($formforum AND $formreply)\
\{\
$forumid = $formforumid;\
\}\
else if ($formreply)\
\{\
$threadid = $formreplythreadid;\
$threadinfo = verify_id('thread', $threadid, 0, 1);\
$forumid = $threadinfo[forumid];\
\}\
else\
\{\
$forumid = $formforumid;\
\}\
\
$forumperms = fetch_permissions($forumid);\
\
// get attachment options\
require_once(DIR . '/includes/functions_file.php');\
$inimaxattach = fetch_max_upload_size();\
\
$maxattachsize = vb_number_format($inimaxattach, 1, true);\
$attachcount = 0;\
$attach_editor = array();\
$attachment_js = '';\
\
if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))\
\{\
if (!$posthash OR !$poststarttime)\
\{\
$poststarttime = TIMENOW;\
$posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);\
\}\
else\
\{\
if (empty($postattach))\
\{\
$currentattaches = $db->query_read("\
SELECT dateline, filename, filesize, attachmentid\
FROM " . TABLE_PREFIX . "attachment\
WHERE posthash = '" . $db->escape_string($posthash) . "'\
AND userid = " . $vbulletin->userinfo['userid']\
);\
\
while ($attach = $db->fetch_array($currentattaches))\
\{\
$postattach["$attach[attachmentid]"] = $attach;\
\}\
\}\
\
if (!empty($postattach))\
\{\
foreach($postattach AS $attachmentid => $attach)\
\{\
$attach['extension'] = strtolower(file_extension($attach['filename']));\
$attach['filename'] = htmlspecialchars_uni($attach['filename']);\
$attach['filesize'] = vb_number_format($attach['filesize'], 1, true);\
$attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif";\
$show['attachmentlist'] = true;\
eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";');\
\
$attachment_js .= construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], $attach['extension']);\
\
$attach_editor["$attachmentid"] = $attach['filename'];\
\}\
\}\
\}\
\
if ($threadid)\
\{\
$attachurl = "t=$threadid";\
\}\
else\
\{\
$attachurl = "f=$forumid"; \
\}\
$newpost_attachmentbit = prepare_newpost_attachmentbit();\
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');\
\
if ($threadid)\
\{\
$attach_editor['hash'] = $threadid;\
$attach_editor['url'] = "newattachment.php?$session[sessionurl]t=$threadid&amp;poststarttime=$poststarttime&amp;posthash= $posthash";\
\}\
else\
\{\
$attach_editor['hash'] = $forumid;\
$attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$forumid&amp;poststarttime=$poststarttime&amp;posthash=$ posthash"; \
\}\
\}\
else\
\{\
$attachmentoption = '';\
\}\
\}\
else\
\{\
$attachmentoption = '';\
\}\
\
// set message box width to usercp size\
$stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];\
$editorid = construct_edit_toolbar($vbtextanswer);\
\
eval('print_output("' . fetch_template("$maintemplate") . '");');\
\}\
\}}

GreysAnatomy
12-16-2007, 06:47 PM
...and the first one:
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww 13320\viewh14520\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3 920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \pardirnatural

\f0\fs24 \cf0 // 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(2,5,6,7))) 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 = "20";\
\
////////////////////////////////////////////////////////////////////////////////////////////////////\
\
//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 = "1";\
\
////////////////////////////////////////////////////////////////////////////////////////////////////\
\
\
\
////////////////////////////////////////////////////////////////////////////////////////////////////\
//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 <strong>Couples</strong> subforum:<br/>\
<i>plz h3lp me. i w4Nt A cUst0m 4vat4R BuT d0n'T kn0w wh3r3 to Upl04d it. h3lP!</i>.";\
\
$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.";\
\
////////////////////////////////////////////////////////////////////////////////////////////////////\
\
////////////////////////////////////////////////////////////////////////////////////////////////\
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////\
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////\
////////////////////////////////////////////////////////////////////////////////////////////////////\
////////////////////////////////////////////////////////////////////////////////////////////////////\
\

attroll
12-16-2007, 07:21 PM
...and the first one:

What is all this code at the beginning

{rtf1macansicpg10000cocoartf824cocoasubrtf440
{fonttblf0fswissfcharset77 Helvetica;}
{colortbl;red255green255blue255;}
paperw11900paperh16840margl1440margr1440vieww13320 viewh14520viewkind0
pardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx448 0tx5040tx5600tx6160tx6720qlqnaturalpardirnatural
f0fs24 cf0

I would remove that code if it is in there and try it again.

Could you post a sample of the thread contant that it it posting?

attroll
12-16-2007, 07:44 PM
GreysAnatomy

It might also have something to do with putting html in this line of cose in you plugin:

$longexplain2 = "While browsing the boards, you notice the following post in the <strong>Couples</strong> subforum:<br/>\
<i>plz h3lp me. i w4Nt A cUst0m 4vat4R BuT d0n'T kn0w wh3r3 to Upl04d it. h3lP!</i>.";

GreysAnatomy
12-17-2007, 04:05 AM
I have no idea where the first few lines come from, I think it has something to do with TextEdit, where I c&p the whole thing.

I'll remove the html though. I can't believe I didn't think of that myself. Thank you! :D


ETA: I've removed the html code and something changed, but not like I wanted it to. It now submits the answer of question 6 to where number 1 should be and answers 1-5 get completely lost on the way to the thread.

attroll
12-17-2007, 04:30 AM
I have no idea where the first few lines come from, I think it has something to do with TextEdit, where I c&p the whole thing.

I'll remove the html though. I can't believe I didn't think of that myself. Thank you! :D


ETA: I've removed the html code and something changed, but not like I wanted it to. It now submits the answer of question 6 to where number 1 should be and answers 1-5 get completely lost on the way to the thread.
That tells you that something is messed up in the plugin edits that youd did.

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.

// 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:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/schneefl/public_html/chuck-boards.com/newthread.php(71) : eval()'d code on line 38

Line 38 is the following:
$longanswer5 = $vbulletin->GPC['longanswer5'];

attroll
12-17-2007, 06:37 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.

// 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:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/schneefl/public_html/chuck-boards.com/newthread.php(71) : eval()'d code on line 38

Line 38 is the following:
$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
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
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
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:

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

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


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

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

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
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
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 (http://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
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
//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no

Add
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
$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
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
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
Is it possible to do multiple polls?

Yes. In the plugin, it states


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

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

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

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


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

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

and change to...

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.

??

z0diac
01-13-2008, 10:14 PM
Ok nevermind. Looks like I have to go into config and start editing code to change forms. ('thought it was a plugin that would give forum members the option of creating their own forms when creating a new thread - just like a poll almost). Oh well, thanks anyway.

sweede
01-17-2008, 04:03 AM
I don't suppose anyone has taken this mod and changed it so that instead of creating a reply to an existing thread, it adds the text of the submited form to the begining or end of an existing thread ?

attroll
01-17-2008, 05:29 AM
I don't suppose anyone has taken this mod and changed it so that instead of creating a reply to an existing thread, it adds the text of the submited form to the begining or end of an existing thread ?

I think it can be done by changing this section in you plugin but I am not sure.
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

nothing4me
01-17-2008, 05:52 PM
Is there a way to require attachments? Like force a user to upload one?:( Anyone?

sweede
01-18-2008, 04:21 AM
I think it can be done by changing this section in you plugin but I am not sure.
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";



Not quite. i don't want to add a new post to a thread. I want to have a post with some text

- This is the text -

and someone uses the form and in the form they enter "more text" , it updates the post and it now looks like

- This is the text -
more text

and so on.

MikeH2911
01-19-2008, 06:54 PM
Ok, I love this hack, tried searching the thread but no joy in finding the answer to this question.

I've got two forms, but can find only one pair of templates to edit, the forms seem to require different templates but I can only find the one pair.

My question is, how do i edit the templates for two forms that need to look differnt if there is only one pair of templates? I'm sure I've missed something somewhere.... any help?

EDIT, scrap that question, you need to create custom templates and do it that way. Might be nice if that info were added in the very beginning of the hacks instructions as Ive seen a number of posts in this thread asking similar questions :)

Very cool hack :)

Mike

shadowbreed
01-20-2008, 04:46 AM
Anyone have any idea on how to disable the smilies field completely from the form?

I have some smilies that cause an error if they are used when submitting the form, and it doesn't really need smilies so i'd rather have the entire box with smilies gone.

Elenna
01-20-2008, 01:20 PM
I believe it is under Forum Permissions - th ere are options for allowing Post Icons and Smilies. Set Smilies to 'No' for the forum you have it posting in to.

shadowbreed
01-21-2008, 01:14 AM
Unfortunately that only seems to remove the parsing of the smilies.

It leaves the box in the form :S

It does seem to remove the error, so it's at least useable now :), but it would be nice to just completely remove it somehow.

ang2el
01-21-2008, 02:59 AM
I installed the product according to the instruction

1 - Import the xml into products. (admin cp -> Plugin System -> Manage Products -> Add/Import Product)

I did this

2 - Edit the main hook (plug-in) - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

I don't know where to do this

3 - To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

I tried mysite/newthread.php?=form it displayed nothing.



My question is where to look for form option after importing the product? I mean after this

1 - Import the xml into products. (admin cp -> Plugin System -> Manage Products -> Add/Import Product)



I lost and uninstall the product.

Elenna
01-21-2008, 04:48 AM
Unfortunately that only seems to remove the parsing of the smilies.

It leaves the box in the form :S

It does seem to remove the error, so it's at least useable now :), but it would be nice to just completely remove it somehow.

Ahhh. I don't remember where, but I think there was "somewhere" that you could turn off the box as well. I did it on one of my sites, but I might have just edited the template?! I'll see if I can figure it out and let you know!

UPDATE: I found the global option under vB Options> Message Posting Interface Options. To completely remove the box, set the second option to 0. If you wanted to do this per-forum, I suppose you'd need to edit the Quick Reply and New Reply templates to not display the smilies box in that forum. Do a quick search for vB Conditionals if you're not sure how to do that.

curse-1
01-21-2008, 06:43 PM
Hello my English is not very good, but I try anyway.
My problem:

I have 6-response capabilities. However, the design is not true. Where can I change?
Look here:

attroll
01-22-2008, 03:38 AM
You can change the user input and layout look for the inputs in the template "forum".

You can change how they are displayed in the thread in which they are posted in the template "forumanswers".

gdavis480
01-22-2008, 03:53 AM
Hi editted the form hack to my questions but when I turn on the require all fields and test it. its says I missed some fields even though I filled it all out.

could you help fix it. If so here a copy of the editted form in the attachment

thanks inadvanced

curse-1
01-22-2008, 04:35 AM
You can change the user input and layout look for the inputs in the template "forum".

You can change how they are displayed in the thread in which they are posted in the template "forumanswers".

Hi attroll,

first thanks for the quick response. But I have already tried everything to the order of the display. However, the points 1-6 not consecutive. Can you tell me exactly what I need to edit?

theoz1
01-22-2008, 04:39 AM
Been trying to figure this out for awhile now. Currently I have 5 things I want posted but only 3 of them are showing up and the number 5 question's answer is showing up for the number 3's answer. I preview the forms before posting them to test it out and after hitting the preview button the number 5 answer shows up in the number 3 and 4's area, yet it does not get posted. heres most of my coding.

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//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,5,6,7))) 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 = "form";
// Name of the answer template
$answertemplate = "formanswers";

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

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

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

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

$formtitle = "BAP Form";

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

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

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "Poker Account";
$explain2 = "May only use 1 account per site!";

//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 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "Total Number of Shares";
$explain4 = "Please enter the amount here.";

//Question 5 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question5 = "Cost per share";
$explain5 = "How much is each worth";


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

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "male";
$dropdownchoice1c = "female";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "All information you are wanting put down.";
$vbtextexplain = "For example, Why people should by your shares, stats, etc";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
if ($_REQUEST['action'] == '')
{
$_REQUEST['action'] = "form";
}


$bbuserinfo = $vbulletin->userinfo;

// start navbar
$navbits = array();
$navbits['newthread.php?' . $vbulletin->session->vars['sessionurl'] . "do=$formname"] = $formtitle;

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

if ($_REQUEST['action'] == "submit")
{

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();
}
}

$vbulletin->input->clean_array_gpc('p', array(
'wysiwyg' => TYPE_BOOL,
'message' => TYPE_STR
));

if ($vbulletin->GPC['wysiwyg'])
{
require_once(DIR . '/includes/functions_wysiwyg.php');
$vbtextanswer = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);
}
else
{
$vbtextanswer =& $vbulletin->GPC['message'];
}

eval('$formsend = "' . fetch_template("$answertemplate") . '";');

$posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);
$poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_UINT);

if ($_POST['submit'] == 'Submit')
{
if ($formforum == "1")
{
$foruminfo = verify_id('forum', $formforumid, 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);
$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = '1';
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);

if ($formpoll == "1")
{
$threadinfo = verify_id('thread', $newpost[threadid], 0, 1);
$polloptions = count($polloption);
$question = $posttitle;
$vbulletin->GPC['options'] = $polloption;

$counter = 0;
$optioncount = 0;
$badoption = '';
while ($counter++ < $polloptions)
{ // 0..Pollnum-1 we want, as arrays start with 0
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
{
$badoption .= iif($badoption, ', ') . $counter;
}
if (!empty($vbulletin->GPC['options']["$counter"]))
{
$optioncount++;
}
}

// Add the poll
$poll =& datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);

$counter = 0;
while ($counter++ < $polloptions)
{
if ($vbulletin->GPC['options']["$counter"] != '')
{
$poll->set_option($vbulletin->GPC['options']["$counter"]);
}
}

$poll->set('question', $question);
$poll->set('dateline', TIMENOW);
$poll->set('active', '1');
$poll->set('public', $pollpublic);

$pollid = $poll->save();
//end create new poll

// update thread
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('pollid', $pollid);
$threadman->save();
}
}

if ($formreply == "1")
{
$threadinfo = verify_id('thread', $formreplythreadid, 0, 1);
$forumperms = fetch_permissions($threadinfo[forumid]);
$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = "1";
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);
}

if ($formpm == "1")
{
$vbulletin->GPC['message'] =& $formsend;
$vbulletin->GPC['title'] =& $posttitle;
$vbulletin->GPC['recipients'] =& $formpmname;

$pm['message'] =& $vbulletin->GPC['message'];
$pm['title'] =& $vbulletin->GPC['title'];
$pm['recipients'] =& $vbulletin->GPC['recipients'];

// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);

$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
$pmdm->set('fromusername', $vbulletin->userinfo['username']);
$pmdm->setr('title', $pm['title']);
$pmdm->setr('message', $pm['message']);
$pmdm->set_recipients($pm['recipients'], $permissions);
$pmdm->set('dateline', TIMENOW);

// everything's good!
$pmdm->save();
}

if ($formemail == "1")
{
require_once(DIR . '/includes/class_bbcode_alt.php');
$plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());
$plaintext_parser->set_parsing_language($touserinfo['languageid']);
$formsend = $plaintext_parser->parse($formsend);

$emails = explode(';', $formemailaddress);
foreach ($emails AS $email)
{
vbmail($email, $posttitle, $formsend);
}
}

if ($redirectoption == "1")
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "2")
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "3")
{
$vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "4")
{
$vbulletin->url = 'editpost.php?do=editpost&' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
else
{
require_once('./includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$preview = $parser->do_parse($formsend);

$_REQUEST['action'] = 'form';
}
}

if ($_REQUEST['action'] == 'form')
{
if (($formforum OR $formreply) AND $allow_attachments)
{
if ($formforum AND $formreply)
{
$forumid = $formforumid;
}
else if ($formreply)
{
$threadid = $formreplythreadid;
$threadinfo = verify_id('thread', $threadid, 0, 1);
$forumid = $threadinfo[forumid];
}
else
{
$forumid = $formforumid;
}

$forumperms = fetch_permissions($forumid);

// get attachment options
require_once(DIR . '/includes/functions_file.php');
$inimaxattach = fetch_max_upload_size();

$maxattachsize = vb_number_format($inimaxattach, 1, true);
$attachcount = 0;
$attach_editor = array();
$attachment_js = '';

if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))
{
if (!$posthash OR !$poststarttime)
{
$poststarttime = TIMENOW;
$posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
}
else
{
if (empty($postattach))
{
$currentattaches = $db->query_read("
SELECT dateline, filename, filesize, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE posthash = '" . $db->escape_string($posthash) . "'
AND userid = " . $vbulletin->userinfo['userid']
);

while ($attach = $db->fetch_array($currentattaches))
{
$postattach["$attach[attachmentid]"] = $attach;
}
}

if (!empty($postattach))
{
foreach($postattach AS $attachmentid => $attach)
{
$attach['extension'] = strtolower(file_extension($attach['filename']));
$attach['filename'] = htmlspecialchars_uni($attach['filename']);
$attach['filesize'] = vb_number_format($attach['filesize'], 1, true);
$attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif";
$show['attachmentlist'] = true;
eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";');

$attachment_js .= construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], $attach['extension']);

$attach_editor["$attachmentid"] = $attach['filename'];
}
}
}

if ($threadid)
{
$attachurl = "t=$threadid";
}
else
{
$attachurl = "f=$forumid";
}
$newpost_attachmentbit = prepare_newpost_attachmentbit();
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');

if ($threadid)
{
$attach_editor['hash'] = $threadid;
$attach_editor['url'] = "newattachment.php?$session[sessionurl]t=$threadid&amp;poststarttime=$poststarttime&amp;posthash= $posthash";
}
else
{
$attach_editor['hash'] = $forumid;
$attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$forumid&amp;poststarttime=$poststarttime&amp;posthash=$ posthash";
}
}
else
{
$attachmentoption = '';
}
}
else
{
$attachmentoption = '';
}

// set message box width to usercp size
$stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];
$editorid = construct_edit_toolbar($vbtextanswer);

eval('print_output("' . fetch_template("$maintemplate") . '");');
}
}


and this is my formanswers

$bbuserinfo[username]

$question1
$answer1

$question2
$answer2

$question3
$answer3

$question4
$answer4

$question5
$answer5

------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------

attroll
01-22-2008, 05:21 AM
Been trying to figure this out for awhile now. Currently I have 5 things I want posted but only 3 of them are showing up and the number 5 question's answer is showing up for the number 3's answer. I preview the forms before posting them to test it out and after hitting the preview button the number 5 answer shows up in the number 3 and 4's area, yet it does not get posted. heres most of my coding.
You have not added all the rest of the coding to the plugin.

There is more to it then just adding these two codes that you added.
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];


Look for the code listed blow in your pluin and then you will have to add the additional code that you added. Make sure you do it in the right format or it will not work.

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 == '')

attroll
01-22-2008, 05:31 AM
Hi attroll,

first thanks for the quick response. But I have already tried everything to the order of the display. However, the points 1-6 not consecutive. Can you tell me exactly what I need to edit?


I need to know more to try and offer help to you.

Are you trying to edit your forum that your users fill out?

It looks like you need to edit your template "form". Are these radioanswers buttons or what are you trying to use?

theoz1
01-22-2008, 06:30 AM
There is more to it then just adding these two codes that you added.
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];


Look for the code listed blow in your pluin and then you will have to add the additional code that you added. Make sure you do it in the right format or it will not work.

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 == '')


Yea I tried that before and it didnt work, tried it again still didnt. This is what its suppose to be?

if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $answer4 == '' OR $answer5 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == '')

curse-1
01-22-2008, 09:15 AM
I need to know more to try and offer help to you.

Are you trying to edit your forum that your users fill out?

It looks like you need to edit your template "form". Are these radioanswers buttons or what are you trying to use?

First-> THX for Support!

In the first picture (aufzeichnung.jpg) is the current display.


In the second, I picture (unbenannt.jpg) it with an image editing program to edit as I like it wants. But I do not know how?

I have been in the template "form" much edited, but without success. The arrangement is apparently where otherwise stated.

greez curse

attroll
01-22-2008, 03:27 PM
First-> THX for Support!

In the first picture (aufzeichnung.jpg) is the current display.


In the second, I picture (unbenannt.jpg) it with an image editing program to edit as I like it wants. But I do not know how?

I have been in the template "form" much edited, but without success. The arrangement is apparently where otherwise stated.

greez curse

It looks like you are missing a td or tr tag somewhere. If you want to post your form template I will look at it or you can send it in a pm and I will look at it for you later tonight after work.

attroll
01-22-2008, 03:47 PM
Yea I tried that before and it didnt work, tried it again still didnt. This is what its suppose to be?

if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $answer4 == '' OR $answer5 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == '')

If you only have 5 questions then try getting ride of all the excess code in that statement and see if that helps. It would look like this:
if ($answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $answer4 == '' OR $answer5 == '')

Also make sure that you template "form" is set up correctly in the right order because if that it not in the right order it could screw up you "formanswers" post.

What does you template "form" look like?

theoz1
01-22-2008, 08:06 PM
$bbuserinfo[username]

$question1
$answer1

$question2
$answer2

$question3
$answer3

$question4
$answer4

$question5
$answer5

------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------
i typed in amount for # 3, number for 4, and cost for 5. But after hitting preview this is what I get.
https://vborg.vbsupport.ru/external/2008/01/14.jpg
https://vborg.vbsupport.ru/external/2008/01/15.jpg

is this what you meant by the template form?

once again thx for the help.

attroll
01-23-2008, 04:32 AM
.is this what you meant by the template form?

once again thx for the help.
Yeah that was sort of what I meant.

Now it looks to me as if you did not add this to the lower part of your plugin like I mentioned before.


OR $answer4 == '' OR $answer5 == '')

Deety
01-23-2008, 07:07 AM
I would like to have the form post new threads in multiple forums selected by checkboxes.

This code seems to work well for selecting one $formforumid, but the first two "else" statements would prevent multiple selections, and taking them out did no good.

I'm guessing the issue may be that $formforumid can't be assigned multiple values (i.e., $formforumid = "1,2,3" or some such), but hopefully it can and I'm just missing the language that will do it. Easy answers are nice. :p

If anyone has a suggestion to get multiple forums working, I'll make the edit to the original form and post it as an example so it's easy for the next person. Thanks for any ideas... :)


if ($checkboxchoice1_1 = 1)
{
$formforumid = "1";
}
else
if ($checkboxchoice1_2 = 1)
{
$formforumid = "2";
}
else
if ($checkboxchoice1_3 = 1)
{
$formforumid = "3";
}
else
$formforumid = "4";

theoz1
01-23-2008, 08:02 PM
this is my lower code
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
if ($_REQUEST['action'] == '')
{
$_REQUEST['action'] = "form";
}


$bbuserinfo = $vbulletin->userinfo;

// start navbar
$navbits = array();
$navbits['newthread.php?' . $vbulletin->session->vars['sessionurl'] . "do=$formname"] = $formtitle;

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

if ($_REQUEST['action'] == "submit")
{

if ($answerall == "1")
{
if ($answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $answer4 == '' OR $answer5 == '')
{
$errormessage = "$bbuserinfo[username], you need to answer every question!";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
}

$vbulletin->input->clean_array_gpc('p', array(
'wysiwyg' => TYPE_BOOL,
'message' => TYPE_STR
));

if ($vbulletin->GPC['wysiwyg'])
{
require_once(DIR . '/includes/functions_wysiwyg.php');
$vbtextanswer = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);
}
else
{
$vbtextanswer =& $vbulletin->GPC['message'];
}

eval('$formsend = "' . fetch_template("$answertemplate") . '";');

$posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);
$poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_UINT);

if ($_POST['submit'] == 'Submit')
{
if ($formforum == "1")
{
$foruminfo = verify_id('forum', $formforumid, 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);
$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = '1';
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);

if ($formpoll == "1")
{
$threadinfo = verify_id('thread', $newpost[threadid], 0, 1);
$polloptions = count($polloption);
$question = $posttitle;
$vbulletin->GPC['options'] = $polloption;

$counter = 0;
$optioncount = 0;
$badoption = '';
while ($counter++ < $polloptions)
{ // 0..Pollnum-1 we want, as arrays start with 0
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
{
$badoption .= iif($badoption, ', ') . $counter;
}
if (!empty($vbulletin->GPC['options']["$counter"]))
{
$optioncount++;
}
}

// Add the poll
$poll =& datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);

$counter = 0;
while ($counter++ < $polloptions)
{
if ($vbulletin->GPC['options']["$counter"] != '')
{
$poll->set_option($vbulletin->GPC['options']["$counter"]);
}
}

$poll->set('question', $question);
$poll->set('dateline', TIMENOW);
$poll->set('active', '1');
$poll->set('public', $pollpublic);

$pollid = $poll->save();
//end create new poll

// update thread
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('pollid', $pollid);
$threadman->save();
}
}

if ($formreply == "1")
{
$threadinfo = verify_id('thread', $formreplythreadid, 0, 1);
$forumperms = fetch_permissions($threadinfo[forumid]);
$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = "1";
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);
}

if ($formpm == "1")
{
$vbulletin->GPC['message'] =& $formsend;
$vbulletin->GPC['title'] =& $posttitle;
$vbulletin->GPC['recipients'] =& $formpmname;

$pm['message'] =& $vbulletin->GPC['message'];
$pm['title'] =& $vbulletin->GPC['title'];
$pm['recipients'] =& $vbulletin->GPC['recipients'];

// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);

$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
$pmdm->set('fromusername', $vbulletin->userinfo['username']);
$pmdm->setr('title', $pm['title']);
$pmdm->setr('message', $pm['message']);
$pmdm->set_recipients($pm['recipients'], $permissions);
$pmdm->set('dateline', TIMENOW);

// everything's good!
$pmdm->save();
}

if ($formemail == "1")
{
require_once(DIR . '/includes/class_bbcode_alt.php');
$plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());
$plaintext_parser->set_parsing_language($touserinfo['languageid']);
$formsend = $plaintext_parser->parse($formsend);

$emails = explode(';', $formemailaddress);
foreach ($emails AS $email)
{
vbmail($email, $posttitle, $formsend);
}
}

if ($redirectoption == "1")
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "2")
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "3")
{
$vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
if ($redirectoption == "4")
{
$vbulletin->url = 'editpost.php?do=editpost&' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();
}
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
else
{
require_once('./includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$preview = $parser->do_parse($formsend);

$_REQUEST['action'] = 'form';
}
}

if ($_REQUEST['action'] == 'form')
{
if (($formforum OR $formreply) AND $allow_attachments)
{
if ($formforum AND $formreply)
{
$forumid = $formforumid;
}
else if ($formreply)
{
$threadid = $formreplythreadid;
$threadinfo = verify_id('thread', $threadid, 0, 1);
$forumid = $threadinfo[forumid];
}
else
{
$forumid = $formforumid;
}

$forumperms = fetch_permissions($forumid);

// get attachment options
require_once(DIR . '/includes/functions_file.php');
$inimaxattach = fetch_max_upload_size();

$maxattachsize = vb_number_format($inimaxattach, 1, true);
$attachcount = 0;
$attach_editor = array();
$attachment_js = '';

if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))
{
if (!$posthash OR !$poststarttime)
{
$poststarttime = TIMENOW;
$posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
}
else
{
if (empty($postattach))
{
$currentattaches = $db->query_read("
SELECT dateline, filename, filesize, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE posthash = '" . $db->escape_string($posthash) . "'
AND userid = " . $vbulletin->userinfo['userid']
);

while ($attach = $db->fetch_array($currentattaches))
{
$postattach["$attach[attachmentid]"] = $attach;
}
}

if (!empty($postattach))
{
foreach($postattach AS $attachmentid => $attach)
{
$attach['extension'] = strtolower(file_extension($attach['filename']));
$attach['filename'] = htmlspecialchars_uni($attach['filename']);
$attach['filesize'] = vb_number_format($attach['filesize'], 1, true);
$attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif";
$show['attachmentlist'] = true;
eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";');

$attachment_js .= construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], $attach['extension']);

$attach_editor["$attachmentid"] = $attach['filename'];
}
}
}

if ($threadid)
{
$attachurl = "t=$threadid";
}
else
{
$attachurl = "f=$forumid";
}
$newpost_attachmentbit = prepare_newpost_attachmentbit();
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');

if ($threadid)
{
$attach_editor['hash'] = $threadid;
$attach_editor['url'] = "newattachment.php?$session[sessionurl]t=$threadid&amp;poststarttime=$poststarttime&amp;posthash= $posthash";
}
else
{
$attach_editor['hash'] = $forumid;
$attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$forumid&amp;poststarttime=$poststarttime&amp;posthash=$ posthash";
}
}
else
{
$attachmentoption = '';
}
}
else
{
$attachmentoption = '';
}

// set message box width to usercp size
$stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];
$editorid = construct_edit_toolbar($vbtextanswer);

eval('print_output("' . fetch_template("$maintemplate") . '");');
}
}

attroll
01-24-2008, 04:51 AM
this is my lower code

I just sent a PM to you with my email address so you could send me some of your files for me to look over.

p1a6u3
01-27-2008, 02:42 AM
I too have done everything to the "T".....I am having an issue getting answer 4 to display after submit.....i have done everyhting right...mind you I have been doing vbulletin hacks for quite some time but i am just stumped on this one......i have edited both templates....i have also added the variables to 1 & 2 of the plugin and added $normalanswer1 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $answer4 == '' as well.....and yet nada....this is the only hack i have ever had stump me.....i have also atached a copy of my plugin


Form Answers Template

$formtitle
$bbuserinfo[username]

$normalquestion1
$normalanswer1

$question1
$answer1

$question2
$answer2

$question3
$answer3

$question4
$answer4


------------------------------------------------------
$vbtextquestion

$vbtextanswer

------------------------------------------------------



Form Template

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

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3">
$vboptions[bbtitle] - $formtitle
</td>
</tr>
<tr>
<td class="panelsurround" align="center" colspan="3">

<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td align="$stylevar[left]">
<fieldset class="fieldset" style="margin:0px">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$formpurpose

</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="alt1" colspan="3">
<b>$normalquestion1</b>
</td>
</tr>
<tr>
<td class="alt2" colspan="3">
<input type="text" size="30" value="$normalanswer1" name="normalanswer1" />
</td>
</tr>



<tr>
<td class="alt1" valign="middle">
<b>Username</b>:<br />
Your Username.</td>
<td class="alt1" valign="middle" colspan="2">
<b>$bbuserinfo[username]</b></td>
</tr>
<tr>
<td class="alt2" valign="middle">
<b>$question1</b>:<br />
$explain1</td>
<td class="alt2" valign="middle" colspan="2">
<input type="text" size="30" value="$answer1" name="answer1" /></td>
</tr>
<tr>
<td class="alt1" valign="middle">
<b>$question2</b>:<br />
$explain2</td>
<td class="alt1" valign="middle" colspan="2">
<input type="text" size="30" value="$answer2" name="answer2" /></td>
</tr>
<tr>
<td class="alt2" valign="middle">
<b>$question3</b>:<br />
$explain3</td>
<td class="alt2" valign="middle" colspan="2">
<input type="text" size="30" value="$answer3" name="answer3" /></td>
</tr>
<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>


<tr>
<td class="alt2" valign="middle" colspan="3">
<b>$vbtextquestion</b><br />
$vbtextexplain
<div align="center">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
$messagearea
</td>
</tr>
</table>
</div>
</td>
</tr>
<if condition="$attachmentoption">
<tr>
<td class="alt1" colspan="3" align="center">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">$attachmentoption</div>
</td>
</tr>
</if>
<tr>
<td valign="top" colspan="3">
<p align="center">
<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" />
</p></td></tr>
</table>

</form>

$footer
</body>
</html>

attroll
01-27-2008, 04:31 AM
p1a6u3

I just installed your templates that you posted for your form, formanswers and your plugin into my test site and everything worked fine for me. I even got question #4 to post in my thread. I did not change or alter anything you posted. I just put your code you posted in and it all worked.

Maybe one of your other hacks or plugins is interfering with this.

p1a6u3
01-27-2008, 04:58 AM
No im an idiot lol I ust figured it out....i guess i need to be sure that i refresh my browser instead of going back page lol..sorry for taking up your time....my bad!.....n00b m0v3!

p1a6u3
01-27-2008, 05:10 AM
NM I got it.....i need to just go to bed now lool

attroll
01-27-2008, 05:20 AM
It is OK, I have been there an done that too.

p1a6u3
01-27-2008, 08:20 AM
Ok attroll i am gonna need your expertise now....ok so heres what i got....form hack is done and functioning.....the way i want it done now is to create another form, pretty easy for me now...except that i want a form for each discussion forum i have....so one form per forum...how in the hell would i be able to accomplish this? I have added the "else /" conditional to check forum against form, which in turn changes the new thread link to the form link (thanks to D3fuse Here (https://vborg.vbsupport.ru/showpost.php?p=1090197&postcount=138) ).....but this is done in FORUMDISPLAY template....hope you understand here....got any ideas?

attroll
01-28-2008, 03:24 AM
Ok attroll i am gonna need your expertise now....ok so heres what i got....form hack is done and functioning.....the way i want it done now is to create another form, pretty easy for me now...except that i want a form for each discussion forum i have....so one form per forum...how in the hell would i be able to accomplish this? I have added the "else /" conditional to check forum against form, which in turn changes the new thread link to the form link (thanks to D3fuse Here (https://vborg.vbsupport.ru/showpost.php?p=1090197&postcount=138)).....but this is done in FORUMDISPLAY template....hope you understand here....got any ideas?

I have never had more then two forms in use at once. You may want to read this post here as someone else mentioned having big problems with running to many forms. Read post #743 in this thread.

There is another post about using forms for individual forums by someone else here in this thread also. You may want to read this post #813 and contact this individual and see how he did it. Sorry I can not help with this one.

p1a6u3
01-28-2008, 05:30 AM
TY attroll! Appreciate you answering me and helping support...and thx for the posts! greatly appreciated ;-) BTW, you are doing a great job here supporting...ive read alot in this thread, id say every page to be honest....and ive seen you supporting...awesome! this is what forum boards/communities are about!...thx again!

attroll
01-28-2008, 05:51 AM
TY attroll! Appreciate you answering me and helping support...and thx for the posts! greatly appreciated ;-) BTW, you are doing a great job here supporting...ive read alot in this thread, id say every page to be honest....and ive seen you supporting...awesome! this is what forum boards/communities are about!...thx again!
Thank you for your complaments. Sometimes I feel like I should take over this hack because the developer never seems to come to this thread anymore. :)

skierjosh
01-29-2008, 08:29 PM
I have a quick question if anyone knows how to solve this, we're using a combo box to find out what games people play(5 options total). We have it set to make a thread when the form is filled out, the options people selected from this question are listed right after each other and it's hard to see where one starts and the other left off. Is it possible to insert a comma after each checked item that's displayed to make it easier to read?

RedGTiVR6
01-30-2008, 06:40 PM
Quick question regarding the email form functionality.

I'm going to have a field where the user can enter their email address. This form will be sent to our ticket processing que. I'd like to be able to pull the users email addy from this field and have the email be sent to the email I've entered in the code under the email that's in the field.

Hope that makes sense.

Anyone know if that's possible?

CremeEgg
01-31-2008, 10:52 AM
Anybody know what I would have to change with this section to get it to post to 2 forums?

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

Deety
02-01-2008, 06:44 AM
Anybody know what I would have to change with this section to get it to post to 2 forums?

//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 = "x";Same question here. I can tell you a bunch of things that don't work. :p

Haven't delved into the email options yet, but I just noticed that the option for multiple email addresses is built in. Code for posting to multiple forums should be similar, right? That's where I'm going to look next; see if the code can be mimicked.

Once this is solved, next step is to figure out how to make the forums selectable via check boxes. I have it working for single-forum selection, but have a feeling it might get complicated figuring out how to add the forumid to some sort of formforumid array if the corresponding box is checked. Whee!

Charles_1
02-02-2008, 10:12 AM
I would like to have the form post new threads in multiple forums selected by checkboxes.

This code seems to work well for selecting one $formforumid, but the first two "else" statements would prevent multiple selections, and taking them out did no good.

I'm guessing the issue may be that $formforumid can't be assigned multiple values (i.e., $formforumid = "1,2,3" or some such), but hopefully it can and I'm just missing the language that will do it. Easy answers are nice. :p

If anyone has a suggestion to get multiple forums working, I'll make the edit to the original form and post it as an example so it's easy for the next person. Thanks for any ideas... :)


if ($checkboxchoice1_1 = 1)
{
$formforumid = "1";
}
else
if ($checkboxchoice1_2 = 1)
{
$formforumid = "2";
}
else
if ($checkboxchoice1_3 = 1)
{
$formforumid = "3";
}
else
$formforumid = "4";

In the code below. how would I go about sending a post to 2 different forums?

$formforumid = "13";

I am trying to get this to post to both a regular section of the forums and to a private section.

Anybody know what I would have to change with this section to get it to post to 2 forums?

//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 = "x";
I am interested in this too. I tried to find solution, but without luck :-(. Could some coder help please?

RedGTiVR6
02-03-2008, 01:30 AM
Quick question regarding the email form functionality.

I'm going to have a field where the user can enter their email address. This form will be sent to our ticket processing que. I'd like to be able to pull the users email addy from this field and have the email be sent to the email I've entered in the code under the email that's in the field.

Hope that makes sense.

Anyone know if that's possible?

Ok - so I've figured out how to have the form go to an email address that's been entered ON the form, but I can't figure out how to have the email appear to be sent BY the email on the form...

Anyone?

cellarius
02-03-2008, 12:25 PM
If you're using the form to create a new thread and you're allowing for custom thread titles (I do use the form for entering book reviews, thread title will be the book title), you need to be aware that the limit for thread titles is 85 charakters. The hack does not check for this. So if your thread title is > 85 charakters, the thread creation will fail, resulting in a "no thread specified"-error during redirection.

baz_kingfish
02-03-2008, 04:28 PM
OK, I have been reading this thread most of the morning trying to decide if I have the wherewithall to implement this hack. I am a novice, but I have a pretty good confidence that I can figure it out...given a little help here....but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:

RedGTiVR6
02-03-2008, 09:25 PM
If you're using the form to create a new thread and you're allowing for custom thread titles (I do use the form for entering book reviews, thread title will be the book title), you need to be aware that the limit for thread titles is 85 charakters. The hack does not check for this. So if your thread title is > 85 charakters, the thread creation will fail, resulting in a "no thread specified"-error during redirection.

Unless you have changed that in your settings...

RedGTiVR6
02-03-2008, 09:58 PM
but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:

There is no manager screen.

If you download and install the mod, the instructions are in the top part of the plug-in.

You don't have to install it multiple times. you just create a new plug-in and new set of templates for each form you want.

It takes a bit to understand what's going on with it and how it works but it's a great way to learn some PHP and a bit about how the forum works.

attroll
02-04-2008, 01:04 AM
OK, I have been reading this thread most of the morning trying to decide if I have the wherewithall to implement this hack. I am a novice, but I have a pretty good confidence that I can figure it out...given a little help here....but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:
Yes you have to install the hack for each form you want to use. So if you want to use it for two forms you have to have two installs.

RedGTiVR6
02-04-2008, 12:26 PM
You don't reinstall it. You just create the plug-in again in the AdminCP....

attroll
02-04-2008, 04:08 PM
You don't reinstall it. You just create the plug-in again in the AdminCP....
You are right. My explantion is wrong. You would have to create another plug-in and two more template files with different name and change that in you newly installed plug-in.

baz_kingfish
02-04-2008, 05:01 PM
Bummer...:(

Guess I need to go buy "PHP for Dummies"!

Thank you for the feedback. It would be great if someone took this hack and built an AdminCP user interface. for us rookies to be able to build and hook forms from within the Admin CP. I would be willing to contribute to that effort.

Keep me posted if that becomes a reality.
KF

cookiepants
02-05-2008, 05:40 AM
Is there a step by step way to customize the hack? I'm really trying to learn PHP to get this implemented on my site -- I think it would seriously rock for us! But I'm sort of lame at the PHP part.

I copied and pasted it into Notepad so I could try to read the instructions better, but I'm still a bit confused.

Thanks!
Nutmeg

cookiepants
02-05-2008, 06:26 AM
once I pasted it into notepad, it was very easy to edit. Thank you!!! :up:

kartik786
02-05-2008, 11:01 AM
Is it possible that members can create surveys from such forms which can be filled by other members?

A hack like that would be awesome !!

cookiepants
02-05-2008, 05:31 PM
I do have one question. I'd like to add more check boxes than three. How do I do that?

PaleRiders
02-05-2008, 07:40 PM
hmmm. . . what am i doing wrong?

i wanted to get rid of all the radio buttons and drop downs.

I am having the exact same issue. I've gone over the hook a million times. I realize you have to edit the 'template'....but I'm not sure what template? I've searched through my Style Templates and I have a newthread....but not a newthread_start (where the hook is).

I'm obviously getting something confused here, so if someone could clear this up for me, it'd be much appreciated.

Edit: Figured it out. There is a formanswers template you need to edit, as well as the form template. Makes perfect sense now. Thanks for the great hack!

leylandfor
02-06-2008, 03:53 PM
i have this working over at http://www.leylandforum.co.uk/forum/newthread.php?do=Leyland%20Forum%20Reviews ive noticed that the name of the form appears as the thread title, is there anyway we can make the user choose the thread title.

Im using this for a review service, where poeple can review a cafe, product, service etc.

any suggestions will be appreciated.

Elenna
02-06-2008, 06:20 PM
i have this working over at http://www.leylandforum.co.uk/forum/newthread.php?do=Leyland%20Forum%20Reviews ive noticed that the name of the form appears as the thread title, is there anyway we can make the user choose the thread title.

Im using this for a review service, where poeple can review a cafe, product, service etc.

any suggestions will be appreciated.

As you know, there is a line in there that sets the thread title to the form title.

In the plugin, look for this:

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

Change that last "$formtitle" to the variable you gave the "Product Name".

leylandfor
02-07-2008, 06:50 PM
Many thanks, much appreciated

asandhanam
02-09-2008, 11:17 PM
I'm doing some additional form validation. Wondering how to display on the same page, i mean display errors on top & the form beneath. Right now the errors are displayed on newthread.php but the form doesn't show up beneath. I also set $_REQUEST['do'] to formname by default..Please help !!!

trevanh
02-12-2008, 02:36 PM
I'm getting the following error in all of the forms I've created and I'm not sure where to look to solve the issue...

Warning: Cannot use a scalar value as an array in /includes/functions_newpost.php on line 356

Any help would be greatly appreciated!

Trevan

P.S. Line 356 is the main line of the following function:

else
{
$dataman->setr('forumid', $foruminfo['forumid']);
}

boomcar68
02-13-2008, 04:23 PM
Hello all:

First i need to say that i am totally new with vB.
I dumped my nuke-evolution site and imported database into vb.
I must say this is alot of different then nuke :-)
But i like to learn vB alot.

::On Topic::

I installed this nice hack ,but there is only 1 issue for me.
I have 5 radioquestion down to eachother.
I renamed them all,i updated the answer template and the mainhook,all is working except
that the question aren't there only the answers and near the answers i get this error message:

answer1 = Array['radioanswer6other'];


answer2= Array['radioanswer7other'];

answer3 = Array['radioanswer8other'];

answer4 = Array['radioanswer9other'];

answer5 = Array['radioanswer10other'];

I try to find out what could be the problem,but i didnt find.
Can some1 tell me what i did wrong?

Thanks John:up:

attroll
02-13-2008, 04:39 PM
Hello all:

First i need to say that i am totally new with vB.
I dumped my nuke-evolution site and imported database into vb.
I must say this is alot of different then nuke :-)
But i like to learn vB alot.

::On Topic::

I installed this nice hack ,but there is only 1 issue for me.
I have 5 radioquestion down to eachother.
I renamed them all,i updated the answer template and the mainhook,all is working except
that the question aren't there only the answers and near the answers i get this error message:

answer1 = Array['radioanswer6other'];


answer2= Array['radioanswer7other'];

answer3 = Array['radioanswer8other'];

answer4 = Array['radioanswer9other'];

answer5 = Array['radioanswer10other'];

I try to find out what could be the problem,but i didnt find.
Can some1 tell me what i did wrong?

Thanks John:up:
You need to put the question in you formanswers template also. It should look somehting like this.

$radioquestion2
$radioanswer2

boomcar68
02-13-2008, 05:26 PM
Did that like this $radioquestion3
$radioanswer3
$radioanswer3other

I can see the questions now with yes/no answer but still there is a error:
Do you have an AAOtracker Account, if yes write your AAOtracker name here
yes
6uy = Array['radioanswer6other'];


Where 6uy is my giving answer in explain block

sylar
02-14-2008, 10:31 AM
Seems that the developer for this does not check it that often and atroll has graciously been answer a lot of questions.

Im in need of have the code on the form hook into the code for VB so that the new thread follows the permissions that I have set on the forum the post will be going into, email, poll, attachement , etc.

I have a quick work around but working on something more permanent. If I can come up with it I will share with everyone.

My requirements are to allow only VIP members and Registered uses with over 100 posts be able to post on the forums Im using the forms. Temporarily I am using this until I find a way to hook the form code to the forum code.

if( $vbulletin->userinfo['usergroupid'] <5 ) {
if($vbulletin->userinfo['posts']<100) {
echo 'Sorry, you can not post here as you need to have 100 posts, you only have '.$vbulletin->userinfo['posts'];
print_no_permission();
}
}

As an addendum, I previously had a time limit hack on this particular sub forum that allowed member to be able to only start 3 threads on a 30 day span. This hack is not playing well with it, not at all actually. Anyone have any idea how to edit the form to do this? (check to see if member or VIP has less or equal to 3 threads in 30 days and either allow or deny ability to start one?)

Thank you

attroll
02-17-2008, 03:21 AM
Did that like this $radioquestion3
$radioanswer3
$radioanswer3other

I can see the questions now with yes/no answer but still there is a error:
Do you have an AAOtracker Account, if yes write your AAOtracker name here
yes
6uy = Array['radioanswer6other'];


Where 6uy is my giving answer in explain block

In the plugin towards the bottom you will find a code like this
{
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 == '')

You need to make sure you added the "radioanswer6other" statements in there in the proper format.

georg08
02-22-2008, 03:58 PM
Hello,
I'm using vB 3.6.8 Patch2 in the German Translation and I installed the original English Form Hack 4.0 Version with the parameters $formforum="1", $formforumid="10" and usergroups 2,5,6,7. ACP -> Plug-in [x] activated. But till now, I couldn't succeed in seeing the form in any place in my forum. The form never appears. What may be the reason?
Thanks and greetings
George

zmmmzz
02-23-2008, 02:49 AM
you can see it if you enter this address

http://yoursite.com/forum/newthread.php?do=form

replace "yoursite" for your own domain and "forum" for the name of the folder in which you installed the forum.

kursed
02-23-2008, 08:01 PM
I'm currently using vB 3.6.8 - whenever uploading a file, using this hack, it gives me an error; 'Could not create file system directory to hold your attachment.'

How can I correct this?

kursed
02-23-2008, 08:43 PM
Also, it gives me the option to upload files as an administrator but not as a regular registered user. What might be the reason behind that?

kursed
02-23-2008, 09:55 PM
Ok, I've managed to solve both of my above issues. There is just one thing left now. Is there anyway that I can make entries made through this hack to appear in a single thread, instead of it making a new thread every time someone submits it.

Elenna
02-25-2008, 02:22 AM
Kursed,

Yes, there is an option to have it reply to an existing thread.

Search for this text:
////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

A few lines under it, you'll see the following option:
////////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";
////////////////////////////////////////////////////////////////////////////////////////////////////

Set $formreply to 1, and set the $formreplythreadid to the thread ID of the thread you want the replies to continue to be posted to.

Note: You probably want to look just under the first text and turn off posting new thead, as I believe it might do both if you don't!

Kwikms
02-25-2008, 12:34 PM
@sylar - I hope this one will work for me togehter with hits form hack - https://vborg.vbsupport.ru/showthread.php?t=96848


Does someone know how I could have the new topic created by this form automaticly be closed?

RedGTiVR6
02-27-2008, 05:22 PM
Any word if this will work on 3.7?

attroll
02-28-2008, 05:05 AM
Any word if this will work on 3.7?
Yes it works.

DivineMessenger
03-03-2008, 09:31 PM
I keep getting an error in my newthread.php on line 395 and I have no idea why. Does anyone know what causes this? I change lil stuff and the error moves around a lil to different lines in that same file... any ideas?

Kwikms
03-04-2008, 08:47 AM
@Divine - Could be everyting, like a forgotten ; or one " to much where it shouldnt be.

Deep-X
03-04-2008, 10:47 PM
No Divine is right since version 3.6.8 patch 2 this now creates a new error in newthread.php on line 654 and such. I had to disable the hack to get it from displaying the error code on all new posts.

Please advise

DivineMessenger
03-04-2008, 11:34 PM
I'll pay someone $10 to get mine working! lol

AWMGolfer
03-04-2008, 11:40 PM
I'm using it on 3.7 with no problems and love it!!

DivineMessenger
03-05-2008, 03:32 AM
Show off lol

attroll
03-05-2008, 05:28 AM
No Divine is right since version 3.6.8 patch 2 this now creates a new error in newthread.php on line 654 and such. I had to disable the hack to get it from displaying the error code on all new posts.

Please advise
I have this working with version 3.6.8 patch 2 with no problem.

DivineMessenger
03-05-2008, 08:31 AM
I know it WILL work I just don't know why mine wont... I have had like 6 people check it over and no one can figure it out.

Kwikms
03-05-2008, 09:16 AM
I know it WILL work I just don't know why mine wont... I have had like 6 people check it over and no one can figure it out.

I'll take the challenge. Send me a PM with the form and the two templates and I take a look at it.

nothing4me
03-05-2008, 09:38 AM
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?
How do I require attachments or it can't be posted/sent?

Sorry for the copy + paste, but I had to.... I was being ignored. :(

attroll
03-05-2008, 04:16 PM
I know it WILL work I just don't know why mine wont... I have had like 6 people check it over and no one can figure it out.
Have you tried disabling all your other plugins and then trying it to see if it will work? That would isolate it being one of your other plugins. If it works after you disable all your other plugins then I would enable one at a time and see which one it is interfearing with.

If that is not the casue I would say I will look into it but it looks like Kwikms is going to look into it for you already. If they can not figure it oout let me know. I can not promise anything.

illithid
03-05-2008, 05:09 PM
No Divine is right since version 3.6.8 patch 2 this now creates a new error in newthread.php on line 654 and such. I had to disable the hack to get it from displaying the error code on all new posts.

Please advise

I am using version 3.6.8pl2 and have 2 forms working just fine on my board. One of my forms, I have hacked to bits and rebuilt as an entire stand-alone product instead of being a plugin for the original product. They work great with no errors.

@Divine - Could be everyting, like a forgotten ; or one " to much where it shouldnt be.

Kwikms, is correct in this statement. Alot of problems can occur from adding in or forgetting to add a ';' or ' " '.

I'll pay someone $10 to get mine working! lol

If you still need help, pm me. I can try to assist you. Money is not needed.

snunhuck
03-05-2008, 10:36 PM
How do I remove the dropdown meny and some radio button questions?

illithid
03-06-2008, 02:57 AM
You need to edit the following templates :

form
formanswers


To do this open the product-form.xml in a text editor. Find

<template name="form" templatetype="template"


Look through the code that follows, it is the actual template that sets up the structure of the form. This is the area in which the html code will be for the drop down menu and the radio buttons.

Once you have edited that, find

<template name="formanswers" templatetype="template"


This template returns the questions and answers from the form. You will need to remove the variables in this template that correspond to the drop down menu and the radio buttons.

Now find

// Part 1

Remove the lines that correspond to the drop down menu and the radio button that you have removed from the templates. Proceed down the page a bit to

// Part 2

Again, remove the lines that correspond to the drop down menu and radio buttons.

The next part is optional, but I recommend that you do this -> continue down the page until you find where the radio button variables and drop down menu are set with values. Remove these from the file. No sense in code existing in the file if it is not being used.

zmmmzz
03-06-2008, 05:42 PM
is there a way I can add tags through this mod?

illithid
03-06-2008, 06:28 PM
is there a way I can add tags through this mod?

Not sure I understand what you mean by "tags". If you are talking about html tags, then yes. You will have to do that via the template "form". Also, some of the variables in the php code section of the xml document can hold html tags as part of the variable definition.

If this doesn't help, then please be more specific with the meaning of "tags".

DivineMessenger
03-07-2008, 11:52 AM
ok i got an error:

"XML Error: not well-formed (invalid token) at Line 548"
the line is
"$dropdownanswer3_g = $vbulletin->GPC['dropdownanswer3_g'];"

Any ideas?

illithid
03-07-2008, 03:37 PM
ok i got an error:

"XML Error: not well-formed (invalid token) at Line 548"
the line is
"$dropdownanswer3_g = $vbulletin->GPC['dropdownanswer3_g'];"

Any ideas?

It looks like you may be setting up your variables incorrectly. Send your xml file to me, I will take a look at it and see if I can fix it for you.

snunhuck
03-07-2008, 08:47 PM
You need to edit the following templates :

form
formanswers


To do this open the product-form.xml in a text editor. Find

<template name="form" templatetype="template"


Look through the code that follows, it is the actual template that sets up the structure of the form. This is the area in which the html code will be for the drop down menu and the radio buttons.

Once you have edited that, find

<template name="formanswers" templatetype="template"


This template returns the questions and answers from the form. You will need to remove the variables in this template that correspond to the drop down menu and the radio buttons.

Now find

// Part 1

Remove the lines that correspond to the drop down menu and the radio button that you have removed from the templates. Proceed down the page a bit to

// Part 2

Again, remove the lines that correspond to the drop down menu and radio buttons.

The next part is optional, but I recommend that you do this -> continue down the page until you find where the radio button variables and drop down menu are set with values. Remove these from the file. No sense in code existing in the file if it is not being used.

Thanks :D

Skyline_GT
03-08-2008, 11:06 AM
This is very confusing when adding new questions..

synisterk
03-08-2008, 05:11 PM
I was fighting a simple order form on my site,

This is perfect for that....great hack.

Deep-X
03-17-2008, 11:15 PM
Ok some times its the ; or the , that you deleted that you miss. So I need help with this if anybody can direct me.

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

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(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'dropdownanswer2' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer1'];
$normalanswer3 = $vbulletin->GPC['normalanswer1'];
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$dropdownanswer2 = $vbulletin->GPC['dropdownanswer1'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//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,5,6,7,9))) 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 = "recruitment";
// Name of the answer template
$answertemplate = "formanswers";

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

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

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

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

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "4";

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

//ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no
$formpm = "1";

//USERNAME TO PM TO (separate multiple usernames with a ';')
$formpmname = "Ol_Man;Professor;Suicide;Art;Slayer";

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

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

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "csnyderiii@global-fortress.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 = "1";

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



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

$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 = "1";

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

$formtitle = "GFC R.A.C 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 = "$formtitle";

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 are interested in joining the Global Fortress Community you must read & follow the instructions below";

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

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

$normalquestion1 = "Fill in your Game user name(s).";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Do you own & use a microphone? We require all new recruits to use Ventrilo www.ventrilo.com & you will need a microphone for this. Check out the Ventrilo Server Info on the front of the website. r IP and setup info. With out a microphone you will not be recruited.";

// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion2 = "Fill in your xfire user name.";
//$radioquestion2 = "Do you have xFire Installed(recommended).
//www.xfire.com";

// The following choices must NOT have quotation marks
//$radiochoice2a = "Yes";
//$radiochoice2b = "No";


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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

//$radioquestion3 = "";
$normalquestion3 = "Make sure you get your steam ID / BF2 PID / BF2142 PID / In Game user Name";
// The following choices must NOT have quotation marks
//$radiochoice3a = "Yes";
//$radiochoice3b = "No";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "How long have you been playing?";
$explain1 = "Please list how long you have been playing the game which you are applying";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "How old are you?";
$explain2 = "Please enter your age here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Have you been in any clans?";
$explain3 = "Please enter your Clan names that you have been associated with.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "Are you presently in a another Clan?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "No";
$dropdownchoice1b = "Yes";
//$dropdownchoice1c = "Yes but with another Game";

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

$dropdownquestion2 = "Which Games are you applying for?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "Counter-Strike Source";
$dropdownchoice1b = "Team Fortress 2";
$dropdownchoice1c = "Day of Defeat Source";
$dropdownchoice1d = "Battlefield2";
$dropdownchoice1e = "Battlefield 2142";
$dropdownchoice1f = "Call of Duty 4";
$dropdownchoice1g = "Project Torque";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////
//$checkboxquestion1 = "Which game are you applying for.";

// The following choices must NOT have quotation marks
//$checkboxchoice1_1 = "Counter-Strike : Source";
//$checkboxchoice1_2 = "Battlefield 2142";
//$checkboxchoice1_3 = "Other then listed Above";


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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Please tell us why you want to join Global Fortress Community.";
$longexplain1 = "Please be as detailed as possible.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "In order to keep GFC gaming servers, voice server, fourms etc running we require donations by members. Are you willing to donate a small ($5) monthly amount to help with these costs? Please write down any additional information that you want to add that might help us recruit you.";
$vbtextexplain = "";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////


We are a gaming clan so this is a recruitment form any suggestion would be great.

Kwikms
03-18-2008, 07:42 AM
Are you willing to donate a small ($5) monthly amount to help with these costs?

I think the "$5" could be a problem. User HTML-Code instead.

Deepdog009
03-18-2008, 04:12 PM
Been away folks and its good 2 be back and C that this mod by ABE1 is over 900 installs,,, Beauts...


I recently had an accident on the freeway and im still recovering from injuries inflicted by slamming head on into separator...

I'll never buy another V-8 engine :( 2 many headaches... :eek:;)

I will try 2 assist if time permits...

Good Luck 2 ALL...

amroawad
03-18-2008, 07:57 PM
Hi,

I have imported the xml file but I can change anything. Where can I start using this tool.

Thanks

tehtide
03-20-2008, 03:09 PM
In the code below. how would I go about sending a post to 2 different forums?

$formforumid = "13";

I am trying to get this to post to both a regular section of the forums and to a private section.

Has anyone been able to come up with a solution to have this post in two different forums? I'm in the same boat... I need this form to go to a public section so that the user can comment, but then I need to have that same form be posted to a private section where membership can comment and discuss w/o the user being able to read the comments etc...

Basically a complaint form.

trevanh
03-21-2008, 06:34 AM
I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!

Brundlefly
03-21-2008, 06:20 PM
I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!

This looks like what you'd get if you have garbage in your $formforumid variable. Verify the forum ids you have the forms posting into.

trevanh
03-21-2008, 06:58 PM
Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
:confused:

Deepdog009
03-21-2008, 07:43 PM
Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
:confused:

trevanh its probably another MOD that is affecting your forms...

Did U recently add anything new 2 your products???

Several folks had the same issue and unistalling permission MODs fixed it...

Also could be your usergroup permissions,,, maybe...

Im still recovering from a vehicle accident and haven't done much vbulletin troubleshooting,,, but if time permits and my back getts better, I will post more...

Good Luck 2 ya

trevanh
03-21-2008, 08:39 PM
Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?

vbuser99
03-27-2008, 03:05 PM
Nice work. This is what I was looking for.

trevanh
03-27-2008, 03:27 PM
Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?

OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//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['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//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'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.

Deepdog009
03-30-2008, 07:27 AM
OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//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['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//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'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.

*********************************************

That's great you found the issue and resolved it...

Its usually something that U missed or overlooked that's causing the problems...

I will be posting more and troubleshooting more in the near future...

Good Luck 2 U

*********************************************

ionian
03-30-2008, 04:31 PM
Thank you very much for this usefull hack

Haltech
03-31-2008, 07:18 PM
I don't quite understand this step:
#
# Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

where do I go?

Thanks

Haltech
03-31-2008, 09:28 PM
Never mind, found it.

BryanG
04-01-2008, 08:12 PM
Ok. I'm not sure what I am doing wrong, but my form is not coming up properly.

My form has 16 questions:

4 Radio Questions
7 Long Questions
3 Check Questions
1 Normal Question
1 Question

I've also set my array to match my questions:

//Part 1
$vbulletin->input->clean_array_gpc('p', array(
'radioanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'longanswer4' => TYPE_STR,
'longanswer5' => TYPE_STR,
'longanswer6' => TYPE_STR,
'longanswer7' => TYPE_STR,
'checkboxanswer8_1' => TYPE_STR,
'checkboxanswer8_2' => TYPE_STR,
'checkboxanswer8_3' => TYPE_STR,
'checkboxanswer8_4' => TYPE_STR,
'answer9' => TYPE_STR,
'longanswer10' => TYPE_STR,
'longanswer11' => TYPE_STR,
'checkboxanswer12_1' => TYPE_STR,
'checkboxanswer12_2' => TYPE_STR,
'checkboxanswer12_3' => TYPE_STR,
'checkboxanswer12_4' => TYPE_STR,
'checkboxanswer12_5' => TYPE_STR,
'checkboxanswer12_6' => TYPE_STR,
'checkboxanswer12_7' => TYPE_STR,
'checkboxanswer13_1' => TYPE_STR,
'checkboxanswer13_2' => TYPE_STR,
'checkboxanswer13_3' => TYPE_STR,
'checkboxanswer13_4' => TYPE_STR,
'checkboxanswer13_5' => TYPE_STR,
'checkboxanswer13_6' => TYPE_STR,
'checkboxanswer13_7' => TYPE_STR,
'longanswer14' => TYPE_STR,
'radioanswer15' => TYPE_STR,
'radioanswer16' => TYPE_STR
));

And my variables to match the questions as well:

// Part 2
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$longanswer4 = $vbulletin->GPC['longanswer4'];
$longanswer5 = $vbulletin->GPC['longanswer5'];
$longanswer6 = $vbulletin->GPC['longanswer6'];
$longanswer7 = $vbulletin->GPC['longanswer7'];
$checkboxanswer8_1 = $vbulletin->GPC['checkboxanswer8_1'];
$checkboxanswer8_2 = $vbulletin->GPC['checkboxanswer8_2'];
$checkboxanswer8_3 = $vbulletin->GPC['checkboxanswer8_3'];
$checkboxanswer8_4 = $vbulletin->GPC['checkboxanswer8_4'];
$answer9 = $vbulletin->GPC['answer9'];
$longanswer10 = $vbulletin->GPC['longanswer10'];
$longanswer11 = $vbulletin->GPC['longanswer11'];
$checkboxanswer12_1 = $vbulletin->GPC['checkboxanswer12_1'];
$checkboxanswer12_2 = $vbulletin->GPC['checkboxanswer12_2'];
$checkboxanswer12_3 = $vbulletin->GPC['checkboxanswer12_3'];
$checkboxanswer12_4 = $vbulletin->GPC['checkboxanswer12_4'];
$checkboxanswer12_5 = $vbulletin->GPC['checkboxanswer12_5'];
$checkboxanswer12_6 = $vbulletin->GPC['checkboxanswer12_6'];
$checkboxanswer12_7 = $vbulletin->GPC['checkboxanswer12_7'];
$checkboxanswer13_1 = $vbulletin->GPC['checkboxanswer13_1'];
$checkboxanswer13_2 = $vbulletin->GPC['checkboxanswer13_2'];
$checkboxanswer13_3 = $vbulletin->GPC['checkboxanswer13_3'];
$checkboxanswer13_4 = $vbulletin->GPC['checkboxanswer13_4'];
$checkboxanswer13_5 = $vbulletin->GPC['checkboxanswer13_5'];
$checkboxanswer13_6 = $vbulletin->GPC['checkboxanswer13_6'];
$checkboxanswer13_7 = $vbulletin->GPC['checkboxanswer13_7'];
$longanswer14 = $vbulletin->GPC['longanswer14'];
$radioanswer15 = $vbulletin->GPC['radioanswer15'];
$radioanswer16 = $vbulletin->GPC['radioanswer16'];

But, when I view the questionnaire, it looks like the attached image... :confused:

Any suggestions?

BryanG
04-01-2008, 10:53 PM
Nevermind...I'm just going to un-install this hack. I didn't realize that you had to change templates and change the part of the script where it says "Do not change beyoind this point" to get the thing to work.

Nor did I realize that making a simple form could be made so complicated.

Why? Because all it says is "Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!". Doesn't mention anything about ALL of the other stuff you have to edit. I thought all I might have to do is put questions in and the type of answers I wanted for each question (ie. checkbox, dropdown, textbox, etc.), and that would be it.

Good concept, poor way of going about doing it.

nightbloom
04-02-2008, 05:24 AM
I ended up uninstalling as well. If this could be made into something nice and tidy in the CP with simple input fields then it would be great.

It breaks too often and is just too much WORK on top of running a busy forum.

Fabulous idea, poor implementation for me.

BryanG
04-02-2008, 02:52 PM
I wouldn't even really classify this as a mod.

It's more or less some code, or a template, and then you have to change all of it to fit what you want it to do.

Deepdog009
04-02-2008, 06:11 PM
Folks you've gotta remember that some Hacks take a bit of time 2 perfect,,, and if the Guy or Gal releasing it doesn't have many free hours to invest in them,,, then you must B patient with Modders new releases or updates...

Im sure many Guys and Gals here @ this site have a job and family to tend 2 also...
Sometimes their computer may B down or like me,,, always on the road...

Please give ALL Modders support so that they will possibly update in the future and continue releases... {{{ DONATE }}}

PHP, Javascript, CSS, Html, Flash, XML coding isn't easy and it can take up much of your free time in some cases.

Yes this Mod can B - A - bit of time setting up,,, But it is very useful boosting your new members numbers and it has other great advantages with member feedback...

Remember if you never ASK you'll never GET...

Support ALL modders and more updates may come your way...

Gotta Go now and Put back on my Ball & Chain...;)

Smurky
04-03-2008, 02:26 AM
I am wondering, is there another mod available that does the same as this one?

BryanG
04-03-2008, 08:05 PM
There is for older versions (https://vborg.vbsupport.ru/showthread.php?t=53269) but I think it was abandoned by the previous coder as this is pretty much his script updated to work in 3.6.X.

There is also another one out there based off of this script, but it's made specifically for WoW Clan applications (https://vborg.vbsupport.ru/showthread.php?t=150424).

Msfantastico
04-04-2008, 12:43 PM
please help

I can't seem to get this for to post. It shows up and appears to work fine and gives a thank you message...but it isn't posting in the forum listed...it just does nothing.

Here is my template

// 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(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'radioanswer3other' => TYPE_STR,
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$radioanswer3other = $vbulletin->GPC['radioanswer3other'];
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "form";
// Name of the answer template
$answertemplate = "formanswers";

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

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

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

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



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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "REVIEW form is to allow you to submit a form, and this form will be made into a thread in a particular forum, or be PMed to a moderator or be emailed to a moderator.";

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

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

$normalquestion1 = "What is the meaning to life?";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Choose one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion2 = "Choose another one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice2a = "good";
$radiochoice2b = "bad";
$radiochoice2c = "both";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion3 = "Is it yes or no? If yes, please elaborate";

// The following choices must NOT have quotation marks
$radiochoice3a = "yes";
$radiochoice3b = "no";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//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 email?";
$explain2 = "Please enter your real email here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "male";
$dropdownchoice1c = "female";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";

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

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

Msfantastico
04-05-2008, 03:36 AM
HI I"M ALMOST THERE!!:p


Please tell me how I can have the user pick the form title...I want them to enter their own title in the field

What should I do?

Say they are posting a review about candy

thhey can type in their review in the feild like

review of candy

and that becomes the topic title

thanks

John3971
04-05-2008, 01:12 PM
hey how can i get some text with BOLD ? i tried to use the bbcode and i tried with the html code but it doesn´t work. with the bbcode you can´t save the template.

Kahoona
04-06-2008, 01:08 AM
Is there a way to make some of the questions answered into the title of a thread?

ionian
04-06-2008, 09:30 PM
I want to display an image and web link in the output form. Is there any way to do this?

For example,
in the form template:

<input type="text" size="50" src="" name="normalanswer2" />


I used this url for scr tag in the form:
http://img397.imageshack.us/img397/7295/7556ba287lant305resmieshd3.jpg
But, displayed the link of the image. I want to display the imege. How can I do this?

ionian
04-07-2008, 09:36 PM
Please help me. How can I displaye an image in the output form?

vrokar
04-10-2008, 12:33 PM
Parse error: syntax error, unexpected T_STRING in /home/siphon/public_html/forums/newthread.php(71) : eval()'d code on line 899

Getting this error. Havnt changed anything was working perfect yetserday. I did copy the form and change the name though trying to make a second. Havnt finished though. Any ideas?

Also Got

Invalid Forum specified. If you followed a valid link, please notify the administrator

Like I said, no forums have been changed or anything. So im a but confused as to why this happened. Any ideas?

Mother_Dee
04-11-2008, 07:14 PM
Parse error: syntax error, unexpected T_STRING in /home/siphon/public_html/forums/newthread.php(71) : eval()'d code on line 899

Getting this error. Havnt changed anything was working perfect yetserday. I did copy the form and change the name though trying to make a second. Havnt finished though. Any ideas?

Also Got

Invalid Forum specified. If you followed a valid link, please notify the administrator

Like I said, no forums have been changed or anything. So im a but confused as to why this happened. Any ideas?

newthread.php - line 71:

($hook = vBulletinHook::fetch_hook('newthread_start')) ? eval($hook) : false;


Instructions at the top of the page:

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

That's my guess as to your problem. :)

Deepdog009
04-12-2008, 08:18 PM
Hello Folks,,,

I've been practicing on my php and it ain't easy let me tell U...

N-E ways If I get better in the next few weeks I will do an add-on 2 this, that should help most with setting it up from the HOOK line and sinker {<...fishing talk}...:eek:

Keep the ball rolling;)

Chewy954
04-12-2008, 11:29 PM
any plans on a 3.7.0 version? I love this ;o

Xceptional
04-14-2008, 10:43 AM
Great hack Abe, thanks, works perfectly. 1 Q, I want the same form to reply to different threads, depending on what link they clicked on to get to the form. I've included 2 variables in the link, and want the form to reply to the thread that is received in the URL from the variable.
I've been trying something like $formreplythreadid = '$variable', and get a "cannot use scalar value as array" error from funtions_newpost.php on line 267.

I've tried adding in the variables into the variable area, converting the variables to strings, to integers, just getting lost..

Any help or suggestions?:confused:

Xceptional
04-15-2008, 08:23 AM
got it sorted, needed to add hidden fields in the form template that passes the variables on to the plugin code. Also added the variables to both parts in the plugin code

arkkhoax
04-17-2008, 02:34 AM
any plans on a 3.7.0 version? I love this ;o

It works perfect on 3.7.0 already. I am running it with no problems on my board. Even attachments work perfect.

RedeemedWarrior
04-21-2008, 10:31 AM
Fantastic mod

steven s
04-24-2008, 12:59 AM
It works perfect on 3.7.0 already. I am running it with no problems on my board. Even attachments work perfect.Really? Just stopped working on 3.6.10. :(
Maybe I'm just using an older version.

darkforce114
04-24-2008, 01:08 AM
No longer works in 3.6.10 and 3.7.0 RC4 due to the added SECURITYTOKEN for CSRF protection.

It's to bad, was a very nice addon.

steven s
04-24-2008, 01:17 AM
No longer works in 3.6.10 and 3.7.0 RC4 due to the added SECURITYTOKEN for CSRF protection.

It's to bad, was a very nice addon.I hope there is an update or I will have to reinstall 3.6.9.

jantequino
04-24-2008, 01:53 AM
I hope there is an update or I will have to reinstall 3.6.9.

Abe1... PLEASE fix this for 3.6.10/3.7 RC4

Thank you :)

arkkhoax
04-24-2008, 03:54 AM
Does anyone know how to get this working with the new security token. I really rely heavily on this addon for a portion of my site.

Nevermind! Thank you so much. I just saw the fix. I'm making a donation too. :D

Abe1
04-24-2008, 03:55 AM
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.

darkforce114
04-24-2008, 04:39 AM
Abe1, any plans on porting a copy of this to vb 3.7.x ?

Abe1
04-24-2008, 04:41 AM
Abe1, any plans on porting a copy of this to vb 3.7.x ?
You can use this version fine on it.

darkforce114
04-24-2008, 04:51 AM
Thank you, thank you Abe1!.

This is an awesome addition to the site. Keep em coming!.

Abe1
04-24-2008, 12:24 PM
I just updated the zip file. It seems like it had the old xml file in it.

steven s
04-24-2008, 12:45 PM
<font size="3">Outstanding!
Thank you!</font>

jantequino
04-24-2008, 03:16 PM
Thank you Abe1!!!

I just want to verify something first....

I am currently running 3.7 Beta 5....
I do not plan to upgrade vBulletin until we have 3.7 Gold in our hands.

That being said, can I still use this newly updated Form Hack on my pre RC4 board?

Thanks!
J.J.

Abe1
04-24-2008, 03:18 PM
Thank you Abe1!!!

I just want to verify something first....

I am currently running 3.7 Beta 5....
I do not plan to upgrade vBulletin until we have 3.7 Gold in our hands.

That being said, can I still use this newly updated Form Hack on my pre RC4 board?

Thanks!
J.J.
Yes.

You should upgrade now so you dont have any down time when you do go gold.

It wont affect anything.

darkforce114
04-24-2008, 05:41 PM
Thank you Abe1!!!

I just want to verify something first....

I am currently running 3.7 Beta 5....
I do not plan to upgrade vBulletin until we have 3.7 Gold in our hands.

That being said, can I still use this newly updated Form Hack on my pre RC4 board?

Thanks!
J.J.

I can verify that it works on 3.7.0 RC4!

vyrush
04-24-2008, 05:58 PM
can some one please tell me how to add more checkbox choices and question to this mod??
i did try editing the files.. but then i got and error saying..parse syntax.. eval'()33 .. something like tat.. please help.

jantequino
04-24-2008, 06:34 PM
Abe1 I just downoaded 4.1 and saw your "Edits from version 4_0 to 4_1.txt" file....

If that's all we need to do, we don't actually need to REINSTALL 4.1, right?

We can just follow those instructions instead?

Thank you for being so responsive to this update! This hack is one of the primary components of my site and I'd be lost without it :)

Thank you very much!

Abe1
04-24-2008, 07:29 PM
Abe1 I just downoaded 4.1 and saw your "Edits from version 4_0 to 4_1.txt" file....

If that's all we need to do, we don't actually need to REINSTALL 4.1, right?

We can just follow those instructions instead?

Thank you for being so responsive to this update! This hack is one of the primary components of my site and I'd be lost without it :)

Thank you very much!
Correct

mike2567
04-25-2008, 06:15 AM
I tried making the form fit what I need. I have gone over all my edits and I can't find the problem. I am receiving this error Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/m/i/k/mike2567/html/forums/newthread.php(71) : eval()'d code on line 43 can anyone help me? I am totally new at this :confused:

Nevermind, I found it!

zmmmzz
04-26-2008, 10:30 PM
Thank you so much for being so responsive to this update.
This hack is very important for my site and I appreciate that you updated so fast.

I hope we see tags integration sometime.

vyrush
04-27-2008, 03:08 AM
i guess no one is bother to give a reply!

laura66a
04-27-2008, 02:21 PM
Can someone please show me sample of how to add a background image to the code for a form? I can find where in the template to add the background image because I am not that familiar with CSS.

Thanks.

Spinball
04-30-2008, 08:51 AM
Does this work on 3.7? Or is there a 3.7 release coming soon?

Kinneas
04-30-2008, 09:04 AM
It still works fine for me :)

enjoymarcus
05-01-2008, 04:36 PM
Hi. Great mod. I was looking at using it for a non Vbulletin page, allowing people to submit questions/suggestions/problems etc to the forum. Is this possible? Thanks.

RMS-Chef
05-03-2008, 03:11 PM
Abe, any plans in integrating/supporting the new Thread Tags and Prefix features?

ccplim
05-04-2008, 05:10 AM
Great mod! Something which I really need :up:

Now, I am not a PHP/HTML guy and I forsee that I will have many questions down the road. But, I will take it slowly. Hope to get some tips from all brothers here and hope that I wouldn't become a nuisance :p

alternity
05-04-2008, 10:28 PM
Hi, I'm having issues with this hack since upgrading to 3.7. The forms display correctly, but when I try to submit them I get the following text on a white background:
Your submission could not be processed because a security token was missing or mismatched.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.
I'm running Form Hack 4.1.
Any ideas?

dutchbb
05-05-2008, 03:55 AM
Hi, I'm having issues with this hack since upgrading to 3.7. The forms display correctly, but when I try to submit them I get the following text on a white background:

I'm running Form Hack 4.1.
Any ideas?
Yes I'm having the same error message, any help from the coder please?