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
  #1282  
Old 10-21-2008, 02:21 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by a33 View Post
Simon i was the same as you 3 days ago .... I now have a form that works great !!
If you "search this hack" (at the top of this page) there is a lot of info in these 86 pages...
Go to admin - Plugins & Products - Plugin Manager Then "edit" form hack ...
Thanks for that reply but when i do edit there i get this when calling the form or even creating a new thread!:
PHP Code:
Parse errorsyntax errorunexpected T_STRING in /home/thecodec/public_html/forumz/newthread.php(74) : eval()'d code on line 143 
so i have to disable it if anyone has codes for this for a kind of joining form i would be very grateful!
Reply With Quote
  #1283  
Old 10-21-2008, 02:44 PM
a33 a33 is offline
 
Join Date: Mar 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you set which forum to put the form post in?

PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "71"
I found This is a one step at a time hack . get one thing working properly and you should understand how to get the others going...... and always take new copies of code as you edit it.

It is a very frustrating hack to start with though!!
Reply With Quote
  #1284  
Old 10-21-2008, 03:47 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by a33 View Post
Have you set which forum to put the form post in?

PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "71"
I found This is a one step at a time hack . get one thing working properly and you should understand how to get the others going...... and always take new copies of code as you edit it.

It is a very frustrating hack to start with though!!
Its very frustrating as i'm no coder, i'm e-mailing it so no forum needed, all those parts are well explained, but what i want to do is remove some radio buttons and checkboxes i comented them out by putting // in front of them and then get the error i posted, i can change the forms wording no problem its just adding or getting rid of stuff i cant do!
Reply With Quote
  #1285  
Old 10-21-2008, 04:00 PM
a33 a33 is offline
 
Join Date: Mar 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just backed up the code and then deleted things i didn't need. i dont think // will work there.

i didn't need these dropdowns or checkbox so i deleted all this code
PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "Drop down choices?";

// The following choices must NOT have quotation marks
$dropdownchoice1a "no comment";
$dropdownchoice1b "Yes please";
$dropdownchoice1c "No thanks";

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

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

//////////////////////////////////////////////////////////////////////////////////////////////////// 
You also have to remove
PHP Code:
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR
and
PHP Code:
$dropdownanswer1 $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 $vbulletin->GPC['checkboxanswer1_3']; 
from here
PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'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
$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']; 

You will then have to edit the templates so remove dropdownanswer1 from there aswell

Hope that makes some sense
Reply With Quote
  #1286  
Old 10-21-2008, 06:56 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey thanks for the detailed explanations...does that mean i have to create new templates too for future forms?
Reply With Quote
  #1287  
Old 10-21-2008, 07:36 PM
a33 a33 is offline
 
Join Date: Mar 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
Hey thanks for the detailed explanations...does that mean i have to create new templates too for future forms?
yes ....I haven't had to do this yet
Reply With Quote
  #1288  
Old 10-23-2008, 09:51 AM
chrisb1357 chrisb1357 is offline
 
Join Date: Oct 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi all,

I have installed this onto my test forum which is using Version 3.7.3 and as i am new to all this i am not sure what it means when it says.

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

ALso will this mod be ok to use on 3.7.3

Chris
Reply With Quote
  #1289  
Old 10-23-2008, 10:40 AM
a33 a33 is offline
 
Join Date: Mar 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chris
Edit the main hook (plug-in) means Go to admin - Plugins & Products - Plugin Manager Then "edit" form hack

Yes works fine 3.7.3

If you "search this hack" (at the top of this page) there is a lot of great info in these 86 pages
Reply With Quote
  #1290  
Old 10-23-2008, 07:03 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been looking into getting the extended forms javascripts that are out there to work with this. So far I've not had much luck getting them to work. What I'm talking about is this: http://www.quirksmode.org/dom/domform.html

Has anyone given this a shot yet or have a better idea of what should be edited? So far, I haven't even tried to see if they submit, as I can't get the extra fields to generate just yet.
Reply With Quote
  #1291  
Old 11-04-2008, 05:52 PM
Sawa Dee SohL Sawa Dee SohL is offline
 
Join Date: Aug 2008
Location: www.TheSocialRev.com
Posts: 277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to ad more then the 3 Radio Buttons, this is the code I've added:

Part 1:

HTML Code:
 $vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'radioanswer4' => TYPE_STR,
'radioanswer5' => TYPE_STR,
'radioanswer6' => TYPE_STR,
'radioanswer7' => TYPE_STR,
'radioanswer8' => TYPE_STR,
'radioanswer9' => TYPE_STR,
'radioanswer10' => TYPE_STR,
'radioanswer10other' => TYPE_STR,
Part 2:

HTML Code:
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$radioanswer4 = $vbulletin->GPC['radioanswer4'];
$radioanswer5 = $vbulletin->GPC['radioanswer5'];
$radioanswer6 = $vbulletin->GPC['radioanswer6'];
$radioanswer7 = $vbulletin->GPC['radioanswer7'];
$radioanswer8 = $vbulletin->GPC['radioanswer8'];
$radioanswer9 = $vbulletin->GPC['radioanswer9'];
$radioanswer10 = $vbulletin->GPC['radioanswer10'];
$radioanswer10other = $vbulletin->GPC['radioanswer10other'];
Basically, all I did was ad more Radio features -but it still only shows the 3 - is that coded into / apart of the template, that cannot be changed? (basically tryin to create 10 for a rating of 1-10)

Also:

how can I have the drop down box, direct where the form/post goes?
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:08 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.08341 seconds
  • Memory Usage 2,361KB
  • 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
  • (2)bbcode_html
  • (7)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
  • (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