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
  #1222  
Old 08-20-2008, 07:13 PM
Stryker412 Stryker412 is offline
 
Join Date: May 2005
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by farplane dragon View Post
Yeah, yeah, cool. Thanks for the help so far. I actually got the answer all problem fixed, it's just the "getting stuck on the thank you screen" I have to figure out.
What do you mean by this?
Reply With Quote
  #1223  
Old 08-20-2008, 08:13 PM
Daggerzz Daggerzz is offline
 
Join Date: Jan 2008
Location: Hollister
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am sure that this question has been asked. With over 80 pages, it is probably in there somewhere, but I have not found an exact match to my problem. So maybe someone can help me.

I want to call my copy of the hack in this way:

PHP Code:
/newthread.php?dp=myform&p=### 
where ### is the post I want to reply to.

I can generate this link without problem. My form begins executing. I can echo to the screen for verification, the "p" variable, by accessing $_REQUEST['p'].

I want to set the variable $formreplythreadid to this "p" variable. I have tried various variations:
PHP Code:
$formreplythreadid $_REQUEST['p']; 
or this
PHP Code:
$x $_REQUEST['p'];
$formreplythreadid $x
I also attempted to add a variable to the form like other user input variables, using
something like this:
PHP Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'var1' => TYPE_STR,
'wheretogo' => TYPE_STR,
));

// Part 2
$var1$vbulletin->GPC['var1'];
$wheretogo$vbulletin->GPC['wheretogo']; 
With the value defined in this way, I tried to assign to it in two different ways. First I tried to directly assign to it:
PHP Code:
$wheretogo $_REQUEST['p']; 
and lastly I tried to allow the user to input the value via the form input screen. This works so I know a variable will work. But I cant figure out how to have the program assign the variable

In all cases, I could echo the value to the screen with success; however, in all cases when I tried to assign my variables value to $formreplythreadid, the value seems to be empty.

How can I set the value $formreplythreadid to a value that is generated at runtime?
Reply With Quote
  #1224  
Old 08-20-2008, 09:14 PM
farplane dragon's Avatar
farplane dragon farplane dragon is offline
 
Join Date: Mar 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stryker412 View Post
What do you mean by this?
Normally, I'd see the thank you screen then get redirected back to forumhome I believe. Now, I see the thank you screen and that's it, it doesn't redirect to anywhere.
Reply With Quote
  #1225  
Old 08-20-2008, 09:54 PM
skulldred skulldred is offline
 
Join Date: Aug 2008
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Daggerzz i have the same problem but with threads... I guess that is the solution... :

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "1";
if ($dropdownanswer1 == 'Mage'){
$formreplythreadid = "43";}
if ($dropdownanswer1 == 'Warlock'){
$formreplythreadid = "34";}
if ($dropdownanswer1 == 'Warrior'){
$formreplythreadid = "41";}
if ($dropdownanswer1 == 'Rogue'){
$formreplythreadid = "42";}
if ($dropdownanswer1 == 'Priest'){
$formreplythreadid = "40";}
if ($dropdownanswer1 == 'Hunter'){
$formreplythreadid = "46";}
if ($dropdownanswer1 == 'Paladin'){
$formreplythreadid = "45";}
if ($dropdownanswer1 == 'Shaman'){
$formreplythreadid = "44";}
//EXISTING THREAD ID FOR FORM TO REPLY IN

Can you explain me where you have added this code please? $x = $_REQUEST['p'];
Reply With Quote
  #1226  
Old 08-20-2008, 11:50 PM
Daggerzz Daggerzz is offline
 
Join Date: Jan 2008
Location: Hollister
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by

Can you explain me where you have added this code please? $x = $_REQUEST['p'
;
I put this in the form hack right after I defined the variables. i know this is teh right value because i can make it display the number. The problem is if iIuse that as a variable for $formreplythreadid it gives me an error. I need to be able to post this to any number of threads so a drop down box would not work.
Reply With Quote
  #1227  
Old 08-22-2008, 09:05 PM
Stryker412 Stryker412 is offline
 
Join Date: May 2005
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by farplane dragon View Post
Normally, I'd see the thank you screen then get redirected back to forumhome I believe. Now, I see the thank you screen and that's it, it doesn't redirect to anywhere.
That's how it is on mine too, it never redirected. I would like to know if you find out how.

Also, I'd like to beg/plead one more last time if someone can help me set up a birthday question so the three drop down menus are side by side on the same line.
Reply With Quote
  #1228  
Old 08-24-2008, 03:43 PM
BlueBulletRL BlueBulletRL is offline
 
Join Date: Apr 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also I will plead again someone please help me!
Reply With Quote
  #1229  
Old 08-25-2008, 07:20 AM
cragtay cragtay is offline
 
Join Date: Jul 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I make my question in a quote because after posted this, I saw Daggerzz's post. The problem is similar. However, I typed my question so I don't want to delete it :">


Quote:
For example, I have 2 categories: A and B, and in each category, there are 3 forums.
The forum ids are 2, 4, 6 (3 forums in category A) and 5, 7, 9 (3 forums in category B).

I want to design 2 forms (newA and newB) for each category. 3 forums in each category will use a common form.

http://mydomain.com/newthread.php?do=newA&f=2
http://mydomain.com/newthread.php?do=newA&f=4
http://mydomain.com/newthread.php?do=newA&f=6

http://mydomain.com/newthread.php?do=newB&f=5
http://mydomain.com/newthread.php?do=newB&f=7
http://mydomain.com/newthread.php?do=newB&f=9

How can I do that?

I think that I should get the forumid from the URL to put into the variable $formforumid in the form template (newA or newB). Is it possible?
If I don't make that number a variable, then I have to make 3 separate forms, whose the contents are same, but names are different, for each category. In the example, there are only 6 forums. However, in practically, there may have more forums that 6. Make seperate form for each forum is really not effective way.

Could someone help me?
Reply With Quote
  #1230  
Old 08-25-2008, 12:55 PM
Stryker412 Stryker412 is offline
 
Join Date: May 2005
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks to Abe I was able to get the triple drop down question working.
Reply With Quote
  #1231  
Old 08-26-2008, 02:25 AM
Vackrick Vackrick is offline
 
Join Date: Apr 2008
Location: Taiwan
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parse error: syntax error, unexpected T_VARIABLE in /home/shawnyue/public_html/forum/newthread.php(74) : eval()'d code on line 191
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 07:05 AM.


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.05489 seconds
  • Memory Usage 2,340KB
  • 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
  • (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_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