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
  #362  
Old 02-13-2005, 01:02 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cheertobi
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
Possible but I have not added that function to the hack yet. I may in future.
Reply With Quote
  #363  
Old 02-13-2005, 01:03 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leeper
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.
That can be done - you just change the redirect options.
Reply With Quote
  #364  
Old 02-13-2005, 01:55 PM
ChrisBaktis ChrisBaktis is offline
 
Join Date: Mar 2004
Location: CT
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin,

I use this form to post trades between two members and currently have it setup to post the trade to a a specific form...I would also like to have it so it sends a PM to the other member (the person posting the form has to enter the other members name). Could I use the form answer variable to do this? Also if it is possible, and the person posting the trade enters a wrong member name (misspelled etc) would it still post in the form but not send the pm?
Reply With Quote
  #365  
Old 02-13-2005, 08:48 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChrisBaktis
Erwin,

I use this form to post trades between two members and currently have it setup to post the trade to a a specific form...I would also like to have it so it sends a PM to the other member (the person posting the form has to enter the other members name). Could I use the form answer variable to do this? Also if it is possible, and the person posting the trade enters a wrong member name (misspelled etc) would it still post in the form but not send the pm?
Yes, you can definitely do all that. It's only a matter of changing the variables and adding a line to the code to search for the userid in order to send the pm.
Reply With Quote
  #366  
Old 02-13-2005, 09:19 PM
Leeper Leeper is offline
 
Join Date: Nov 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
That can be done - you just change the redirect options.
Wow! Normally I can see work that has been done and customize it a bit but I'm just not having much luck with this. Erwin thank you for your hard work and rather than pestering you with another question every hour or so, can you recommend someone to build a fairly elaborate form? Your work is great and I can see a ton of applications for this but in this particular case I'm working with a time constraint and it needs to be done right the first time since it will be handling money transactions.
Reply With Quote
  #367  
Old 02-13-2005, 11:05 PM
ChrisBaktis ChrisBaktis is offline
 
Join Date: Mar 2004
Location: CT
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Yes, you can definitely do all that. It's only a matter of changing the variables and adding a line to the code to search for the userid in order to send the pm.
I can do the variables but can you help with the line of code to search for the userid?
Reply With Quote
  #368  
Old 02-16-2005, 04:06 PM
DarrinM DarrinM is offline
 
Join Date: Dec 2004
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone advise me or provide help with the following scenario

When viewing someone's profile I wish to be able to click to open up a new form which will then be sent both to the person who's profile is being viewed and also to a third party preset email address.

I understand how to get most of the data prefilled on the form (such as the senders email address) but cannot see how I can pass the username and usernames email address of the person who's profile is being viewed into and to be used by the form

An alternative to doing this would be the ability to select a user from the member list (maybe in drop down) and then return to the form and populate the fields with their name, email address and maybe a custom field from their profile

Hope someone can assist and many thanks in advance

Regards

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

The variables for the profile owners page are $userinfo[username] etc. rather than $bbuserinfo.. you should be able to use those to fill out form fields.
Reply With Quote
  #370  
Old 02-16-2005, 07:01 PM
ge66 ge66 is offline
 
Join Date: Jun 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seemes to be a very useful hack.

I have a suggestion/question. Is i possible to make a form that I can fill in and submit today and that will be posted as a thred on Sunday say 7 am.

I want to use this to be able to spread news articles that I post at one time over several days.

I also guess it could be nice if you wanted a poll posted 6 am the first day of the month or something.

A chance to post a thread at any given date and time that you set in a form.
Reply With Quote
  #371  
Old 02-19-2005, 12:15 PM
Cheertobi Cheertobi is offline
 
Join Date: Aug 2004
Location: Germany
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

once again, have not been through all post of this thread. Just want to let you know, that I found two missing TABLE_PREFIXes!

Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
	  $DB_site->query("UPDATE thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid"); 
	                  $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid
have to be like

Code:
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
	  $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid"); 
	                  $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid
Anyway, it is a really great hack, can I parse BBCode for Bold etc. in anyway?!

Tobi
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 09:32 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.07861 seconds
  • Memory Usage 2,330KB
  • 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
  • (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
  • (2)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