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
  #172  
Old 08-22-2004, 11:41 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by duncan99
I found out after the user submit the form, the redirection sends the user to the forum where the answer form will be there. In my case I set the answer form in the Admin forum which the user is not allow to have access. So how can I set the redirection to the forum I specify?

* duncan99 installed
You mean another forum? By default it php file redirects to the forum where the thread is made.

To specify an alternative forum -

Go down to near the end of the php file, replace $forum[forumid] in the $url line to the number of the user forum.
Reply With Quote
  #173  
Old 08-23-2004, 12:37 AM
duncan99 duncan99 is offline
 
Join Date: Feb 2003
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, it works great.
Reply With Quote
  #174  
Old 08-23-2004, 03:03 AM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PKRWUD
This is how I did it...

In Forumdisplay template, find:
Code:
<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
And replace it with:
Code:
<a href="<if condition="$foruminfo['forumid'] == xx">form.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>">
Except you would sustitute your forum ID where it says xx. Works excellent.
Thanks for this. It works great.

Now can anyone tell me how that line should look if you want to have more than 1 forum? (example: forum A should use formA.php, forum B should use formB.php, etc.) Basically, how do you extend the "if condition" to work for more than 1 forumid?
Reply With Quote
  #175  
Old 08-23-2004, 06:16 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldford
Thanks for this. It works great.

Now can anyone tell me how that line should look if you want to have more than 1 forum? (example: forum A should use formA.php, forum B should use formB.php, etc.) Basically, how do you extend the "if condition" to work for more than 1 forumid?

https://vborg.vbsupport.ru/showpost....8&postcount=11
Reply With Quote
  #176  
Old 08-23-2004, 12:19 PM
mOdEtWo mOdEtWo is offline
 
Join Date: Dec 2003
Location: Norway
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I try to make the form reply to a thread, and I know I have given the right options (enabled, forumid, threadid). When the form is submitted, I get a mysql error:

Code:
mysql error: Table 'forums.post' doesn't exist
mysql error number: 1146
Is there something wrong with the post sql code?

PHP Code:
                $DB_site->query("
                        INSERT INTO " 
TABLE_PREFIX "post
                                (threadid, title, username, userid, dateline, pagetext, allowsmilie,
                                 showsignature, iconid, visible)
                        VALUES
                                (
$thread[threadid], '".addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle',
                                 '" 
addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid], " TIMENOW ",
                                 '" 
addslashes($formsend) . "', 1, 1,
                                 0, 1)
                "
); 
Reply With Quote
  #177  
Old 08-23-2004, 01:42 PM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Merjawy
I thought that was to insert one form result into two different forums at the same time? Maybe I'm wrong?

All I'm talking about is the redirect code when you click on "New Thread". I have different form.php files for each forum. I just need the redirect to understand that if it's forumid 123 then clicking on "New Thread" should redirect to form123.php. And if it's forumid 456 it should go to form456.php
Reply With Quote
  #178  
Old 08-23-2004, 04:59 PM
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
Location: Ventura, California
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm very new to PHP, and I don't know that this is correct, but I believe this will work for you...

In Forumdisplay template, find:
Code:
<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
And replace it with this:
Code:
<a href="<if condition="$foruminfo['forumid'] == xx">form.php<elseif condition="$foruminfo['forumid'] == yy">form2.php<elseif condition="$foruminfo['forumid'] == zz">form3.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>">
xx is the forum ID for form.php, yy is the forum ID for form2.php, and zz is the forum ID for form3.php.

Back up your template first, but I believe this will work for you. If it doesn't, change the closing </if> tag to </endif>.
Reply With Quote
  #179  
Old 08-23-2004, 06:24 PM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, but I get a parse error. I tried both </if> and </endif>
Reply With Quote
  #180  
Old 08-23-2004, 06:53 PM
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
Location: Ventura, California
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Damn. Well, I'm sorry, I really thought that would do it. I'll see what I can find out.
Reply With Quote
  #181  
Old 08-23-2004, 11:51 PM
Isaiah33 Isaiah33 is offline
 
Join Date: Aug 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

a nice feature to this would be to be able to customize everything in admincp
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:47 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.10447 seconds
  • Memory Usage 2,329KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_php
  • (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
  • (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