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

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

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

Form Hack 4.1


Features:

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

Or any combination or all of the above?

Well, this is the hack for you!

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

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

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

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

This is customizable via the hook.

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

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

Done!

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

Enjoy!

Updates:

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

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

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

Abe1 with rights from Dr Erwin Loh

Supporters / CoAuthors

Show Your Support

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

Comments
  #522  
Old 07-13-2007, 08:53 PM
jiffy jiffy is offline
 
Join Date: May 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't claim to be a PHP wizard but why does it not work for me to change this code:
Code:
$posttitle = "$formtitle";
To this code:
Code:
$posttitle = "$normalquestion1";
I'm trying to get the new thread to have the title of the text filled in to normalquestion1. Seems like this is a simple thing but when I try the second code a new thread is never created. It processes the form fine, at least it seems like it does but no thread shows up in the forum. When I change the code back to "$forumtitle" it works fine again. Weird.
Reply With Quote
  #523  
Old 07-13-2007, 10:40 PM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what I use:

Code:
$formtitle = "$normalanswer1 - $answer1 - $dropdownanswer1 $answer3, $dropdownanswer2";
$posttitle = "$formtitle";
And it works just fine. I also made $pagetitle into something custom (and changed the breadcrumb in the form template to show $pagetitle) otherwise the name of the form, the breadcrumb, and the title of page will be blank, since the answers have yet to be filled out yet.

OHH... duh. Look at your code again, you're using $normalquestion1 instead of $normalanswer1.
Reply With Quote
  #524  
Old 07-14-2007, 02:24 PM
jiffy jiffy is offline
 
Join Date: May 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
OHH... duh. Look at your code again, you're using $normalquestion1 instead of $normalanswer1.
You my friend are my hero. Can't believe I didn't notice that. All is good now.
Reply With Quote
  #525  
Old 07-15-2007, 10:24 PM
StudMuffin21 StudMuffin21 is offline
 
Join Date: Jun 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I'm still having problems getting the forum answers to show up. I have it set up to where after submitting the form, a new thread is created. For the most part it works fine, but not all the questions show their answers.

Any suggestions? I've been unable to get this working, and have worked on it for at least a month now
Reply With Quote
  #526  
Old 07-17-2007, 04:59 AM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using this as a glorified contact-us. I noticed with 3.6.5 (patched) that guest forms are NOT being posted to the forum. If a member uses the forum, it works fine. If a guest uses it, it looks like it goes through ok but nothing shows up. Any ideas?

-vissa
Reply With Quote
  #527  
Old 07-18-2007, 04:37 PM
pbmansion's Avatar
pbmansion pbmansion is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to have more columns and a much larger selection?
Reply With Quote
  #528  
Old 07-19-2007, 12:30 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vissa View Post
I'm using this as a glorified contact-us. I noticed with 3.6.5 (patched) that guest forms are NOT being posted to the forum. If a member uses the forum, it works fine. If a guest uses it, it looks like it goes through ok but nothing shows up. Any ideas?

-vissa
Turn off your image verification in vbulletin options and your issue B solved...

Good luck


+++++++++++++++++++++++++++++++++++++++++++++++
StudMuffin21
So I'm still having problems getting the forum answers to show up. I have it set up to where after submitting the form, a new thread is created. For the most part it works fine, but not all the questions show their answers.
+++++++++++++++++++++++++++++++++++++++++++++++
Upload your form in txt format and I will C if I can fix your issue...?


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pbmansion,,, U can make your form a colossus monster if U want, I have several forms that have 30 questions and many more that are Godzilla's...

There's no limit, the problem is making them work properly and keeping the rif raf scum, scabs, spammers and leechs out...
Reply With Quote
  #529  
Old 07-19-2007, 12:48 AM
StudMuffin21 StudMuffin21 is offline
 
Join Date: Jun 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Deepdog009

Here is the information you requested. I've gone over it many times, but can't find what I'm doing wrong. Any assistance is appreciated.

I uploaded the files in txt format instead of posting them on the forum to save space.
Reply With Quote
  #530  
Old 07-19-2007, 11:26 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without looking too far into it, I'd say there is a slim chance that your form templates are causing it.

You most likely didn't add $answers 4-8 and $longanswers 2-3 to the VARIABLES section in your Form plugin.

For you, that section should look like:
Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
'answer6' => TYPE_STR,
'answer7' => TYPE_STR,
'answer8' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'longanswer1' => TYPE_STR
'longanswer2' => TYPE_STR
'longanswer3' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];
$answer6 = $vbulletin->GPC['answer6'];
$answer7 = $vbulletin->GPC['answer7'];
$answer8 = $vbulletin->GPC['answer8'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$longanswer1 = $vbulletin->GPC['longanswer1'];
$longanswer2 = $vbulletin->GPC['longanswer2'];
$longanswer3 = $vbulletin->GPC['longanswer3'];
Reply With Quote
  #531  
Old 07-19-2007, 11:39 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vissa View Post
So you're saying I can't have image verification for searches and a contact-us form for guests at the same time?
Yeah. I made a fix for this a long time ago.. which I never ended up releasing. I think DeepDog released an Add-On to this Form Hack, but it's not the *REAL* image verification, so I think you still may have to disable Guest Image Verification for everything.

Erm... Apparently you deleted your post.. haha.

--------------------------------------------------
Edit: Does this form handle all errors correctly? For instance, when trying to submit a form where the Post Title is longer than the limit set in vBulletin Options, it gives my users "Invalid Forum Specified", instead of returning an error saying "Thread Title is too long" or whatever. I'm pretty sure it's not any of the modifications to the Form Hack that I've done, since I looked through the plugin code and can't find any references to the post title length.

Edit2: Well, the "fix" is simple enough. I just had to put a maxlength="" on all the input fields that add up to make my thread title.
Reply With Quote
Reply


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

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

Forum Jump


All times are GMT. The time now is 05:19 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.05908 seconds
  • Memory Usage 2,321KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)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