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
  #292  
Old 02-16-2007, 02:50 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks blind-eddie

I hate to give this kind of access to the forum I'm having this submitted into...do you think there would be a way to setup a new user account that I could hard code into this hack. That way I can limit the user account setting within vB so that it only has access to this one forum. Hard coding the user setting might be a bit of a security risk but my forum is hosted on an intranet so I'm no worried that the employees in my company will be hacking my site.

Do you think this could be done easily?
Reply With Quote
  #293  
Old 02-16-2007, 03:38 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont get me to lying.....Your first question was easy, your second one is a lil tougher....I have it set up for only registered user who are logged in can post on any forum, thus reducing spam. My opion to you is that I wouldnt want anyone to fill out a form unless they were registered,to ensure they are who they are.
Reply With Quote
  #294  
Old 02-16-2007, 04:11 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

K so if we go that route how can I have the form force the user to login first.

i.e.
if the user enters "http://www.myforum.org/forum/newthread.php?do=form" they're currently taken to the form regardless of whether they are logged in. If they're not logged in and fill out the form and hit submit they are given no indication that their post has not gone through. So what I would like to do is some how check that the user is logged in when they first get to this page and if they are not, force them to login first...make sense?
Reply With Quote
  #295  
Old 02-16-2007, 04:29 PM
thalamus's Avatar
thalamus thalamus is offline
 
Join Date: Sep 2005
Location: UK
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by upnorth View Post
K so if we go that route how can I have the form force the user to login first.
Not sure about redirecting although I know there's a vB hook somewhere that can do that... what you could do (possibly - not tested it) is, in the form hack plugin right at the top, just after:
Code:
if ($_REQUEST['do'] == $formname)
{
put:
Code:
	if (!$vbulletin->userinfo['userid'])
	{
		print_no_permission();
	}
then if you need a redirector, replace (or add to) the print_no_permission() with the hook.

Alternatively you can amend this line in the plugin code:
Code:
// if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7))) print_no_permission();
by removing the comment bars and amending the allowed usergroups (or removing the NOT bang and setting groups who cannot access, if that's easier).

Setting the post to be from a defined user is, from what I can tell, far more difficult, as the call to build_new_post() picks up the current user's id (whether a member or not).

Anyone found out how to circumvent the posts (from unregd users) going into the Moderation queue yet?
Reply With Quote
  #296  
Old 02-16-2007, 04:43 PM
thalamus's Avatar
thalamus thalamus is offline
 
Join Date: Sep 2005
Location: UK
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedGTiVR6 View Post
This is really the only thing holding me back from releasing this on our forums.

Does anyone have any insight?
I would suggest this could only be in the 'form answers' template (as defined by you in the xml by the "$answertemplate" variable) that you would have created in AdminCP -> Style Manager (unless the plugin code has been amended somehow...)
Reply With Quote
  #297  
Old 02-16-2007, 04:44 PM
bErKandD bErKandD is offline
 
Join Date: Jan 2007
Location: IstanbuLL
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woww very very good job.
thanx abe1...
Reply With Quote
  #298  
Old 02-16-2007, 06:50 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thalamus View Post
I would suggest this could only be in the 'form answers' template (as defined by you in the xml by the "$answertemplate" variable) that you would have created in AdminCP -> Style Manager (unless the plugin code has been amended somehow...)
There's nothing in there related to it, not in the stock template and not in the modified template.

Here's my template:

Code:
 $normalquestion1 

$normalanswer1


 $normalquestion2 

$normalanswer2


 $radioquestion1 

$radioanswer1


 $longquestion1 

$longanswer1


 $longquestion2 

$longanswer2
That's it!
Reply With Quote
  #299  
Old 02-16-2007, 08:38 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've searched through the plugin and the templates yet still cannot find out how to remove it either....
Reply With Quote
  #300  
Old 02-16-2007, 10:08 PM
Krahl Krahl is offline
 
Join Date: Aug 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why don't the two of you compare installed hacks and plugins? Perhaps you can find a common vein which might lead to being able to track it down more easily.

Sorry I couldn't be more help than that, but it's a potential start - at least until one of the more capable coders comes along to shed some light.
Reply With Quote
  #301  
Old 02-17-2007, 04:37 AM
thalamus's Avatar
thalamus thalamus is offline
 
Join Date: Sep 2005
Location: UK
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedGTiVR6 View Post
There's nothing in there related to it, not in the stock template and not in the modified template.

That's it!
It *must* be in the templates; I can't see it being anywhere else. Have you searched through your templates (all styles) in vBulletin adminCP? As mentioned, it may well be in a co-related hack or plugin that's found its way through...
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:56 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.04895 seconds
  • Memory Usage 2,322KB
  • 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
  • (4)bbcode_code
  • (4)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