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)

pjdaley 06-15-2004 01:45 AM

Quote:

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

i understand, but like i want this form for unregistered, so it shows... Unregistered $formtitle.... i would rather just put like... Guest Submitted new Joke! or something

Erwin 06-15-2004 02:18 AM

Quote:

Originally Posted by pjdaley
i understand, but like i want this form for unregistered, so it shows... Unregistered $formtitle.... i would rather just put like... Guest Submitted new Joke! or something

You can put whatever you wish by modifying the php file.

Boofo 06-15-2004 03:45 AM

Quote:

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

Can you show us what we would need to do for that, sir? ;)

pjdaley 06-15-2004 04:03 AM

Quote:

Originally Posted by Erwin
You can put whatever you wish by modifying the php file.

not really a coder though :ermm:

Zephanor 06-17-2004 03:12 AM

Nice work! I've setup an application form that works quite well and it was easy to figure out.

Is there a way to set it up so that it will require all fields to be answered in order for the form to be sumbitted?

bonken 06-17-2004 11:04 AM

rocks
!!

HakkieDEV 06-17-2004 01:40 PM

Thank you sir for this extremely good hack!

Zephanor 06-18-2004 05:30 AM

Anyone have any thoughts on requiring all fields to be completed before submitting the form? Or maybe a direction I can look or fiddle with?

Any help is appreciated and this is an awesome hack, I love it.

:D

Erwin 06-18-2004 05:37 AM

Quote:

Originally Posted by Zephanor
Anyone have any thoughts on requiring all fields to be completed before submitting the form? Or maybe a direction I can look or fiddle with?

Any help is appreciated and this is an awesome hack, I love it.

:D

You can do that by adding some javascript to the top of the template to check the fields before submitting. I can also code it into the PHP file, but I'm trying to make this hack as generic as possible, so any customization will have to be done by the installer, as each site requires different things.

Boofo 06-18-2004 05:46 AM

Quote:

Originally Posted by Erwin
You can do that by adding some javascript to the top of the template to check the fields before submitting. I can also code it into the PHP file, but I'm trying to make this hack as generic as possible, so any customization will have to be done by the installer, as each site requires different things.

Couldn't you code it in PHP and make a variable option at the top to turn it off or on? I think it would be a great addition. ;)

Erwin 06-18-2004 06:31 AM

Quote:

Originally Posted by Boofo
Couldn't you code it in PHP and make a variable option at the top to turn it off or on? I think it would be a great addition. ;)

You guys are asking for sooooo much. ;)

Geez, and I do this for free though... when I find time, I'll add it.

Boofo 06-18-2004 11:23 AM

Quote:

Originally Posted by Erwin
You guys are asking for sooooo much. ;)

Geez, and I do this for free though... when I find time, I'll add it.

That's the spirit! That's what makes you stand out from the rest of us here. ;)

Zephanor 06-18-2004 01:20 PM

Heheh, it would be a great addition but it's not a big deal. I like that it's an easy snap it. I'll poke around and see what I can find.

Thanks!

Erwin 06-19-2004 02:00 AM

Update Version 1.1
-------------------------

Added option to force user to answer all questions.

New ZIP file attached in first post.



To upgrade manually, you can do this:

1) In form.php, find:

PHP Code:

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF FORM (do not use quotation marks or you will get a parse error)
//////////////////////////////////////////////////////////////////////////////////////////////////// 

Above ADD:

PHP Code:

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall "1"


2) Then, find:

PHP Code:

if ($action=="submit") { 

Below, ADD:

PHP Code:

if ($answerall == "1") {
    if (
$normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $radioanswer3other == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $longanswer1 == '')
    {
    
$errormessage "$bbuserinfo[username], you need to answer every question!";
    eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');
    exit();
    }


Done! :)

Playboy69 06-19-2004 02:07 AM

I am new to this so is there anyone who can walk me through this a bit on how to install this please

Zephanor 06-19-2004 04:47 AM

Erwin, you are da man!

Thanks a great deal. Only problem is that there is no way to click back to retain the answers (my form as 10 longanswers and that would be frustrating if they missed one of the two radio buttons.)

Oh, I just thought of another idea and to be totally ignored by this is perfectly fine as I'm totally satified with your work as is.

Any way to make it so that folks can only fill out the form once? I'm sure there is but it would probably require making an addition to the DB which I'm not quite sure how to do that (I'm sql dumb. Heheh.)

Keep up the great work!

Boofo 06-19-2004 04:52 AM

Quote:

Originally Posted by Zephanor
Erwin, you are da man!

Thanks a great deal. I just thought of another idea and to be totally ignored by this is perfectly fine as I'm totally satified with your work as is.

Any way to make it so that folks can only fill out the form once? I'm sure there is but it would probably require making an addition to the DB which I'm not quite sure how to do that (I'm sql dumb. Heheh.)

Keep up the great work!

You want fries with that? LOL

Zephanor 06-19-2004 05:05 AM

Oh I know, I get the same thing on the items I actually work on myself, heheh. I don't ask a lot all over, it's pretty rare but the need is there in this case. Either way I'm happy just having what I've got and all credit to the author.

:)

Boofo 06-19-2004 05:19 AM

Quote:

Originally Posted by Zephanor
Oh I know, I get the same thing on the items I actually work on myself, heheh. I don't ask a lot all over, it's pretty rare but the need is there in this case. Either way I'm happy just having what I've got and all credit to the author.

:)

I was just messing with you. I'm worse for that than you are, actually. ;)

Playboy69 06-19-2004 06:01 AM

I was wondering how to set this up. It says add the 2 templates but I have no clue how or what the templates are. Also If i wanted to add more questions or changes how the answers are do i have to add this in the templates?

WAR 06-19-2004 10:05 PM

Thanks alot for the Hack Erwin!

If I may... My request for the future wish-list on this hack would be some kind of AdminCP (or ModCP) interface where you could setup a form automagically.

It works great as is, but if I had a way for my different usergoup leaders to setup their own questionaires it would be even better

Thank you again for the Mod Erwin.

EDIT: Since when does the quick reply auto-quote a post?

gmtalk 06-20-2004 03:19 AM

Erwin,

Great Hack. I have one request. Is there a way to make PM/Email to user feature send the response form to the thread starter and not a set userid that is called in the php file you currently have?

I assume that it is possible, but with my finite coding ability I do not know where to begin.

teksigns 06-20-2004 03:26 AM

Quote:

Originally Posted by gmtalk
Erwin,

Great Hack. I have one request. Is there a way to make PM/Email to user feature send the response form to the thread starter and not a set userid that is called in the php file you currently have?

I assume that it is possible, but with my finite coding ability I do not know where to begin.


Simple .....

Change :

Code:

$formpmid = "1";

to :

Code:

$formpmid = $bbuserinfo[userid];

i have not tested this but it should send the pm to the user
that submitted the form ......

ragintajin 06-21-2004 02:48 AM

Quote:

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

Quote:

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

I'm confused...so to add more questions do I have to edit the templates or not?

Erwin 06-21-2004 03:53 AM

Quote:

Originally Posted by ragintajin
I'm confused...so to add more questions do I have to edit the templates or not?

You need to be a licensed user to use this hack first. :)

ragintajin 06-21-2004 06:10 AM

Quote:

Originally Posted by Erwin
You need to be a licensed user to use this hack first. :)

I am...

Erwin 06-21-2004 09:43 AM

Mmm... you are showing up as an unlicensed user for some reason... did you change your email address or something?

gmtalk 06-21-2004 06:03 PM

Erwin,

Hack is great. I would like to provide the ability to have attachments in the form to thread feature. Is there an easy way to go about this?

The changes provided by Tek worked after some other changes made.

Erwin 06-21-2004 08:25 PM

Quote:

Originally Posted by gmtalk
Erwin,

Hack is great. I would like to provide the ability to have attachments in the form to thread feature. Is there an easy way to go about this?


The changes provided by Tek worked after some other changes made.

Mmm... not a bad idea... Is there an easy way to do it? Not sure, haven't tried... maybe when I have time.

ChrisBaktis 06-23-2004 09:22 PM

This is a great hack - I have one request. Is there a way to make it so a member can upload a photo with the form? I run a sports card trading site and want to use this form so members can upload a picture of a good card pull. It would be nice if I can add the feature to the form so they can upload the scan.

Chris

Erwin 06-23-2004 10:28 PM

Quote:

Originally Posted by ChrisBaktis
This is a great hack - I have one request. Is there a way to make it so a member can upload a photo with the form? I run a sports card trading site and want to use this form so members can upload a picture of a good card pull. It would be nice if I can add the feature to the form so they can upload the scan.

Chris

Do people want the form to upload the thing as an attachment, or just upload it to the directory? The latter is easier to do, but the former requires a bit more innovation.

WAR 06-24-2004 12:39 AM

Quote:

Originally Posted by Erwin
Do people want the form to upload the thing as an attachment, or just upload it to the directory? The latter is easier to do, but the former requires a bit more innovation.

The ability to upload it as an attachment would be nice if it was possible.

If it was just uploaded to a directory then it would be difficult to manage permissions to who had access to it wouldn't it?

Erwin 06-24-2004 01:44 AM

It would be an attachment to a post... mmm, it's easy in vB2, but in vB3 with the new manage attachment system, it's not as straightforward. When I have time possible...

gmtalk 06-24-2004 08:01 AM

Erwin,

I think that doing it similar to the current new post w/attachments would be the go. As was said by WAR, I would like to have the ability to manage permissions.

Just my 2 cents.

ChrisBaktis 06-24-2004 01:25 PM

I would want it as an attachment. I want to get the form and picture that I can then put into an HTML or another .php file to display. I like the browse option that members have when they upload attachements now.

Chris

jugo 06-28-2004 03:36 PM

Erwin,

Thanks Again....Great work...Big fan of your Hacks.

NOW for the challenge(?).

I would like to use to include a POLL with the post. Is this possible. It would definitely be worth while. (This would be ideal in addition to the attachment hack).

Erwin 06-28-2004 11:14 PM

Quote:

Originally Posted by juanph
Erwin,

Thanks Again....Great work...Big fan of your Hacks.

NOW for the challenge(?).

I would like to use to include a POLL with the post. Is this possible. It would definitely be worth while. (This would be ideal in addition to the attachment hack).

Not as simple as it looks, adding poll. When I have time I may tackle this. Too busy at the moment with work and my own site.

teksigns 06-30-2004 05:15 PM

I have a question !

i want my form to post a new thread in html ....

i have it where it works fine for the administrator .

however when a registered user post using the form
the thread just displays the raw html in the post
rather than showing the parsed html version....

the reason this happens is because i do not allow
html posting for anyone except administrators .

are there a way to make it so that post genterated with the
form allow the html to show requardless of the forum permissions

but still ristrict all other post to the forum permission of no html

'

Erwin 07-02-2004 03:03 AM

Quote:

Originally Posted by teksigns
I have a question !

i want my form to post a new thread in html ....

i have it where it works fine for the administrator .


however when a registered user post using the form
the thread just displays the raw html in the post
rather than showing the parsed html version....

the reason this happens is because i do not allow
html posting for anyone except administrators .


are there a way to make it so that post genterated with the
form allow the html to show requardless of the forum permissions

but still ristrict all other post to the forum permission of no html



'

You need to hack functions_newpost for that to occur.

ragintajin 07-02-2004 03:28 AM

Quote:

Originally Posted by Erwin
You need to be a licensed user to use this hack first. :)

Okay, its official...Steve Machol says I'm showing up as licensed...could you kindly address my questions in post #64?


All times are GMT. The time now is 08:16 PM.

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.01431 seconds
  • Memory Usage 1,849KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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