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
  #332  
Old 03-10-2007, 07:17 AM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gamma912 View Post
Will this work for say a job website - people can submit their jobs or classifieds using this form and then it will go to a thread?

What about uploading of resumes?
You create a form....the plugin posts the content of the form to a new post in your specified forum whenever someone uses it.

so yes, you can make a job form, people use it, the results end up in a forum. Same with resumes, you create the form, they use it, the results end up in a forum....

but you have to design the form first
Reply With Quote
  #333  
Old 03-10-2007, 01:52 PM
ravencr ravencr is offline
 
Join Date: Feb 2007
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need a form hack to figure out the form hack. Anybody?

Chris
Reply With Quote
  #334  
Old 03-10-2007, 03:30 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I shouldnt have posted this here, I am sorry, I saw no html faq area & figured ppl with form knowledge could help me out. This is my first "crude html form", but it works. I am using this on a vb site of a friend that wants this to email the form to him & re-direct applicants to another page. I have tried so many times to get the re-direct to work...I cant, as you see looking at my creation that I am not that good at html and I am in the kindergarden stage of it. Also, when submit is clicked, pop-up appears asking if its ok to send...no problem, but then another pop up appears showing somewhat the same with a blank send to box, clicking send works, and email is sent. In your mail box is shows:"Form posted from Windows Internet Explorer." not from site itself...how do I fix this? If anyone could help me set up my re-direct I would be forever in your debt.....





Code:
<html>
<div style="border: 25px ridge;">
<body>
<FONT COLOR="FFD700">
<h1 align="center">YOUR TITLE</h1>
<form action="MAILTO:YOUR EMAIL ADDRESS"method="POST"enctype="text/plain">
<p style="text-align: center;">
1.  Real Name:<br><br> <input type="text" name="1.  Real Name">
<br><br>
2.  AA Name:<br><br> <input type="textbox" name="2.  AA Name">
<br><br>
3.  Have you read the Code of Conduct and willing to abide by it at all times?<br><br>
Yes: 
<input type="radio" checked="checked"name="3.  Have you read the Code of Conduct and willing to abide by it at all times?" value="yes">
<br><br>
No: 
<input type="radio"name="3.  Have you read the Code of Conduct and willing to abide by it at all times?" value="No"><br><br>
4.  Are you 18 years of age or older?
<br><br>
Yes: 
<input type="radio" checked="checked"name="4.  Are you 18 years of age or older?" value="Yes">
<br><br>
No: 
<input type="radio"name="4.  Are you 18 years of age or older?" value="No">
<br><br>
5.  What is your AAGUID Number?<br><br> 
<input type="text" name="5. What is your AAGUID Number?">
<br><br>
6.  Do you have a AAO Tracker account? <br><br>
Yes: 
<input type="radio" checked="checked"name="6. Do you have a AAO Tracker account?" value="Yes">
<br><br>
No: 
<input type="radio"name="6. Do you have a AAO Tracker account?" value="No">
<br><br>
7.  Link to YOUR AAO Tracker account?<br><br> 
<input type="text" name="7.  Link to YOUR AAO Tracker account?">
<br><br>
8.  Are you able to donate $10.00/month?<br><br>
Yes: <input type="radio" checked="checked"name="8.  Are you able to donate $10.00/month?" value="Yes">
<br><br>
No: <input type="radio"checked="checked"name="8.  Are you able to donate $10.00/month?" value="No">
<br><br>
9.  Please list previous clans that you have been with in the past.<br><br>

<textarea cols="50" rows="14" name="9.  Please list previous clans that you have been with in the past."></textarea><br><br>


10.  Please list previous account names that you have used in the past.<br><br>


<textarea cols="50" rows="14" name="10.  Please list previous account names that you have used in the past."></textarea><br><br>


11.  Please tell us a little bit about yourself and why you want to join BlackwaterOps.<br><br>


<textarea cols="50" rows="14" name="11. Please tell us a little bit about yourself and why you want to join BlackwaterOps."></textarea><br><br>

12.  Have you ever been banned for cheating/hacking/exploiting or linked to any accounts that have been banned for cheating/hacking/exploiting?<br><br>
Yes: 
<input type="radio" checked="banned"name="12. Have you ever been banned for cheating/hacking/exploiting or linked to any accounts that have been banned for cheating/hacking/exploiting?" value="Yes">
<br><br>
No: 
<input type="radio"name="12. Have you ever been banned for cheating/hacking/exploiting or linked to any accounts that have been banned for cheating/hacking/exploiting?" value="No">
<br><br>
<input type="hidden" name="sendtoemail" value="YOUR EMAIL ADDRESS"><br>
<input type="submit" value="Submit"><br></p>
<input type="hidden" name="redirect" value="YOUR URL">


</FONT>
</form>


</body>
</div>
</html>
</form>

</body>
</html>


EDIT: Never mind, I figured it out.
Reply With Quote
  #335  
Old 03-11-2007, 01:57 PM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out a cool method of redirecting to the post (option "1" in the Form Hack) if you're a registered user, admin, etc. but redirecting Unregistered Users to the "Thank you" message telling them that their form will be put in queue for moderation. This prevents the "Invalid Thread specified" errors if you moderate Unregistered Users form submissions and have the redirect set to "1".

1. First you need to change the Forum Permissions so that Unregistered can Post New Threads in the forum your Form Hack uses. You'll have to disable Image Verification for guests, though.. but I don't find it a problem since I don't allow Guests to post in any of my forums. Does anyone know if there is a forum-specific Image Verification hack??

2. Open up the Form Hack plugin. Set the "$redirectoption" to "1". You can also do this to 2-4, but I haven't tried it. If you do it for 2-4, make sure to change the correct "redirectoption" in the next step.

3. Find
Code:
if ($redirectoption == "1")
    	{
        	$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
        	eval(print_standard_redirect('redirect_postthanks'));
        	exit();
    	}
and replace with
Code:
if ($redirectoption == "1" AND in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7)))
    	{
        	$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
        	eval(print_standard_redirect('redirect_postthanks'));
        	exit();
    	}
You can change 2,5,6,7 to whatever Usergroup IDs you WANT to redirect to the post, thread, etc. Just make sure you exclude Unregistered users..you will get the redirect error, since the post doesn't exist because it's still in Moderation.

4. Configure the "$errormessage" to tell the Unregistered users that their submitted form has been put in queue for moderation.
Quote:
Thank you for submitting this form!
<br /><br />
If you are unregistered or not logged in this will be added to the queue for moderation. You will not see this thread until we approve it.
<br /><br />
Thank you! You may return to the forum <a href=\"http://www.YOURDOMAIN.com/forums/forumdisplay.php?f=X\">Here.</a>
If you are going to use any kind of HTML (with quotations) in your message, you must put a backward slash \ in front of each quotation mark ". Otherwise you will get parse errors. Make sure to change YOURDOMAIN, and X to the proper Forum ID.


Well I'm off to figure out how to do the "Thank You" message AND automatically redirect back to the forum now that I've gotten part way there. You can also use my method above for different reasons. It's essentially allowing you 2 redirect options instead of one.
Reply With Quote
  #336  
Old 03-12-2007, 03:59 PM
shadowdancer36 shadowdancer36 is offline
 
Join Date: Nov 2005
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having a problem with my forms sending me an email. It only seems to do this once I log on. I set up a form to do registrations for a program training and they all got caught in a que of some sort and wasn't released until I logged in as a admin. Then all the emails were sent out at once. Have any idea why this would be?
Reply With Quote
  #337  
Old 03-13-2007, 08:18 PM
gamma912 gamma912 is offline
 
Join Date: Feb 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the most difficult thing is editing the template to include more fields?!

Can the developer show us snippets of code to add more of a certain type of question?

I mean where does the code for a certain question start and end? And what makes up the parts of the code? The variable what else?
Reply With Quote
  #338  
Old 03-14-2007, 12:00 AM
tekstylez tekstylez is offline
 
Join Date: Aug 2006
Location: Philly
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to be kidding me.... this is the most complicated hack I have ever tried to use... How could this even be considered for MOTM???
Reply With Quote
  #339  
Old 03-14-2007, 12:13 AM
totalc totalc is offline
 
Join Date: Jan 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found this fairly simple to use and it works very well for a lot of stuff.
Reply With Quote
  #340  
Old 03-14-2007, 01:34 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It B kinda difficult at first, but once you understand it, it be really COOL.
I signed up for some of those Form makers on the net and never could get those suckers to do what I needed. But now that I've figured out this hack, its all gravy.

Thanks ABE
Reply With Quote
  #341  
Old 03-15-2007, 10:05 AM
vien vien is offline
 
Join Date: Nov 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont know why I get this error, even I did uninstall the hack.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/vtn/public_html/forum/newthread.php(71) : eval()'d code on line 641

Now everything I click on "New thread" this error appears on the top banner. Please advise.. Thanks so much.
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 08:01 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.06457 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
  • (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