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
  #422  
Old 04-18-2007, 05:50 AM
rayw rayw is offline
 
Join Date: Mar 2007
Location: Australia
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I posted a message directly below the one with code in it stating that the problem had been fixed. I've also updated the code so yes, everything should work fine now. It wasn't very clear though, sorry.
Reply With Quote
  #423  
Old 04-18-2007, 06:32 AM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, no rayw, don't be sorry, I may have read all this to fast.
Anyway, thank you very much for your work and help
I'll give a try to it this evening
Reply With Quote
  #424  
Old 04-18-2007, 07:10 PM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, rayw... I've a slight change to do.
In fact, I have a lot of forums and su-forums. All these may change time to time, so I would need this tweak to be easy to manage.

My idea would be to use the forumjump template to improve that product.

Something like this, where when clicked on, would post the thread in :

PHP Code:
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
    <
form action="forumdisplay.php" method="get">
    <
input type="hidden" name="s" value="$session[sessionhash]/>
    <
input type="hidden" name="daysprune" value="$daysprune/>
    <
strong>$vbphrase[forum_jump]</strong><br />
    <
select name="f" onchange="this.form.submit();">
        <
optgroup label="$vbphrase[forums]">
        
$jumpforumbits
        
</optgroup>
    </
select>$gobutton
    
</form>
</
div
Would it be possible to have this?
Reply With Quote
  #425  
Old 04-18-2007, 07:44 PM
j_86 j_86 is offline
 
Join Date: May 2003
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you send an e-mail out to a group with the contents of the form?
Reply With Quote
  #426  
Old 04-18-2007, 10:35 PM
rayw rayw is offline
 
Join Date: Mar 2007
Location: Australia
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Limerick View Post
Well, rayw... I've a slight change to do.
In fact, I have a lot of forums and su-forums. All these may change time to time, so I would need this tweak to be easy to manage.

My idea would be to use the forumjump template to improve that product.

Something like this, where when clicked on, would post the thread in :

PHP Code:
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
    <
form action="forumdisplay.php" method="get">
    <
input type="hidden" name="s" value="$session[sessionhash]/>
    <
input type="hidden" name="daysprune" value="$daysprune/>
    <
strong>$vbphrase[forum_jump]</strong><br />
    <
select name="f" onchange="this.form.submit();">
        <
optgroup label="$vbphrase[forums]">
        
$jumpforumbits
        
</optgroup>
    </
select>$gobutton
    
</form>
</
div
Would it be possible to have this?
Using the forum jump menu isn't a bad idea. Never thought of that.

I don't see why it wouldn't work and all the code looks ok (but I'm no programmer either - still learning as said above).

All you can do is give it a go and see what happens.

You seem to know more about this stuff then me anyway!
Reply With Quote
  #427  
Old 04-23-2007, 03:23 PM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey rayw,

I don't think I know more than you: I just copied the forumjump code. But I don't think, this could work as these link are not designed to save posts but just to jump to...

Maybe some coder around here may help us...
Reply With Quote
  #428  
Old 04-25-2007, 02:34 AM
icemanic icemanic is offline
 
Join Date: Jun 2006
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im totally clueless trying to customize my own form, can anyone help me via PM ?????

im trying to add several $normalquestion .....but do i just add $normalquestion2

it does not show up, etc

HELP!
Reply With Quote
  #429  
Old 04-26-2007, 11:47 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mookie View Post
I am having a problem with the form hack. I am receiving a error

Code:
Invalid Forum specified. If you followed a valid link, please notify the administrator
Does anyone know how to fix this error. I have tried almost everything... I guess there is something that I have not tried yet.
Double check your form names, that message says something is wrong with your form name or something in your plugin code is not matching forms.

Maybe the link has one letter wrong.

Good Luck
Reply With Quote
  #430  
Old 04-26-2007, 11:59 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by icemanic View Post
im totally clueless trying to customize my own form, can anyone help me via PM ?????

im trying to add several $normalquestion .....but do i just add $normalquestion2

it does not show up, etc

HELP!
Icemanic its possible that you forgot something in one of your forms or your plugin code isn't matching.

Check form names
Check form answer area
Check main form and verify that its got the correct html that will show all boxes or message areas.

HTML Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer1other' => TYPE_STR,
'$normalanswer1' => TYPE_STR,
'$normalanswer2' => TYPE_STR,
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer1other = $vbulletin->GPC['radioanswer1other'];
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
Next check your forms templates 2 verify that all is matching and is placed correctly.

Good Luck!
Reply With Quote
  #431  
Old 04-27-2007, 12:01 PM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
$formtitle
$bbuserinfo[username]

$question1
$answer1

$question2
$answer2

$question3
$answer3

$question4
$answer4

$question5
$answer5

$radioquestion1
$radioanswer1
$radioanswer1other

$normalquestion1
$normalanswer1

$normalquestion2
$normalanswer2

------------------------------------------------------

$vbtextquestion

$vbtextanswer

------------------------------------------------------
Here is the main form Html info 4 this answer sheet

HTML Code:
<tr>
	<td class="alt1" colspan="3">
				<b>$normalquestion1</b>
		</td>
	</tr>
<tr>
<td class="alt2" colspan="3">
<input type="text" size="30" value="$normalanswer1" name="normalanswer1" />
</td>
</tr>
Good Luck!
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 04:14 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.10746 seconds
  • Memory Usage 2,348KB
  • 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
  • (1)bbcode_code
  • (3)bbcode_html
  • (2)bbcode_php
  • (3)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