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
  #222  
Old 12-30-2006, 04:13 PM
Mr Pink's Avatar
Mr Pink Mr Pink is offline
 
Join Date: Oct 2006
Location: [Italy]
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely
Thanks.
Reply With Quote
  #223  
Old 12-30-2006, 05:08 PM
civil78's Avatar
civil78 civil78 is offline
 
Join Date: Nov 2005
Location: Greece
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely

I do have one question on editing, look at Screen Shot and please tell me how to get rid of the 5 dots....Please & Thank You,
First of all you use this for the radio button.

HTML Code:
<td><input type="radio" name="radioanswer1" value="" checked="checked" />  </td>
<td><input type="radio" name="radioanswer1" value="" checked="checked" />  </td>
This is wrong because you don't parse any value with
HTML Code:
value=""
Second you don?t put a string between
HTML Code:
/>  </td>
this is required to know the user what it means the check and to parse a value on $RadioAnswer if this opton is checked.
Third you can't set as checked both radio buttons with this
HTML Code:
checked="checked"
The correct format is this

HTML Code:
<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceA" <if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if> /> $RadioChoiceA
<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceB" <if condition="$RadioChoiceB == $RadioAnswer">checked="checked"</if> /> $RadioChoiceB
RadioAnswer1 -> The name i must be the same in every group of radio buttons.

$RadioChoiceA,$RadioChoiceB -> These variables must set it in the PHP code of your form with this to show it on the user.

PHP Code:
$RadioChoiceA "Message of option 1";
$RadioChoiceB "Message of option 2"
$RadioAnswer -> In PHP again this variable keeps the choice of the user (in this string keeps the values of options $RadioChoiceA or $RadioChoiceB)

PHP Code:
'Part 1'
RadioAnswer' => TYPE_STR,
'
Part 2
$RadioAnswer 
$vbulletin->GPC['RadioAnswer']; 
Final if you see we use this if condition

PHP Code:
<if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if> 
This is because if you make Reset or Preview the user wants to keep the choice.

I hope that it helps.
Reply With Quote
  #224  
Old 12-30-2006, 08:31 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank You Very Much...
Reply With Quote
  #225  
Old 12-30-2006, 09:50 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
trying after a long while to reinstate this functionality.
I'm using it in conjunction with your 'edit new thread button' hack to open a classified adverts form for several specific (classifieds) forums.
So I need to have an &f=n in the link to the form.
E.g. And you have a comment in your plugin which says
Quote:
//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.
So I did this:
PHP Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'ad_type' => TYPE_STR,
'ad_title' => TYPE_STR,
'ad_location' => TYPE_STR,
'ad_agree' => TYPE_STR,
'f' => TYPE_STR
));

// Part 2
$ad_type $vbulletin->GPC['ad_type'];
$ad_title $vbulletin->GPC['ad_title'];
$ad_location $vbulletin->GPC['ad_location'];
$ad_agree $vbulletin->GPC['ad_agree'];
$f $vbulletin->GPC['f']; 
and I put this in, 'just in case'
PHP Code:
//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.
if (!$f) {$f=62;}  // default forum is av kit for sale
$formforumid $f
But the value of f isn't being assigned to the parameter variable. It's always 62
What additional stuff do I need, please?
And do I need to create a hidden input in the form value of $f to pass it on?
Reply With Quote
  #226  
Old 01-03-2007, 03:26 AM
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Location: San Diego, CA
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am looking for a developer to help me with creating a few simple forms that I don't have time to deal with.

If you are interested, please PM me.

Thanks
Reply With Quote
  #227  
Old 01-03-2007, 02:14 PM
Luky Luky is offline
 
Join Date: Oct 2006
Location: Australia
Posts: 595
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome Idea!
Reply With Quote
  #228  
Old 01-05-2007, 10:17 PM
hal05 hal05 is offline
 
Join Date: Aug 2005
Location: Mid-Michigan
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking for the same thing, everything else looks good.:surprised:

Quote:
Originally Posted by DarkDraco07 View Post
how can i make it possible to use $post[fieldx] variable as my $posttitle? i would really like this to work. thx
Reply With Quote
  #229  
Old 01-06-2007, 09:55 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help with my request above?
Thanks
Reply With Quote
  #230  
Old 01-13-2007, 02:17 PM
civil78's Avatar
civil78 civil78 is offline
 
Join Date: Nov 2005
Location: Greece
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can make a form that it creates a poll in the message, but I am trying to find the way to make it to vote in an existing poll in a thread. Any idea?
Reply With Quote
  #231  
Old 01-13-2007, 04:24 PM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Suggestion for future version: The ability for the contents of the form to be posted as an event in the calendar.
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 10:35 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.05940 seconds
  • Memory Usage 2,350KB
  • Queries Executed 28 (?)
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
  • (5)bbcode_html
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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