Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News. Details »»
FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News.
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 06-11-2004 Last Update: Never Installs: 214
 
No support by the author.

FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS
Version 1.6 for vBulletin 3.x.x by Dr Erwin Loh

Features:

Ever wanted an online form that a user can fill out, which when submitted gets:

1. Posted into a new thread in a forum of your choice
2. Create a new poll in the new thread with options of your choice
3. Posted as a reply in an existing thread of your choice
4. PMed to you or someone else
5. Emailed to an email address you specify
6. Choose to redirect to the post, thread or forum, or a custom thank you message
7. Choose to redirect to editpost to upload attachments

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:

1) Moderator Applications
2) Quiz Submit Form which gets PMed to a moderator
3) Contact Form that goes to PM, email or thread
4) Guests to apply to be members
5) Report a Moderator form that goes as a PM to you
6) Guests can PM you for whatever reason
7) Order form to buy things
8) Donation form
9) News or Articles submissions that can go straight to a thread


Or anything you like - this hack is totally customizable via the PHP file.
Basically, this hack involves modifying 1 PHP file form.php (you add questions, options etc. in the PHP file itself), uploading it, and then adding 2 templates.

The beauty of this hack is that once you have added the 2 templates, to make a new form, all you need to do is copy the form.php and rename it to form2.php, edit the variables in the PHP file, and you have a totally new form!!! You do not need to touch the templates again.

Format of the form:

1. One main input question
2. 2 Radio buttons Choice questions
3. 3 Normal text input questions
4. 1 Long answer question

This is customizable via the PHP file.

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:

1. Add the 2 templates.

2. Edit form.php - the instructions are all inside the PHP file itself, in the top half. Follow the instructions carefully!

3. Upload form.php

Just link to form1.php eg. http://www.yourforum.com/forums/form.php

Done!

Use this hack to make as many forms as you like!

Enjoy!


Updates:

Version 1.1 - Option to force user to answer all questions.
Version 1.2 - Thread count and lastposter information now updated if form is sent to existing thread.
Version 1.3 - ADDED CREATE POLL OPTION!
Version 1.4 - Fixed bug with Form-to-thread code
Version 1.5 - Major update:
- fixed bug where thread count not updated when form to forum
- fixed default posting to allow smilies and sigs when reply to thread
- added templates to cache (saves 2 queries)
- added option to change thank you message
- added options to redirect to post, thread or forum when submit
Version 1.6 - Choose to redirect to editpost to upload attachments

Screenshot is an example of a form - the form title and questions are customizable:

Show Your Support

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

Comments
  #347  
Old 02-02-2005, 07:04 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm still looking for a way to pass a variable through the form.
Reply With Quote
  #348  
Old 02-02-2005, 10:39 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
I'm still looking for a way to pass a variable through the form.
You need to add the variable to the top of the PHP file where variables are checked for security reasons.
Reply With Quote
  #349  
Old 02-02-2005, 10:50 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
You need to add the variable to the top of the PHP file where variables are checked for security reasons.
Thank's for replying Erwin.

I added the following to the top of the form.php file

Code:
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'flagcomm'); // change this depending on your filename

$catid=$_POST['catid'];
$cad=$_POST['cad'];
$linkUrl="http://www.domain.com/page.php?id=".$catid."&cad=".$cad."&type=a";


// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups
$phrasegroups = array(

);
But I can't seem to pull the link into the form answers. $linkurl works fine in the answers but the two variables are empty.

I've also added hidden inputs to the form template for both these variables.
Reply With Quote
  #350  
Old 02-04-2005, 01:47 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I am wondering if one of you guys who have worked a lot with this can help me out. What I would like use this for is a confirmation page so basically when a user clicks the "Submit new thread" button in forrumid=106 it takes them to a page that says "did you remember to do this and that?" then if they click "yes" the are redirected to the post page and if they select "no" they receive a can't continue (or something similar).
Reply With Quote
  #351  
Old 02-04-2005, 03:59 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
Hmm, I am wondering if one of you guys who have worked a lot with this can help me out. What I would like use this for is a confirmation page so basically when a user clicks the "Submit new thread" button in forrumid=106 it takes them to a page that says "did you remember to do this and that?" then if they click "yes" the are redirected to the post page and if they select "no" they receive a can't continue (or something similar).
Yes, I have done exactly that. Please see my earlier post in this thead.
Reply With Quote
  #352  
Old 02-05-2005, 03:23 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
Thank's for replying Erwin.

I added the following to the top of the form.php file

Code:
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'flagcomm'); // change this depending on your filename

$catid=$_POST['catid'];
$cad=$_POST['cad'];
$linkUrl="http://www.domain.com/page.php?id=".$catid."&cad=".$cad."&type=a";


// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups
$phrasegroups = array(

);
But I can't seem to pull the link into the form answers. $linkurl works fine in the answers but the two variables are empty.

I've also added hidden inputs to the form template for both these variables.
No, you have to add the variables to this array:

PHP Code:
globalize($_POST, array(
'normalanswer1' => STR,
'radioanswer1' => STR,
'longanswer1' => STR,
'action' => STR
)); 
Otherwise vB won't let it through for security reasons.
Reply With Quote
  #353  
Old 02-05-2005, 03:31 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh thanks. I'll play with it some more.
Reply With Quote
  #354  
Old 02-06-2005, 04:25 AM
Lee Wilde's Avatar
Lee Wilde Lee Wilde is offline
 
Join Date: Apr 2004
Location: Perth, Australia
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Erwin and all users of this hack. This hack is proving to be invaluable for us, we are most appreciative.

Just a little extra thing I'm trying to do, which is causing a minor annoyance....

I've slightly hacked forumdisplay.php to display a preview of the thread. It works, as you can see from the screenshot....but how can I get rid of the unnecessary "begin template" text....I can't even figure out where its coming from.

Thank you, any suggestions would be appreciated.
Reply With Quote
  #355  
Old 02-06-2005, 06:09 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turn off the option to show templates in the source code. It's in the vBulletin options area.
Reply With Quote
  #356  
Old 02-09-2005, 10:06 PM
life is boost life is boost is offline
 
Join Date: Jan 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a great hack, we use this as aclassifieds form for our site. the only thing i was wondering is if we can get the forum to post the IP of the user like on a normal post. when someone uses the form, it will not save their IP information.
Reply With Quote
  #357  
Old 02-11-2005, 07:28 PM
DarrinM DarrinM is offline
 
Join Date: Dec 2004
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi All

Been following this thread, great hack Erwin, can think of many ways to use it however I am wondering if the following can be acheived.

When viewing someone's profile I wonder if it would be possible to then open a form and have some of the fields automatically populated - Form originators name (i.e. the person viewing the profile), the username or even custom field(s) taken from the person who's profile is being viewed. I then want to send the form contents via email to a third party static email address (which is obviously covered already)

Thanks in advance

DarrinM
Reply With Quote
  #358  
Old 02-11-2005, 10:01 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DarrinM
Hi All

Been following this thread, great hack Erwin, can think of many ways to use it however I am wondering if the following can be acheived.

When viewing someone's profile I wonder if it would be possible to then open a form and have some of the fields automatically populated - Form originators name (i.e. the person viewing the profile), the username or even custom field(s) taken from the person who's profile is being viewed. I then want to send the form contents via email to a third party static email address (which is obviously covered already)

Thanks in advance

DarrinM
Of course you can do all that using $bbuserinfo[field10] or whatever it is and putting it in the form template.
Reply With Quote
  #359  
Old 02-12-2005, 01:13 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Of course you can do all that using $bbuserinfo[field10] or whatever it is and putting it in the form template.
How about...

The user submitting the form can choose which people the output is PMed to?
Reply With Quote
  #360  
Old 02-12-2005, 09:36 AM
Cheertobi Cheertobi is offline
 
Join Date: Aug 2004
Location: Germany
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I am sorry, I have not been through all of the thread right now! Just one quick question, is it also possible to post calender events via form.php?!

Regards,

Tobi
Reply With Quote
  #361  
Old 02-12-2005, 01:40 PM
Leeper Leeper is offline
 
Join Date: Nov 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just want to make sure that I'm on the right train of thought here before I jump in with this major addition. I believe that with this and some custom work I can come up with a much better solution than what we have now.
Currently we have a very cumbersome process for person to join our club. To register as a guest on the forum is very straight forward process as it is the one built by vB. To join the club however is a bit more of a pain. Member uses join form and once completed and they submit, an email is generated to the admin team and the new user is sent to paypal. The problem is that there is nothing explaining that they still need to register on the forums. Once payment is received the member is moved into the member area but again, this is a very separate process that I’d like to integrate.
Can I create a "Join Form" with all of the variables that I need and a payment function that then leads the user into the registration area? The new join form would post the information into an admin forum.

Sorry if I’m posting this in the wrong area and I’m probably over complicating this but I’m a novice trying to find a better way.
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 06:03 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.10625 seconds
  • Memory Usage 2,380KB
  • Queries Executed 30 (?)
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_php
  • (6)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
  • (2)pagenav_pagelinkrel
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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