vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News. (https://vborg.vbsupport.ru/showthread.php?t=66082)

Erwin 06-11-2004 10:00 PM

FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News.
 
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:

SaN-DeeP 06-11-2004 11:41 PM

sounds interesting. i will give this a try now ;)
[high]* SaN-DeeP is ready to install
[/high]

thnx for making it 3.0 complaint

Sandy...

mmw 06-11-2004 11:43 PM

Thanks for this :)
[high]* mmw installs[/high]

Erwin 06-11-2004 11:47 PM

Quote:

Originally Posted by SaN-DeeP
sounds interesting. i will give this a try now ;)
[high]* SaN-DeeP is ready to install
[/high]

thnx for making it 3.0 complaint

Sandy...

I've modified form.php just slightly to make the thank you page look nicer - please download and upload the new form.php if you have managed to download it before this post was made. :)

Erwin 06-11-2004 11:48 PM

In the vB2 version, you needed to install 3 templates. I've reduced it down to 2 now. :)

pjdaley 06-12-2004 12:06 AM

i will download this when i get home, and test it out, but im just wondering, can a guest fill out such any form, i see it creates a thread in a forum i can specify...but the question is can other members reply? like can they see it and ect? im just wondering...

Erwin 06-12-2004 12:16 AM

Quote:

Originally Posted by pjdaley
i will download this when i get home, and test it out, but im just wondering, can a guest fill out such any form, i see it creates a thread in a forum i can specify...but the question is can other members reply? like can they see it and ect? im just wondering...

You can set which usergroup you want access to this form in the PHP file. :)

Whether members can reply depends on the forum permissions - nothing to do with this hack. This hack just does what I've described. :)

insanctus 06-12-2004 12:29 AM

Lmao title was so long I just had to look :)

[high]* insanctus will click install and play with it.[/high]

KTBleeding 06-12-2004 01:02 AM

Cool!

Is there anyway to make it so registered members have to have atleast 10 posts to fill out a certain form?

Vivi Ornitier 06-12-2004 02:03 AM

nice, been waitin for somethin like this. If we want the forum to create a new thread in certain forums, can it be done so it creates a new thread in 2 specified forums?? I just need clarification on that before i start installin

Erwin 06-12-2004 02:53 AM

Quote:

Originally Posted by Vivi Ornitier
nice, been waitin for somethin like this. If we want the forum to create a new thread in certain forums, can it be done so it creates a new thread in 2 specified forums?? I just need clarification on that before i start installin

2 forums? Of course - just replicate the section of the code that checks $formforum, and make another variable called $formforumid2, and in the second copy of the $formforum section, rename $formforumid to $formforumid2.

dndog 06-12-2004 03:02 AM

/me clicks install.

I had requested this a month ago. Thanks.

ernestdefoe 06-12-2004 03:19 AM

Works like a charm for me. After I figured it out. My mind is working slower and slower these days. Thanks for this hack.

Logikos 06-12-2004 03:38 AM

/me clicks install.

NICE!

BamaStangGuy 06-12-2004 05:02 AM

Awsome man got it working for me

http://mustang-forums.com/forums/modapp.php

mtha 06-12-2004 06:01 AM

B-E-A-U-T-I-F-U-L hack

Quote:

Originally Posted by Erwin
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.

How can I change the format of the form? say I want few main input questions, few radio buttons, norman text input, few long answers ...

Erwin 06-12-2004 06:14 AM

Quote:

Originally Posted by mtha
B-E-A-U-T-I-F-U-L hack


How can I change the format of the form? say I want few main input questions, few radio buttons, norman text input, few long answers ...

You can do that by adding or substracting the variables, modifying the "global section" at the top to allow the variables to be requested, and then changing the template to add or substract the variables.

It can be worked out in my hack - I've given you the tools - go forth and modify this hack to suit your site!

reteep 06-12-2004 07:05 AM

Great Hack Erwin, thanks!

Boofo 06-12-2004 07:42 AM

Thank you, sir. ;)

[high]* Boofo clicks install![/high]

Lee Wilde 06-12-2004 08:04 AM

You are a scholar and a gentleman Erwin - thank you for this hack.

Would it be possible for the user to select which forum he wants to post in? Perhaps a drop-down list of several forums.....when the user selects one, it changes the forumid.

If this is possible, would you mind providing the necessary code changes?

Intex 06-12-2004 08:14 AM

Nice1 Erwin - I used your hack from 2.x. Good job :).

[high]* Intex will add over the weekend[/high]

MindTrix 06-12-2004 11:47 AM

Sounds super sweet, im going to try this out. Ohh and BrentWilson we cant see your demo because it asks us to sign up

nexialys 06-12-2004 11:54 AM

good work Erwin.... btw i lost a client by your fault... ;) but it's for good, i was not to do it as well as your hack!

KTBleeding 06-12-2004 01:05 PM

Quote:

Originally Posted by KTBleeding
Cool!

Is there anyway to make it so registered members have to have atleast 10 posts to fill out a certain form?

I got unlazy and attempted the conditionals myself and got it working. If anyone else wants to make it so users have to have a certain post count to be able to fill out the form, do this.

In the "form" template..

Find:
HTML Code:

                <tr>
                  <td> $formpurpose </td>
                </tr>
              </table>
              </fieldset></td>
          </tr>
        </table></td>
    </tr>

Add After:
HTML Code:

<if condition="$bbuserinfo[posts] >= 10">
(change 10 to whatever post count you want required)

Now find:
HTML Code:

</form>
Add After:
HTML Code:

<else />
    <tr>
      <td class="alt2" valign="middle">TEXT YOU WANT UNQUALIFIED USERS TO SEE.</td>
    </tr>
  </table>
</td>
</tr>
</table>
</if>


Works great!
[high]* KTBleeding clicks install[/high]

BamaStangGuy 06-12-2004 01:30 PM

Quote:

Originally Posted by MindTrix
Sounds super sweet, im going to try this out. Ohh and BrentWilson we cant see your demo because it asks us to sign up

Fixed it sorry about that.

MTHA if you need help on customizing it let me know

romanticyao 06-12-2004 04:36 PM

thanx erwin~ i have waited so long for this one~:nervous:

BarHopper 06-12-2004 09:29 PM

This sia stupid question, but where are the two templates?

Erwin 06-12-2004 10:08 PM

Quote:

Originally Posted by BarHopper
This sia stupid question, but where are the two templates?

They are the 2 text files in the ZIP files. :) "form" and "formanswers".

KTBleeding 06-12-2004 10:08 PM

Quote:

Originally Posted by BarHopper
This sia stupid question, but where are the two templates?

Included in the zip. form.txt and formanwers.txt (I believe, I'm at work right now and don't have access to see if that's correct.)

KTBleeding 06-12-2004 10:12 PM

Quote:

Originally Posted by Erwin
They are the 2 text files in the ZIP files. :) "form" and "formanswers".

Beat me to it. :(

mtha 06-12-2004 11:02 PM

Quote:

Originally Posted by BrentWilson
Fixed it sorry about that.

MTHA if you need help on customizing it let me know

Appreciate your offer, but I got it alright Wilson. I just wanna ask to see if there's a proper way to add, and I got that from Erwin.

This is a great hack, very easy to customize.

However, each "form" will have different structure, set of questions, number of questions, type of questions, which will end up to have different template for each form anyway.

One question:

After submitting the form, user is redirect to a thanks page
-username-, thank you for submitting the -topic!-

Should it be auto redirect to forum home, or some thread?

BarHopper 06-13-2004 07:03 AM

ah, thankyou kind sirs.

/me clicks install

Lee Wilde 06-14-2004 03:51 PM

Quote:

Originally Posted by Lee Wilde
You are a scholar and a gentleman Erwin - thank you for this hack.

Would it be possible for the user to select which forum he wants to post in? Perhaps a drop-down list of several forums.....when the user selects one, it changes the forumid.

If this is possible, would you mind providing the necessary code changes?


Thanks anyway. I'll try something else.

The Realist 06-14-2004 05:00 PM

Erwin

Your getting better and better as you grow older M8 :)

Again you have shown your the bee's knee's and I take my hat off to you.

Great hack and Im installing.

Thank You.

Erwin 06-14-2004 08:26 PM

Quote:

Originally Posted by Lee Wilde
Thanks anyway. I'll try something else.

What you suggest is simple and only requires a template mod - just a drop down menu in HTML with a list of forumids - all you need is to make sure the forumid variable is added to the POST list at the top of html.php.

pjdaley 06-14-2004 10:50 PM

great hack man, but is it possible to change the name of the thread? to one of the answers?

teksigns 06-14-2004 11:14 PM

any way to make it so that a new thread gets posted and a NEW EVENT in the calander of choice ......

Erwin 06-14-2004 11:20 PM

Quote:

Originally Posted by pjdaley
great hack man, but is it possible to change the name of the thread? to one of the answers?

Sure - in the PHP file, look for the query that inserts the new thread, and change the threat title being inserted from $formtitle to whichever variable you want.

Erwin 06-14-2004 11:21 PM

Quote:

Originally Posted by teksigns
any way to make it so that a new thread gets posted and a NEW EVENT in the calander of choice ......

Can be done, but that's a completely different hack mate. :) I may add this as a new option when I have time - it's not hard.

teksigns 06-14-2004 11:23 PM

Quote:

Originally Posted by Erwin
Can be done, but that's a completely different hack mate. :) I may add this as a new option when I have time - it's not hard.



thank you !


I really could use this !


All times are GMT. The time now is 05:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01950 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete