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
  #452  
Old 07-02-2005, 11:43 PM
aggiefan aggiefan is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a link to my form. It's being used for a contest I'm doing (win 2 Big XII Championship Tickets for football). It's a pick 'em contest where the user predicts the winner and fills out a tiebreaker guess. I have it set up to where it will PM me. The games entered are just testing...

http://aggiefans.com/forums/week1.php

Listed are the things I want this form to do:
  • I want it to PM me and the submitting user.
  • Also, is there a way to get this form to actually input the answers into a table which can be stored in a database and displayed by user (link to each person's picks)?
  • Only allow a user to submit it once

I'd be willing to pay for help with the database/table thing. The other two requests have been posted before, but I've searched all 31 pages and haven't found an answer. Take a look and let me know what you think and if you can help.
Reply With Quote
  #453  
Old 07-03-2005, 12:02 AM
aggiefan aggiefan is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I found the answer to #1 and a lot of other user's questions. Here's what I did to get the 2 PM's to work. (it may be redundant or the roundabout way, but given my lack of programming skill, it works and wasn't hard).

In your form.php find:
Code:
//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "1";

//USERID TO PM TO
$formpmid = "whateveridyouhavehere";
Make this change:
Code:
//USERID TO PM TO
$formpmid = "whateveridyouhavehere";
$formpmid2 = "$bbuserinfo[userid]"
That's if you want it PM'd to the submitter. If not, put whoever's userid you want it to go to. Repeat as many times as necessary (next one would be pmid3, etc).

Then scroll down and find in the bottom area:
Code:
if ($formpm == "1") {
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '".addslashes(htmlspecialchars($formtitle))."', '".addslashes(htmlspecialchars($formsend))."', '" . addslashes(serialize($tostring)) . "', 0, " . TIMENOW . ", 1)");
$pmtextid = $DB_site->insert_id();
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, messageread) VALUES ($pmtextid, $formpmid, 0)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1 WHERE userid = $formpmid");
    }
What I did is copy this entire section of code, repaste it below where it is and change the 2 bolded area:
Code:
if ($formpm == "1") {
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '".addslashes(htmlspecialchars($formtitle))."', '".addslashes(htmlspecialchars($formsend))."', '" . addslashes(serialize($tostring)) . "', 0, " . TIMENOW . ", 1)");
$pmtextid = $DB_site->insert_id();
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, messageread) VALUES ($pmtextid, $formpmid2, 0)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1 WHERE userid = $formpmid2");
It worked for me and sent a PM of the answers to me and the person who submitted it. Hope this helps.
Reply With Quote
  #454  
Old 07-03-2005, 11:01 AM
Stachel Stachel is offline
 
Join Date: Jun 2004
Location: US
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
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
3. Posted as a reply in an existing thread of your choice
5. Emailed to an email address you specify
Oh my GOD just last week I was wondering if this was possible !!!

Dr. Loh you are a genius!

Stachel
Reply With Quote
  #455  
Old 07-07-2005, 08:27 AM
Michael2's Avatar
Michael2 Michael2 is offline
 
Join Date: Nov 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any plans to make this work with 3.5? I was using it before and really miss it.
Reply With Quote
  #456  
Old 07-07-2005, 08:46 PM
jsteinitz jsteinitz is offline
 
Join Date: May 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Downloaded, installed and made some field modifications--working well. Excellent hack; I had been trying to figure out a way to standardize input from users but had given up. Thanks very much to you, Dr. Loh.

One problem-- the threads that are posted via the form don't seem to be appearing in searches; if I post a thread directly to the forum (bypassing the form), searching works correctly on this one thread only.

Any ideas why my form-generated posts aren't being included in searches?
Reply With Quote
  #457  
Old 07-07-2005, 09:03 PM
jsteinitz jsteinitz is offline
 
Join Date: May 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks anyway; found the answer in the forum.
Reply With Quote
  #458  
Old 07-13-2005, 02:04 AM
ZGeek ZGeek is offline
 
Join Date: Jan 2003
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway to change the reply to email address to the member who filled out the form?
Reply With Quote
  #459  
Old 07-13-2005, 03:58 AM
jschlosser jschlosser is offline
 
Join Date: Jul 2005
Location: Germany
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi dude's,

first of all thanks for this nice script. its very impotant for me to have it.
the second one is my bad english. sorry for
i have changed the script for my needs, but one thing is also important for me.

THE TITLE::: can only changed in the script. form.php

but i need a textform wherer i can write my own TITLE of the new thread.
is it possible to change ???

would be wonderful.

you can see my form on this site.

http://www.pickup-portal.com
on the left side go to "Fahruzeuge eingeben" then you 'll see the form.php

when you click on "Frachten eingeben" you 'll see the the fom1.php

login: test
pass: test

many thankx in advance

greets sascha

ps. when i make a new thread with this script and i want search a word from the new thread, i cannot find something in the search. ???
Reply With Quote
  #460  
Old 07-14-2005, 12:01 AM
SirJonathan SirJonathan is offline
 
Join Date: Oct 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SirJonathan
Yes . I added all the variables and for most people it works great. There are just some who have filled it all out, post, and it never shows up in the forum.

I've worked on the permissions and I'm pretty sure its not that.. You are required to register before you access the form. Can you think of any reasons why it would work for most people and then not for some?

-Jonathan
Any ideas on this one?

I'm using the form to recieve membership applications from my members and its very frustrating when even a few of the applications posted don't actually go through. Has anyone else had trouble with the form not posting for some of their users?

-Jonathan
Reply With Quote
  #461  
Old 07-19-2005, 10:38 PM
Sovereign Sovereign is offline
 
Join Date: Apr 2004
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhh, the install says that this is compliant with vB version 3.x.x, but I get

Code:
 Fatal error: Call to undefined function: globalize() in /home/alliance/public_html/vb/hostingrequest.php on line 24
when attempting to use the test form....(I'm on 3.5)
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 12:53 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.11288 seconds
  • Memory Usage 2,326KB
  • 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
  • (2)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
  • (1)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