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
  #502  
Old 06-20-2007, 10:57 PM
inteller2k7's Avatar
inteller2k7 inteller2k7 is offline
 
Join Date: Jun 2007
Location: NYC
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack is pissing me oof i change the questions only and when i got to the Form place i get a
Code:
Parse error: syntax error, unexpected '=' in /home/forumaio/public_html/forum/newthread.php(71) : eval()'d code on line 287
i go to line 287 and it is blank i have not done any template edits since i dont no what to edit some help would be nice and fast thanks
Reply With Quote
  #503  
Old 06-21-2007, 04:21 AM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by inteller2k7 View Post
this hack is pissing me oof i change the questions only and when i got to the Form place i get a
Code:
Parse error: syntax error, unexpected '=' in /home/forumaio/public_html/forum/newthread.php(71) : eval()'d code on line 287
i go to line 287 and it is blank i have not done any template edits since i dont no what to edit some help would be nice and fast thanks
wow - I'm not really sure who is going to want to help with an attitude like that...

and on a different note...

For some reason I'm running into an issue trying to edit one of the forms I've made for our site.

I've gone through and made the changes (or so it seems) to the product to include the new code for the new questions, I've entered the code for the answers and the code for the questions.

I've then gone into the form template and updated, then into the answers template and updates.

However, when I go to check the form, nothing has changed.

Am I missing a step somewhere perhaps?
Maybe a field needs to be rebuilt?
Reply With Quote
  #504  
Old 06-22-2007, 01:58 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey folks please go back 2 around page 23 of this hack and read from there... U will C many ideas and helpful hints 2 assist ALL...

From pages 23 - 34 should help answer many questions, but if not I will try 2 help when time permits...

ABE1 form hack adds 2 templates and one plugin file...

Admincp -->>> goto products and install after that -->>> goto templates and find form & form_answers templates... modify as you will...

If you run into parse issues then double check your new modifications, most likely U added something wrong or forget 2 add quotes or something... Ohhh yeah the PLUGIN file has all the instructions on how 2 make changes and code stuff...

When making new forms slowly make changes and check yo form after every change 2 verify where the problems start at,,, then backtrack and C what the cause could be...

Download some of the FORM files in earlier posts 2 understand how it works...

Good Luck
Reply With Quote
  #505  
Old 06-22-2007, 02:32 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I ended up having to create new templates (with the exact same info mind you) and change the name of the templates the hack was looking for to those templates before I could get the changes to show up...

really not sure why that was the case. All I did was copy and paste the contents of the previous template into a new template and just change the name...strange.
Reply With Quote
  #506  
Old 06-22-2007, 10:27 PM
InTeNsE-HuMoR InTeNsE-HuMoR is offline
 
Join Date: Sep 2006
Location: Northern Ireland, UK
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, can anyone tell me how to remove a field that I don't want in the form? I have only been able to remove the field name and not the actual field itself, how to I completely remove a field?
Reply With Quote
  #507  
Old 06-23-2007, 05:53 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:
{Saviour} Update...

No need for help anymore...finally figured it out and have it working, however, the addons supplied with this hack do not work. Someone might want to take a look into this. The Add-on hacks state they are supported...how does one get their hack validated and marked as supported when it doesn't even contain all the files and instructions you need to make it work.

This Form Hack 4.0 is exactly what I've been looking for and again, Kudos goes out to Abe on this one. I just want a simple CAPTCHA hack that will work with this hack.

I'm currently using vb 3.6.7 PL1.
When U guys posted asking about add-ons I was out of town...
I uploaded those missing files two days ago...

Most guys dont stay glued 2 these forums everyday my friend,,, when time permits I stop by 2 help and fix issues...

At the time of release I uploaded a new file and forgot 2 add images 4 that add-on...

Good Luck
Reply With Quote
  #508  
Old 06-25-2007, 05:55 PM
H1MendlessDark H1MendlessDark is offline
 
Join Date: Jan 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was just wondering how to edit the questions below:

PHP Code:
$dropdownquestion1 "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a "no comment";
$dropdownchoice1b "male";
$dropdownchoice1c "female"
How do I edit the variables and stuff. I dont get it.
Reply With Quote
  #509  
Old 06-28-2007, 05:14 PM
Jeffler's Avatar
Jeffler Jeffler is offline
 
Join Date: Feb 2006
Location: Toronto
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, I'm an idiot, and I've never worked with hooks before (crazy, I know).

Can someone just tell me where I have to go to edit the hook? I'll be fine then. :P
Reply With Quote
  #510  
Old 06-29-2007, 04:32 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 Jeffler View Post
Alright, I'm an idiot, and I've never worked with hooks before (crazy, I know).

Can someone just tell me where I have to go to edit the hook? I'll be fine then. :P
Plugin Hook 4 this Hack is located in Admincp, near bottom of listing under RSS FEEDS and below that is {{{Plugins & Products}}}...

Within the {Plugins & Products} menu is option Plugin Mgr...

After accessing that menu look 4 Forms Hack plugin, open and view code...

This is where U make modifications 2 create new forms or make changes 2 primary test form...


Below is start of Hooks Code 4 this Hack...

Making changes ain't easy... I suggest taking your time and study and read the setup area several times...

Eventually U will understand how it works with a little patients...

Good Luck!



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

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'];
Reply With Quote
  #511  
Old 06-29-2007, 05:31 PM
vFan vFan is offline
 
Join Date: May 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Silly question perhaps, but in addition to being posted to a thread, poll, etc., does the information submitted via the form hack automatically get stored in the database as well? If it doesn't get stored in the db then is it possible to modifiy the form to have 2 actions associated with the submit button. (You know like the ability to submit info to a db while notifying someone via email that their order has been received.) What I want is for the form data to be posted to a thread upon submission as well as storing it in the db so I can send it on to a different application it later. If if can be done, how do I do it?

(By the way, I have looked through the tables in my db and do not see any of the information that has been posted to my threads so I'm assuming that it only gets posted not stored ? Please correct me if I'm wrong)

Sorry if this is a ridiculous question but I am not a coder. Any help is appreciated. Thanks.
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 03:59 PM.


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.05755 seconds
  • Memory Usage 2,339KB
  • Queries Executed 28 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (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
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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