Version: 4.1, by Abe1
Developer Last Online: Jun 2010
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.
I have the need for 2 forms. I made the easier one of the 2 first and tested it and it works fine. When I do the 2nd one, it gives me the following error when I try to submit the form.
Quote:
Fatal error: Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in \includes\class_dm.php on line 763
where is this : /newthread.php?do=form ? Where do i put it, can anyone help me?
Go to Plugins & Products --> Plugin Manager and edit under the the Product : Form Hack the Form Hack plugin (you can add more forms if you go down in the [Add New Plugin], see the example of Form Hack and clone it) and in the inside the php code find this
As you see you can add multiple forms just change the name in the $formname varieble in every new plugin.
Also if you want to make new forms you have to change or add a new template in Styles & Templates, the templates with names in this variebles.
PHP Code:
// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";
$maintemplate is the varieble that contains the name of the template as it show if you call the newthread.php?do=form url, and the $answertemplate contains the name of the template of the post.
I'm starting to become very proficient with this plugin and I've created 5 separate "advanced" forms, but now I'd like to take it to a new level.
I want to move the form from posting a message in a thread to posting a calendar event. How difficult would this be?
For instance, the normal forms point to newthread_start and I'm guessing I would change this to calendar_start. So my questions are thus:
1. What form elements would I use to handle date parameters that are already in the existing calendars?
2. Would the form elements have to be separate to account for single day, multi-day, and recurring events?
3. If you look at a "recurring calendar event" I would want to start the form so that it looks exactly like this, with the exception of the editor box which the rest of the form would replace so that I could choose the type of questions/answers I would use here.
I know this might sound difficult, but I feel that if I'm pointed in the right direction, I'm positive I could figure it out. I'm good at hacking/editing existing code due to having a photographic memory.