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
  #272  
Old 10-25-2004, 02:25 AM
AmbitiousLemon's Avatar
AmbitiousLemon AmbitiousLemon is offline
 
Join Date: Dec 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
I'll look into this on the weekend... no promises...
Thank you, I appreciate it.
Reply With Quote
  #273  
Old 11-02-2004, 01:52 AM
hasan2k hasan2k is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin

I have 2 questions which may have been answered already but I was not able to find.

1. Can this hack be used to create a form which PM's the info to a specific user group chosen (all the members in the user group get the PM)?

2. Can I add 30 or more fields for questions and answers instead of the format you had in the attached image in the first post?
Reply With Quote
  #274  
Old 11-02-2004, 04:58 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hasan2k
Erwin

I have 2 questions which may have been answered already but I was not able to find.

1. Can this hack be used to create a form which PM's the info to a specific user group chosen (all the members in the user group get the PM)?

2. Can I add 30 or more fields for questions and answers instead of the format you had in the attached image in the first post?
Yes to both, with modification. I'm not going to have time to do them though.
Reply With Quote
  #275  
Old 11-02-2004, 05:37 AM
hasan2k hasan2k is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Yes to both, with modification. I'm not going to have time to do them though.
Thanks.. I will see what I can do myself. if i get stuck I will ask for help here.
Reply With Quote
  #276  
Old 11-03-2004, 12:45 AM
bendigo-tech bendigo-tech is offline
 
Join Date: Aug 2004
Location: Australia
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic... love it!

Installed and working nicely.

THANKS!
Reply With Quote
  #277  
Old 11-04-2004, 09:59 PM
SirJonathan SirJonathan is offline
 
Join Date: Oct 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm.. I have a feeling I'm missing something super obvious .

I uploaded the files to my server and when I viewed form.php, it was completely blank.. Any ideas?

-Jonathan
Reply With Quote
  #278  
Old 11-05-2004, 01:20 AM
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 SirJonathan
Hmm.. I have a feeling I'm missing something super obvious .

I uploaded the files to my server and when I viewed form.php, it was completely blank.. Any ideas?

-Jonathan
Did you add the templates?
Reply With Quote
  #279  
Old 11-11-2004, 05:33 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i get each form thats filled out to post in a certain area and given a custom post tittle defined in the form?
Reply With Quote
  #280  
Old 11-12-2004, 12:32 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lancepoint
how do i get each form thats filled out to post in a certain area and given a custom post tittle defined in the form?
HELP!@@
Reply With Quote
  #281  
Old 11-15-2004, 09:34 PM
Chrisedge Chrisedge is offline
 
Join Date: Oct 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any U2 fans want to help me with this one? I'm looking to do a form that when in a certain forum (not all forums), when they click on new thread, a form comes up with various questions on particular live recordings like:

Date: (Drop downs)
Venue: (Text Box)
City/State/Country: (Text Box)
Setlist: (Text Box)
Taper?: (Drop downs YES/NO)
NTSC/PAL: (Drop down)
PC Authored/Standalone: (Drop down)
Notes: (Text Box)
Attach Screenshots: (Attach box, then creates thumbnails)

Then it creates a new thread, with the date, city and venue as the title, and all the info gets dumped into a new thread and people can reply to the thread with the thumbnail attachments at the bottom.

If someone wants to help, I could throw a few live DVD's into the deal
Reply With Quote
  #282  
Old 11-20-2004, 10:04 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*installed*
Very nice hack - does, with a bit of tweaking, just what I need.
I'm using it to ensure people enter all the required information in classified adverts. I'll be trying to change the target address of the 'New thread' button in certain forums to call this script.
Many thanks Mr Erwin, Sir!

Question/request for you.
How would I implement the $messagearea and $posticons variables so that the user interface for one of the fields is identical to a normal new thread?
Reply With Quote
  #283  
Old 11-20-2004, 10:27 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope you don't mind but I'd like to share how I got this working to use a form to submit the first post in new threads.
It's for our classifieds forums (3 of them) where people often dive in and break several trading rules.
I wanted to make sure they were given plenty of opportunities to read the rules before submitting their adverts.
See the attached screen grab.
Our 3 forums have forum ids of 51,62 and 99.

Firstly I used a temporary forum invisible to the public to test this out.
I followed Erwin's instructions to edit the form and formanswers templates and form.php.
The only things I needed to change in the form.txt template was to add a variable 'f' to store the forumid rather than hard code it.

HTML Code:
   <input type="hidden" value="$userid" name="userid">
   <input type="hidden" value="$f" name="f">
   <input type="hidden" value="submit" name="action">
and the tickbox code looked like this.
HTML Code:
      <tr>
         <td class="alt1" valign="top"><b>$ad_agreequestion</b></td>
         <td class="alt1" valign="top" colspan="2"><input name="ad_agree" type="checkbox" value="Confirmed"> <font class="smallfont">$ad_agreeexplain</font></td>
      </tr>
(I used the smallfont class to reduce the size of the explanation text).

Then most of the work goes in the form.php. Aside from changing it to put in my own variables etc., I had to make a few additional tweaks.

At the top I globalised the variables used in the form plus the forum id 'f'

HTML Code:
globalize($_POST, array(
'ad_title' => STR,
'ad_description' => STR,
'ad_location' => STR,
'ad_agree' => STR,
'action' => STR,
'f' => STR
));
and set the forumid to the passed variable $f instead of hard coding it.

PHP Code:
//FORUM TO POST NEW THREAD IN
$formforumid $f
and changed the form validation to insist that the checkbox be checked:

PHP Code:
if ($answerall == "1") {
    if (
$ad_title == '' OR $ad_description == '' OR $ad_location == '' OR $ad_agree <> 'Confirmed')
    {
    
$errormessage "Please complete all the information on the classified submission form and agree that you have read and abide by the trading rules.<br>Press the Back button to return to the form.";
    eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');
    exit();
    }

The last thing I did was to edit the FORUMDISPLAY template to make the 'New Thread' buttons call the form. In both places (there are 2 buttons):

PHP Code:
<!-- -------------- new thread button logic for classifieds form -----  -->
<if 
condition="$show['newthreadlink']">
<if 
condition="$foruminfo[forumid] == 51 OR $foruminfo[forumid] == 62 OR $foruminfo[forumid] == 99">
<
a href="form.php?$session[sessionurl]&amp;f=$foruminfo[forumid]">
<else />
<
a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
</if>
<!-- ------------ / new 
thread button logic for classifieds form -----  --> 
Note that it calls the form.php with the f= to the forumid.
And it works perfectly.

The next enhancement might be to install a separate hack which creates an [admin] bb code which hides text within it from all users except admin. And then get people to enter a phone number for security purposes which only admin can see in the posts.

Maybe Erwin will want to add my suggestions into his standard hack.
Reply With Quote
  #284  
Old 11-21-2004, 07:47 PM
blue_chi blue_chi is offline
 
Join Date: Feb 2004
Location: Oman
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THIS IS GOOD.

Going to install it soon!
Reply With Quote
  #285  
Old 11-23-2004, 08:16 PM
defi's Avatar
defi defi is offline
 
Join Date: Nov 2003
Location: Florida
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was wondering;

1.) Is there a way to change it so the user can enter a name for the thread rather then a pre-defined one being made?

2.) Have attachments been added to the capability of this form?
Reply With Quote
  #286  
Old 11-23-2004, 08:34 PM
neofootball neofootball is offline
 
Join Date: Sep 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack! Is there a way to pm & email more than one person?
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 02:18 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.10283 seconds
  • Memory Usage 2,388KB
  • 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
  • (3)bbcode_html
  • (3)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
  • (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