Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
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
  #282  
Old 02-13-2007, 10:00 PM
fviper fviper is offline
 
Join Date: Jan 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey All,

I've seen several people ask how to get the dropdown menus to determine what thread to respond to using this hack.

I "think" I figured it out after much cussing lol...

I wound up NOT having to declare any new variables, and NOT having to modify the "form" template. All I did was pretty much what I had been working on previously, but called it slightly differently since the calls I was making were causing SQL to panic because of the array usage.

Here's the code if you're interested: Replace the $formreplythreadid = "XX"; (in the Form Plugin - NOT the template) with:

Code:
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "1";
if ($dropdownanswer1 == 'Mage'){
$formreplythreadid = "43";}
if ($dropdownanswer1 == 'Warlock'){
$formreplythreadid = "34";}
if ($dropdownanswer1 == 'Warrior'){
$formreplythreadid = "41";}
if ($dropdownanswer1 == 'Rogue'){
$formreplythreadid = "42";}
if ($dropdownanswer1 == 'Priest'){
$formreplythreadid = "40";}
if ($dropdownanswer1 == 'Hunter'){
$formreplythreadid = "46";}
if ($dropdownanswer1 == 'Paladin'){
$formreplythreadid = "45";}
if ($dropdownanswer1 == 'Shaman'){
$formreplythreadid = "44";}
//EXISTING THREAD ID FOR FORM TO REPLY IN
Obviously, you would want to replace the numerics I have here with the appropriate threads to your forums. I would "assume" that posting to a forum would follow a similar pattern. As you can see, I use this form for recruiting purposes for World of Warcraft *grin*. The single quotes and the literal term of what the variable should be were the key apparently. Thanks for all the help - I hope it finds you well =)
Reply With Quote
  #283  
Old 02-15-2007, 09:53 AM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kiint View Post
I've been getting the following displayed on any form that has been submitted:

<!-- BEGIN TEMPLATE: applyanswers -->

and at the bottom:

<!-- END TEMPLATE: applyanswers -->

Where can I remove these so they do not show up on any post made by the form? I've been looking through the templates and plugin code but can't find them.

Please help.
Anyone have an answer to this problem?
Reply With Quote
  #284  
Old 02-15-2007, 12:46 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm interested in getting rid of those notices as well.

Also, in this part of the mod:

Code:
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";
Is it possible to have it show a note AND have it redirect? Much like the normal functionality of vBulletin, how after you post, it tells you thanks, then redirects you.

Anyone?

Another issue I'm having is that this mod is creating a bunch of threads with the same title. How would I go about pulling the title of the thread from a text box that the user fills out in the form?

EDIT: so I figured there's got to be a way to do this. If I create a question that asks the user to give a basic description of the bug they have found in the software I might be able to pull the answer to that question and have it be the title to the thread. I've created the question, but how do I have it call that answer to name the thread?

EDIT2: Found the answer after reading through the thread:

Quote:
Originally Posted by ChrisBaktis View Post
I have my form posting as a thread - the members enter $normalanswer1 with the username of someone they trade with...when the form posts I want the title of the thread created to be the username of the person posting the form and $normalanswer1...

on the old version I think I did '$bbuserinfo[username] / $normalanswer1' but when I do that in the $posttitle part now the $bbuserinfo doesnt work...any suggestions?
and the answer:

Quote:
Originally Posted by R.Caldwell View Post
this code should work just fine in the hack code itself.
PHP Code:
$posttitle "$bbuserinfo[username]"
Only, in my instance, I used the following:

PHP Code:
$posttitle "$normalanswer2"


So far, this mod has been great!
Reply With Quote
  #285  
Old 02-15-2007, 06:14 PM
Krahl Krahl is offline
 
Join Date: Aug 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love the mod. It's working perfectly for what I needed.

One quick question though.. how do I keep all of the choices in a checkbox "checked" when it posts? It allows more than one option to be checked but still only sends the first choice.

Installed!
Reply With Quote
  #286  
Old 02-15-2007, 07:44 PM
thalamus's Avatar
thalamus thalamus is offline
 
Join Date: Sep 2005
Location: UK
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't see anywhere the issue of these forms going into the moderation queue being resolved, or even a pointer as to why this happens when the forum and usergourp permissions have been set accordingly.

Another question I have... is there a way of being able to define the user that actually makes the post (in the event of unregistered guests being able to complet the form) - at least that way the problem of moderation may be cured.

A Captcha device would be good too

Apart from that, a great mod - excellent
Reply With Quote
  #287  
Old 02-15-2007, 08:16 PM
jacki jacki is offline
 
Join Date: Jun 2006
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

I set this form before and all forms are received me and when my super moderators write reply that form their message number are rising.But after my update forum version, even though I send reply that form viewing number get higher but reply number still 0. When I enter the form I can see the replies.

Screen Shot

1 - http://img527.imageshack.us/img527/7943/40914909to6.gif

2 - http://img259.imageshack.us/img259/7732/98835333bh5.gif
Reply With Quote
  #288  
Old 02-16-2007, 02:29 AM
thalamus's Avatar
thalamus thalamus is offline
 
Join Date: Sep 2005
Location: UK
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, in asnwer to my previous, I've managed to hack the plugin file to accept vBulletin's own image recognition Captcha system that is being used on the current Contact Us form (sendmessage.php). The image recognition is a 'must have' for my site, and it's the only way I can get this form to work with unregistered users.

However, with those same users, I'm still having a real problem with the Moderation, though... I've allowed the users to post in the preset forum permissions, I've even tried to send values through the $threadinfo array (specifically ['visible'] = '1') into the build_new_post function from the plugin file, all to no avail.

Could I be missing something really obvious here?
Reply With Quote
  #289  
Old 02-16-2007, 12:00 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kiint View Post
I've been getting the following displayed on any form that has been submitted:

<!-- BEGIN TEMPLATE: applyanswers -->

and at the bottom:

<!-- END TEMPLATE: applyanswers -->

Where can I remove these so they do not show up on any post made by the form? I've been looking through the templates and plugin code but can't find them.

Please help.
This is really the only thing holding me back from releasing this on our forums.

Does anyone have any insight?
Reply With Quote
  #290  
Old 02-16-2007, 01:05 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hopping someone can help me with this.
I’ve customized a form and have everything working accept it seems that the person submitting the form needs to be logged into the forum. Is there any way that anyone regardless of whether they are logged in or not can submit?
Reply With Quote
  #291  
Old 02-16-2007, 02:41 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by upnorth View Post
Hopping someone can help me with this.
I’ve customized a form and have everything working accept it seems that the person submitting the form needs to be logged into the forum. Is there any way that anyone regardless of whether they are logged in or not can submit?

You would have to give all guest in admincp/usergroups/usergroup manager/unregistered not logged in/edit rights to post in forums. This form hack is more or less a thread and when a person fills it out it shows as new post.
Reply With Quote
Reply

Thread Tools

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 06:50 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.11029 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (5)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