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

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

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

Form Hack 4.1


Features:

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

Or any combination or all of the above?

Well, this is the hack for you!

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

Or anything you like - this hack is totally customizable via the AdminCP.

The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms.

Format of the form:
  • One main input question
  • 3 Radio buttons Choice questions
  • 3 Normal text input questions
  • 1 Drop down menu
  • 3 Check boxes
  • 1 Long answer question
  • 1 VB message editor text box question
  • Upload attachments

This is customizable via the hook.

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

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

Done!

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

Enjoy!

Updates:

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

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

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

Abe1 with rights from Dr Erwin Loh

Supporters / CoAuthors

Show Your Support

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

Comments
  #772  
Old 12-10-2007, 04:05 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theoz1 View Post
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.
Reply With Quote
  #773  
Old 12-10-2007, 06:57 AM
theoz1 theoz1 is offline
 
Join Date: Dec 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

modifications first.
Reply With Quote
  #774  
Old 12-10-2007, 07:00 AM
theoz1 theoz1 is offline
 
Join Date: Dec 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should I go ahead and reinstall it and try it out?
Reply With Quote
  #775  
Old 12-10-2007, 07:13 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theoz1 View Post
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.
Reply With Quote
  #776  
Old 12-10-2007, 09:26 AM
theoz1 theoz1 is offline
 
Join Date: Dec 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.";
Reply With Quote
  #777  
Old 12-10-2007, 02:39 PM
xTerMn8R xTerMn8R is offline
 
Join Date: Mar 2004
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #778  
Old 12-11-2007, 11:21 PM
xTerMn8R xTerMn8R is offline
 
Join Date: Mar 2004
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #779  
Old 12-12-2007, 03:01 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
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 == '')
Reply With Quote
  #780  
Old 12-12-2007, 05:14 AM
xTerMn8R xTerMn8R is offline
 
Join Date: Mar 2004
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I did that ....
Reply With Quote
  #781  
Old 12-12-2007, 07:44 AM
theoz1 theoz1 is offline
 
Join Date: Dec 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
 


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

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

Forum Jump


All times are GMT. The time now is 04:21 AM.


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

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

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