Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forms Hack Details »»
Forms Hack
Version: 3.5, by Abe1 Abe1 is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 08-09-2005 Last Update: 05-30-2006 Installs: 467
Uses Plugins Template Edits
 
No support by the author.

Forms Hack 3.5


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 to upload attachments
  • 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

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 2.0: (08/10/2005)
  • Ported over for vb3.5

Version 2.1: (08/10/2005)
  • bug fix with answers not showing

Version 2.5: (08/13/2005)
  • Major update:
  • Templates have a few lines changed here and there.
  • You can now have more then 2 poll options very easily
  • Polls can't be created if your not creating a new thread
  • New Thread now uses VB function to add the thread
  • New Poll now uses VB function to add the poll
  • New Reply now uses VB function to add the reply
  • PM now uses VB function to send the PM

Version 2.6: (08/21/2005)
  • fixed bug with posts having to be moderated

Version 2.7: (08/23/2005)
  • Minor update:
  • Fixed some issues with signatures, URL parsing, and subscriptions
  • Option to name the post titles
  • Made template XHTML 1.0 Transitional

Version 3.0: (11/29/2005)
  • Major update:
  • Added drop down menu
  • Made the long answer show up in a the vb message box
  • Re-wrote some instructions
  • Pressing back should save work
  • Both templates and plug-in were edited
  • Some more minor things

Version 3.1: (12/07/2005)
  • Brought back the standard text box (longanswer)

Version 3.2: (12/09/2005)
  • [ADDED] Option to make polls public.

Version 3.3: (12/19/2005)
  • [FIXED] Guests can now post using the forms to make a thread or post. They cannot send a PM though.
  • [ADDED] Paypal link so you can make a donation for this hack.

Version 3.4: (04/05/2006)
  • [FIXED] Removed extra line from template.
  • [ADDED] WYSIWYG editor now works besides the regular editor.
  • [ADDED] Preview.
  • [CHANGED] Subscriptions now take from user default setting.

Version 3.5: (05/31/2006)
  • [ADDED] Check boxes.


Abe1 with rights from Dr Erwin Loh

This hack is created for your use free of charge. No payment is requested. However, if you would like to donate money for the work I put in to this hack, a donation would show your appreciation.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #992  
Old 08-03-2006, 08:06 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mschvili
Hi Abe.

I know. Here's another one asking for the attachment. I sure would help a lot if it would be able to attach files.

I will use the form in a support function and if the user won't be able to send pictures of their problems.. then it would be a whole support function.

Is it planned? Possible at all.

Thank you for a extremly good job!!
Maybe in the vb 3.6 version.
Reply With Quote
  #993  
Old 08-05-2006, 03:20 AM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question, i have it setup to make a new thread everytime. Well if what they put into the longbox is too long it wont post the new thread. Anyway to split up the thread into multiple posts inside the thread if its too long or at least notify the user that it was too long?

Also i notice a lot people ask about how to get usernames emails etc... Maybe it should be added in an example somewhere.
$bbuserinfo = $vbulletin->userinfo;
then use $bbuserinfo[choose an one of the user infos below]

Example
$bbuserinfo[userid]
or
$bbuserinfo[username]
etc...

userid
usergroupid
membergroupids
displaygroupid
username
password
passworddate
email
styleid
parentemail
homepage
icq
aim
yahoo
msn
skype
showvbcode
showbirthday
usertitle
customtitle
joindate
daysprune
lastvisit
lastactivity
lastpost
posts
reputation
reputationlevelid
timezoneoffset
pmpopup
avatarid
avatarrevision
profilepicrevision
options
birthday
birthday_search
maxposts
startofweek
ipaddress
referrerid
languageid
emailstamp
threadedmode
autosubscribe
pmtotal
pmunread
Reply With Quote
  #994  
Old 08-08-2006, 02:51 PM
mschvili mschvili is offline
 
Join Date: Jul 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I use the form as a support form I want to use the same form for several forums (about 30).

As soon as the user select the add thread button in those forum you should get the forum.

Sound logical, doesn't it :-)

Super hack by the way!!
Reply With Quote
  #995  
Old 08-09-2006, 06:23 AM
Murty's Avatar
Murty Murty is offline
 
Join Date: Dec 2005
Location: South Australia
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed this, an i fully cant figure out how to put in more radio buttons for some questions and take out other defualt questions, can you refer me to a post or gimme something to work with? thanks.
Reply With Quote
  #996  
Old 08-09-2006, 12:55 PM
ProperMethodz's Avatar
ProperMethodz ProperMethodz is offline
 
Join Date: Jan 2005
Location: Stamford CT
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm currently working on a Horde specific WoW application form. Is it alright if I posted it as my own but referenced this thread? I'm putting a lot of work into it and have already spent about 20 hours total on it.
Reply With Quote
  #997  
Old 08-10-2006, 03:59 PM
ProperMethodz's Avatar
ProperMethodz ProperMethodz is offline
 
Join Date: Jan 2005
Location: Stamford CT
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Abe, first off... Awesome hack. This has taught me a lot about how vb works and how to customize a lot of different things I had never tried.

On to my problem. As you can see in my previous post, I've been working on a form. So far it's a pretty intensive, well intensive for me, form.

I started with getting all the information on the page by copy and pasting code then changing the function name, value and name variables to fit the layout I needed. I then went down to the customize area and put in the questions and answers I wanted.

The last part before I want to mess with any of the permissions is the template and Variables. See before I started messing with the variables, only some of my answers would come out. So I looked back and found that I was missing some information there. So I started customizing all the variables and am afraid I mesed up royaly because now... no answers show in the PM/E-mail/Thread creation.

Please tell me what the heck I did wrong... I don't get it. I mimicked what you did .


Here's the template code:

Code:
<template name="formanswers" templatetype="template" date="1149082732" username="ProperMethodz" version="3.5.4"><![CDATA[$formtitle
$bbuserinfo[username]

$question1
$answer1

$question2
$answer2

$question3
$answer3
-------------------------------------------------

$question4 
$answer4

$dropdownquestion1 
$dropdownanswer1

$dropdownquestion2 
$dropdownanswer2

$questionlevel 
$answerlevel

$dropdownquestion3 
$dropdownanswer3

$dropdownquestion4
$dropdownanswer4 $dropdownanswer4a

$dropdownquestion5 
$dropdownanswer5 $dropdownanswer5a

$question5 
$answer5

$question7 
$answer7

$checkboxquestion1
$checkboxanswer1_1
$checkboxanswer1_2
$checkboxanswer1_3
$checkboxanswer1_4
$checkboxanswer1_5
$checkboxanswer1_6
$checkboxanswer1_7
$checkboxanswer1_8
$checkboxanswer1_9
$checkboxanswer1_10
$checkboxanswer1_11
$checkboxanswer1_12
$checkboxanswer1_13
$checkboxanswer1_14
$checkboxanswer1_15

$radioquestion1 
$radioanswer1

$radioquestion2 
$radioanswer2

$question8 
$answer8

$question6 
$answer6a
$answer6b
$answer6c

$vbtextquestion1
------------------------------------------------------

$vbtextanswer

------------------------------------------------------
$vbtextquestion2
------------------------------------------------------

$vbtextanswer2

------------------------------------------------------]]></template>
Here's the variable code:
Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
'$answer2' => TYPE_STR,
'$answer3' => TYPE_STR,
'$answer4' => TYPE_STR,
'$dropdownanswer1' => TYPE_STR,
'$dropdownanswer2' => TYPE_STR,
'$answerlevel' => TYPE_STR,
'$dropdownanswer3' => TYPE_STR,
'$dropdownanswer4' => TYPE_STR,
'$dropdownanswer4a' => TYPE_STR,
'$dropdownanswer5' => TYPE_STR,
'$dropdownanswer5a' => TYPE_STR,
'$answer5' => TYPE_STR,
'$answer7' => TYPE_STR,
'$checkboxanswer1_1' => TYPE_STR,
'$checkboxanswer1_2' => TYPE_STR,
'$checkboxanswer1_3' => TYPE_STR,
'$checkboxanswer1_4' => TYPE_STR,
'$checkboxanswer1_5' => TYPE_STR,
'$checkboxanswer1_6' => TYPE_STR,
'$checkboxanswer1_7' => TYPE_STR,
'$checkboxanswer1_8' => TYPE_STR,
'$checkboxanswer1_9' => TYPE_STR,
'$checkboxanswer1_10' => TYPE_STR,
'$checkboxanswer1_11' => TYPE_STR,
'$checkboxanswer1_12' => TYPE_STR,
'$checkboxanswer1_13' => TYPE_STR,
'$checkboxanswer1_14' => TYPE_STR,
'$checkboxanswer1_15' => TYPE_STR,
'$radioanswer1' => TYPE_STR,
'$radioanswer2' => TYPE_STR,
'$answer8' => TYPE_STR,
'$answer6a' => TYPE_STR,
'$answer6b' => TYPE_STR,
'$answer6c' => TYPE_STR,
'$vbtextanswer' => TYPE_STR,
'$vbtextanswer2' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$dropdownanswer2 = $vbulletin->GPC['dropdownanswer2'];
$answerlevel = $vbulletin->GPC['answerlevel'];
$dropdownanswer3 = $vbulletin->GPC['dropdownanswer3'];
$dropdownanswer4 = $vbulletin->GPC['dropdownanswer4'];
$dropdownanswer4a = $vbulletin->GPC['dropdownanswer4a'];
$dropdownanswer5 = $vbulletin->GPC['dropdownanswer5'];
$dropdownanswer5a = $vbulletin->GPC['dropdownanswer5a'];
$answer5 = $vbulletin->GPC['answer5'];
$answer7 = $vbulletin->GPC['answer7'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3'];
$checkboxanswer1_4 = $vbulletin->GPC['checkboxanswer1_4'];
$checkboxanswer1_5 = $vbulletin->GPC['checkboxanswer1_5'];
$checkboxanswer1_6 = $vbulletin->GPC['checkboxanswer1_6'];
$checkboxanswer1_7 = $vbulletin->GPC['checkboxanswer1_7'];
$checkboxanswer1_8 = $vbulletin->GPC['checkboxanswer1_8'];
$checkboxanswer1_9 = $vbulletin->GPC['checkboxanswer1_9'];
$checkboxanswer1_10 = $vbulletin->GPC['checkboxanswer1_10'];
$checkboxanswer1_11 = $vbulletin->GPC['checkboxanswer1_11'];
$checkboxanswer1_12 = $vbulletin->GPC['checkboxanswer1_12'];
$checkboxanswer1_13 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_14 = $vbulletin->GPC['checkboxanswer1_14'];
$checkboxanswer1_15 = $vbulletin->GPC['checkboxanswer1_15'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$answer8 = $vbulletin->GPC['answer8'];
$answer6a = $vbulletin->GPC['answer6a'];
$answer6b = $vbulletin->GPC['answer6b'];
$answer6c = $vbulletin->GPC['answer6c'];
$vbtextanswer = $vbulletin->GPC['vbtextanswer'];
$vbtextanswer2 = $vbulletin->GPC['vbtextanswer2'];
Reply With Quote
  #998  
Old 08-22-2006, 09:38 PM
R.Caldwell R.Caldwell is offline
 
Join Date: Aug 2006
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wondering if anyone can help me add a drop down box for the user to select which thread he wants the form to be submited to.

I really like this hack, and I can pay someone for the added support if needs be.
Reply With Quote
  #999  
Old 08-22-2006, 11:09 PM
Nuguru Nuguru is offline
 
Join Date: Jun 2006
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Everyone,

I got to start out by thanking the developer of this form, as it seems to has lots of potential.

However, I am having a little problem with it's spacing and I am hoping that someone could help me out here.

I just installed it on vbulletin 3.5.4 and I am getting a extra space at the top of it. The extra space is below the navbar before the form (Please see attachment).

It looks like a <br> of some type needs to be removed, but I can't seem to find the code that will take out this extra space.

Any help would be appreciated.


Thank You,

Nuguru
Reply With Quote
  #1000  
Old 08-23-2006, 12:26 AM
evofile evofile is offline
 
Join Date: Feb 2006
Location: Flushing, NY
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is that hack works on vBulletin 3.6.0?
Reply With Quote
  #1001  
Old 08-23-2006, 03:50 AM
mschvili mschvili is offline
 
Join Date: Jul 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nuguru, you need to go in and change to Template under 'Style'. The template is called "Form".
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 03:51 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.05581 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
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
  • (1)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
  • (3)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