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
  #272  
Old 02-08-2007, 09:54 PM
hal05 hal05 is offline
 
Join Date: Aug 2005
Location: Mid-Michigan
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is the only thing that is missing for us.

Quote:
Originally Posted by ryansmith View Post
Is there a way to make the $posttitle one of the inputs? For instance, if I create a field called "Title" and allow a user to type a title, how do I make that show up as the actual $posttitle?

EDIT: I figured it out It works great now.
Reply With Quote
  #273  
Old 02-09-2007, 02:48 AM
GBSteve GBSteve is offline
 
Join Date: Jan 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

man people this mod isn't that hard to grasp. you add your variables to parts 1 and 2 and define ur question variables on the plugin. your questions form is friggin html - not that tricky. if u want something to show up, you type it. if its a variable from the plugin, you call it with a dollar sign ($). on the answer form, its just bbcode - you wanna answer to show up you call it with the $ and if you want to bold it you friggin' bbcode bold the thing.

as far as the 5-star ratings, why would you rate a form that isn't filled out? you would only need to rate the data on the form, which lucky for everyone who is using this hack, the data is posted as either a thread or a post and if you've got the rating system turned on, well presto chango you can rate the threads/posts that submitting your form creates.

hal05 - $posttitle = "$title". make sure you put title in part 1 and 2 and change the code below part 2 where it says by default $posttitle = $formtitle.
Reply With Quote
  #274  
Old 02-09-2007, 04:30 PM
Gandiel Gandiel is offline
 
Join Date: Jan 2007
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GBSteve View Post
and if you want to bold it you friggin' bbcode bold the thing.
Uhhh.. it's not as simple as that, GBSteve... at least not in my experience.

If you want to [.B][/B.] your questions, for example, you'll have to put a space inbetween the [.B] tag and your variable (and also at the end before the closing [/B.] tag. Otherwise, you'll get a parse error when you try to save it.

So, your bolded question would look like this: [.B]<space>$variable<space>[/B.]

Furthermore, not all BBCode gives a parse error if you don't do this. i.e. [.SIZE=4][/SIZE.] works fine without the <space>.


Note: The periods or dots are put in the above code so I could get them to appear here.
Reply With Quote
  #275  
Old 02-12-2007, 12:13 PM
molieman's Avatar
molieman molieman is offline
 
Join Date: Oct 2006
Location: Ocala, FL
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love to have this work on my site, I can see lot's of uses. Excellent MOD!!!!

I have to be honest, the instructions are beyond me.... I've tried to install this and followed the instructions.... Simple for the not so newbies, but, again, beyond me.

I'll keep checking for explicate, understandable instructions (at least for me)
Reply With Quote
  #276  
Old 02-12-2007, 12:31 PM
Bonee70 Bonee70 is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So can anyone help me? I still can't get this to work and get the "internal server error" message....
Reply With Quote
  #277  
Old 02-13-2007, 04:05 AM
NightPhoenix NightPhoenix is offline
 
Join Date: Sep 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a problem here.... Here's my form http://www.shuhalo.com/home/newthread.php?do=form

It looks just how I want it, BUT it won't post the info right... It posts the radio buttons first and only 3 of the questions.

I want it to post the same order as the form is laid out.
Reply With Quote
  #278  
Old 02-13-2007, 08:41 AM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #279  
Old 02-13-2007, 10:48 AM
fviper fviper is offline
 
Join Date: Jan 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey NightPhoenix,

It sounds like you need to go to your StyleManager in the admincp, and modify the "formanswers" template that's created by default. I had the same problem, and all that's needed is to place the desired variables on that template in the order you want them in, and voila. I use my page for recruiting too - lol. http://www.adversaryguild.com/forums...ad.php?do=form

One thing i'd personally like to see is posting the answers in a tabular format similar to the manner in which the questions are given. I've been able to semi get what I want by putting html code on the formanswers template. The only real trick to using html code on that page is that you have to butt it all up against each other on a single line - or as close as you can get it. If you don't have it on a single line, for every line of code you have on that page, you will get a blank space on the output page. Perhaps there's a setting he has to allow html code for the output somewhere - not sure.

Also, if anyone has figured out a way to get one of the dropdown answers to be a variable for the replythread or forum post id, i'd greatly appreciate some insight. I see where he suggests using "do=form&f=1" in the comments field, but i'm not certain how to define that in the html side to post there.

Thanks!
Reply With Quote
  #280  
Old 02-13-2007, 03:34 PM
MidnightShadows MidnightShadows is offline
 
Join Date: Jan 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack but I have an issue LOL

I installed it, created a nice looking form and decided I wanted a second form. Did was said in the instructions but then I went back to check up on both forms and neither worked. So I disabled the new form and voila my old form worked again. Whatever I try it doesn't seem to work with two forms. What am I doing wrong? Am I missing something?

Thanks in advance

eta It's solved...
Reply With Quote
  #281  
Old 02-13-2007, 04:28 PM
fviper fviper is offline
 
Join Date: Jan 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey All,

It seems like this is a common question... What I have is a dropdown menu that based on the user's selection, I would like it to be able to reply to an already existent thread. Here's my code thus far:

Code:
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "1";
$formreplythreadid = "41";
//EXISTING THREAD ID FOR FORM TO REPLY IN
Code:
//////////////////////////////////////////////////////
$dropdownquestion1 = "CLASS";
// The following choices must NOT have quotation marks
$dropdownchoice1a = "Please Select One";
$dropdownchoice1b = "Warrior";
$dropdownchoice1c = "Rogue";
$dropdownchoice1d = "Paladin";
$dropdownchoice1e = "Druid";
$dropdownchoice1f = "Priest";
$dropdownchoice1g = "Mage";
$dropdownchoice1h = "Warlock";
$dropdownchoice1i = "Shaman";
//////////////////////////////////////////////////////
That was from the plugin. All of the variables are properly declared, and the form posts its reply as it should, but only to a staticly set thread.

Here's what I have from my template:

Code:
<tr>
<td class="alt1" valign="middle">
<b>$dropdownquestion1</b>:
</td>
<td class="alt1" valign="middle" colspan="2">
<select name="dropdownanswer1">
<option value="$dropdownchoice1a" <if condition="$dropdownchoice1a == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1a</option>
<option value="$dropdownchoice1b" <if condition="$dropdownchoice1b == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1b</option>
<option value="$dropdownchoice1c" <if condition="$dropdownchoice1c == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1c</option>
<option value="$dropdownchoice1d" <if condition="$dropdownchoice1d == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1d</option>
<option value="$dropdownchoice1e" <if condition="$dropdownchoice1e == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1e</option>
<option value="$dropdownchoice1f" <if condition="$dropdownchoice1f == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1f</option>
<option value="$dropdownchoice1g" <if condition="$dropdownchoice1g == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1g</option>
<option value="$dropdownchoice1h" <if condition="$dropdownchoice1h == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1h</option>
<option value="$dropdownchoice1i" <if condition="$dropdownchoice1i == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1i</option>
</select></td>
</tr>
I have tried putting conditional statements in on the plugin side and am met with "Cannot use a scalar value as an array". I can only assume I am not using array-based variables there properly. Looking at the last snippet of code, where in the option value can I assign "do=form&t=1" based on each selection?

Example: If they select dropdownchoice 1b from here, the corresponding thread that $formreplythreadid would be to 34, 1c would go to 31, so on and so forth.

Any thoughts? Sample code would be great if anyone can provide any
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 12:52 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.17934 seconds
  • Memory Usage 2,325KB
  • 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
  • (3)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