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

 
 
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
  #222  
Old 09-04-2004, 03:43 AM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know if it would be possible to add something like a drop down menu that could list of admin defined forums in which the form would be submitted as a new thread?

I am helping a friend with writing style forum so he has many categories/forums to submit writing. Rather than creating 20 forms that are identical other than the forum they would be submitting to, it would be great to have one form with the user defining which forum to send it to as a new thread.
Reply With Quote
  #223  
Old 09-04-2004, 12:50 PM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldford
OK, finally got this to work. Here's the code if you want to have the "New Thread" button redirect to different forms for different forums. Don't forget to end with the correct number of </if> end tags to close out the code.

HTML Code:
<a href="<if condition="$foruminfo['forumid'] == 123">form123.php<else /><if condition="$foruminfo['forumid'] == 456">form456.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if></if>">
PKRWUD, it looks like the <elseif> code isn't supported by VB so you need to nest <if> instead. At least according to the manual:
http://www.vbulletin.com/docs/html/m...e_conditionals
This works great.
I am not sure if anyone else would do it this way but I have a lot of different forms and instead of typing the name of each form file name such as:
Code:
<if condition="$foruminfo['forumid'] == 123">form123.php<else />
I instead am using:
Code:
<if condition="$foruminfo['forumid'] == 123">form$foruminfo[forumid].php<else />
Means one less thing to edit when nesting a bunch of these if/else.

This brings me to another question, would it be possible to just have one if statement and use an array of some sort like:
Code:
<if condition="$foruminfo['forumid'] == 123,124,125,126">form$foruminfo[forumid].php<else />
I know this does not work but could it be done? I am a complete code newb so I wouldn't have the first clue if it's possible or what's involved but that would cut down on huge nesting.
Reply With Quote
  #224  
Old 09-05-2004, 12:10 AM
AmbitiousLemon's Avatar
AmbitiousLemon AmbitiousLemon is offline
 
Join Date: Dec 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin I would also like to add my vote for allowing attachments in the form should it be used to create a new thread. You mentioned earlier that this might be hard while simply uploading an image to the db wouldn't be as hard. Could you give us some example code on how to allow someone to uplaod to db and then show the template mod that would be needed to display that image in the thread?

I like a previous poster am trying to use this for a classifieds section.
Reply With Quote
  #225  
Old 09-05-2004, 05:56 PM
PcGamer PcGamer is offline
 
Join Date: Dec 2001
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice modification. I have it working well on my site

I use my forms to just send an email to my address. Is it possible for it to send to multiple addresses? If so how?


Thanks!
Reply With Quote
  #226  
Old 09-05-2004, 07:05 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PcGamer
Nice modification. I have it working well on my site

I use my forms to just send an email to my address. Is it possible for it to send to multiple addresses? If so how?


Thanks!
Sure,

Look for this:
PHP Code:
    vbmail($formemailaddress$formtitle$formsend); 
copy this line over and over for as many email addreess you want the email going to. Change
PHP Code:
$formemailaddress 
to a different email on each line.




Anyone figured out yet how to make a thread made by these forms search able?
Reply With Quote
  #227  
Old 09-06-2004, 01:57 AM
y2krazy y2krazy is offline
 
Join Date: Jun 2003
Location: Houston, Texas
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by y2krazy
Is there a way to make a form that is created to be required by any new registration before they can do anything else? Such as a form that posts an introduction thread in a specified forum when someone registers, and it will be a requirement before said new member can do anything on the entire forum(almost like a "second" registration page). Maybe a re-direct once the registration goes through or something to the form before anything else can take place. Let me know if this can be done, or is even possible. Thanks!
No one has any idea how this can be done? Would be great if someone could help me out...
Reply With Quote
  #228  
Old 09-08-2004, 05:18 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Abe1
Thanks for the hack. I made 14 forms for my site. All leading to new threads.

I got 2 problems now. One, the posts don't count. Two, the posts don't get searched.

I fixed number one by my self.

find:
PHP Code:
$forum[forumid] = $formforumid
add before:
PHP Code:
                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 
find:
PHP Code:
$forum[forumid] = $formreplyforumid
add before:
PHP Code:
                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 
For the search problem, I couldn't come up with anything yet. Maybe someone else can.
I Just fixed a MAJOR bug in this. If you used this, you MUST fix and run 'update user post count' in you acp. ALL users post count were going up evey time one person would use the form.
Reply With Quote
  #229  
Old 09-11-2004, 02:24 PM
Michael2's Avatar
Michael2 Michael2 is offline
 
Join Date: Nov 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a long thread so I'm sorry if these questions have been asked, I skimmed through it but didn't see the answers...

What would I need to do to get the thread title to be the answer from the first question? I'm using it for recipes, the first question is the recipe name, I want that to be the thread title.

Is there any way to use BB code? When I try putting it in the formanswers template I get an error when trying to save it. I want the questions to be in bold so that they stand out from the answers.

This is an awesome hack, thanks!
Reply With Quote
  #230  
Old 09-11-2004, 03:35 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Replace:

HTML Code:
<A HREF="$answer1">$answer2</a>
With:

The [url ] bbtag:

HTML Code:
[url="$answer1" ] $answer2 [/url ]
Remove the space in the url tags, but keep the space around $answer2.
I tried doing that, but the url came out like this:

http://&quot/;www.yahoo.com&quot;

Please let me know what I Can do to fix this...
Reply With Quote
  #231  
Old 09-12-2004, 01:26 PM
wrongful wrongful is offline
 
Join Date: Apr 2003
Location: Atlanta, Georgia
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone have any idea how I can add a flood check to this?
Reply With Quote
 


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 11:24 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.12913 seconds
  • Memory Usage 2,337KB
  • 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
  • (3)bbcode_code
  • (3)bbcode_html
  • (6)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
  • (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