vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   FORM TO FORUM/ THREAD/ PM/ EMAIL - CUSTOMIZABLE FORMS for Mod Apps, Orders, News (https://vborg.vbsupport.ru/showthread.php?t=53269)

nymyth 06-03-2003 01:26 AM

ooohhh....why wont any text show up in the posts and pms..???

Peace

Koutaru 06-03-2003 01:28 AM

Post your form php file and I'll have a look

nymyth 06-03-2003 01:31 AM

here u go

Peace

Koutaru 06-03-2003 01:37 AM

well first of all

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "0";

check your $formpost template

nymyth 06-03-2003 01:42 AM

i know i turned that off cuz the posts were coming back blank

$formtitle
$bbuserinfo[username]

$normalquestion1
$normalanswer1

$radioquestion1
$radioanswer1

$radioquestion2
$radioanswer2

$radioquestion3
$radioanswer3
$radioanswer3other

$question1
$answer1

$question2
$answer2

$question3
$answer3

-----------------------------------------------------
$longquestion1

$longanswer1

thats what i ahve in there

Peace

nymyth 06-03-2003 01:44 AM

my email got sent, but that was also blank......hmmm

Peace

Koutaru 06-03-2003 01:52 AM

I'll work on it with you via pm. Everything looks okay, if it's blank then the function is working except it's not inserting the $formpost template correctly

Try changing
eval("\$formsend = \"".gettemplate("$formpost")."\";");

to

eval("\$formsend = \"".gettemplate("formpost1")."\";");

PM me if you have problems and it still isn't working. Make sure (just double and triple check ;) ) formpost1 template is in the current style set you're using

Erwin 06-03-2003 02:12 AM

You are missing the formpost1 template. Do as Koutaru says. And thanks Koutaru - good work. :)

Koutaru 06-03-2003 02:31 AM

:p yup it was a template error -- it happens. Problem fixed, it would have totally stumped me if it wasn't something with the templates.

:)

Cyricx 06-03-2003 07:18 PM

Hmmm since we can't use " marks in like the purpose or questions boxes which restricts html coding. Is there a way to enable bbcode for those areas? :)

So we can put in smilies or glow or something like that to kinda spice things up and make it look more fun? :)

nymyth 06-03-2003 08:14 PM

not a template problem erwin...this is very weird...i have Koutaru who was nice enough to help me though...so hopefully itll be working soon..

Peace

Koutaru 06-03-2003 08:26 PM

It was still not sending after we supposedly figured it out (the template wasn't named right). It's very weird. The templates are named right, the form works, it just not outputting $formsend right.

nymyth 06-03-2003 10:29 PM

anybody knows how to handle this problem???

Peace

Cyricx 06-05-2003 03:27 PM

Another idea for ya in addition to the bbcode is perhaps enable this to post to a thread?

Would have to enter the url for the thread I'm sure.

On our forums we use it for applications for several different things, then keep a thread in private forums where we condense the responses. :)

Awesome hack though, workin on our 6th form now LOL. :)

Doc203 06-06-2003 03:21 AM

I don't post very often here, but I had to on this one. What a great hack! I noticed earlier in this thread someone had posted "What would this be used for" Well my forum is for locating car parts and it will be a great addition.

New users often don't know what to enter where and with this form I can make them enter what I want, and eliminate the guess work. Awesome work Erwin!

Erwin 06-07-2003 01:10 AM

Update Version 1.3 - Ability for form to REPLY to a CURRENT THREAD

As requested by a few users. Your customizable form can now be posted as a REPLY to an EXISTING THREAD instead of a new thread.

Easily configurable in the PHP file itself:

PHP Code:

//ENABLE FORM TO REPLY TO EXISTING THREAD
$formreply "0";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid "62930"

Just change the 0 to 1 and put in the threadid, and it will work. :)

To upgrade, just download the new form1.php - ensure it says "Version 1.3" at the top.

Enjoy! :)

Remi 06-07-2003 04:23 AM

Thank you very much for the update Erwin

This is Exactly what I have been waiting for :banana:

Installed :smoke:

Doc203 06-07-2003 05:20 AM

I have been customizing this thing and have even added drop down menu's etc. It is awesome.

I have one question though.... how can I get it to re-direct them to their post after they submit it?

Thanks for any help.

Rose 06-07-2003 04:16 PM

Thanks, Erwin! I've been waiting for this forever. :D


[eta]

I notice I don't get a pm popup when a form is submitted to pm. Is this an issue?

Doc203 06-08-2003 06:10 PM

Anyone know where to change what posts in the subject (Title) of the thread? It now posts as username/form title. I want to use $answer1 $answer2 as my subject when it posts in the forum.

Erwin 06-09-2003 01:49 AM

Quote:

Today at 05:10 AM Doc203 said this in Post #100
Anyone know where to change what posts in the subject (Title) of the thread? It now posts as username/form title. I want to use $answer1 $answer2 as my subject when it posts in the forum.

In form1.php (or whatever you have called your php file) =

FIND:

PHP Code:

'".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle' 

Replace with:

PHP Code:

'".addslashes(htmlspecialchars($answer1 $answer2))."' 

Do this TWICE (the above occurs TWICE).

Should work...

Doc203 06-09-2003 02:36 AM

Quote:

Today at 10:49 PM Erwin said this in Post #101
In form1.php (or whatever you have called your php file) =

FIND:

PHP Code:

'".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle' 

Replace with:

PHP Code:

'".addslashes(htmlspecialchars($answer1 $answer2)."' 

Do this TWICE (the above occurs TWICE).

Should work...

Thanks much for the reply... I get a parse error. I also tried adding another ")" at the end and no luck. Any ideas? BTW this hack is fantastic!

S.Shady 06-09-2003 02:41 AM

im no php expert but wouldnt it be this ?

PHP Code:

'".addslashes(htmlspecialchars($answer1 $answer2))."' 


Erwin 06-09-2003 02:44 AM

S.Shady is right, I forgot to close the bracket. :) Try that.

Doc203 06-09-2003 02:51 AM

I tried that and I still get the error...

I am replacing:

PHP Code:

'".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle' 

With:

PHP Code:

'".addslashes(htmlspecialchars($answer1 $answer2))."' 

Any idea? Thanks.

Doc203 06-09-2003 02:59 AM

Maybe I am doing it in the worng place. I have that code in 4 places. I am changing the ones under "Insert int thread" and "instet into post"...

Erwin 06-09-2003 03:03 AM

Try this:

PHP Code:

'".addslashes($answer1$answer2)."' 


Doc203 06-09-2003 03:06 AM

Still get the error...

Doc203 06-10-2003 01:25 AM

Quote:

Yesterday at 11:51 PM Doc203 said this in Post #105
I tried that and I still get the error...

I am replacing:

PHP Code:

'".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle' 

With:

PHP Code:

'".addslashes(htmlspecialchars($answer1 $answer2))."' 

Any idea? Thanks.

Ok this code will work if $answer1 is change to $normalanswer1 and only one is used...

PHP Code:

'".addslashes(htmlspecialchars($normalanswer3))."' 

But, I can't get more than one to work...

PHP Code:

'".addslashes(htmlspecialchars($normalanswer1 $normalanswer2))."' 

I also tried removing the space between the two. Any ideas?

Erwin 06-10-2003 02:28 AM

The try this:

PHP Code:

'".addslashes(htmlspecialchars($answer1))." ".addslashes(htmlspecialchars($answer2))."' 

It also may be related to what your answer is, whether it has some odd symbols in it etc.

Doc203 06-10-2003 01:31 PM

That worked Erwin! Thanks for the help.

lhang 06-10-2003 03:25 PM

Hi I'm a new VB user. This is very new to me.
I download and install the forms. My link www.myforum.com/forums/form1.php is blank page. What am i missing? Please help. Thanx

Erwin 06-11-2003 01:56 AM

Make sure you have installed the templates, and you have the name of the template the same in the form1.php config.

lhang 06-11-2003 12:05 PM

Yes, the name of the template is the same in the form1.php. Should i also place the template in the same folder where the form1.php is. Thank you.

Erwin 06-11-2003 12:17 PM

Quote:

Today at 11:05 PM lhang said this in Post #114
Yes, the name of the template is the same in the form1.php. Should i also place the template in the same folder where the form1.php is. Thank you.
No, you ADD THE TEMPLATE in your ADMIN CP. It does not go into any folder. :) You are indeed new to vBulletin. Templates are added in the Admin CP - you add it to all styles - start with default. You do NOT upload them to any folder. They get added directly into the MySQL database.

nymyth 06-11-2003 10:40 PM

does anyone have a solution to my problem?>???

Peace

Erwin 06-12-2003 03:41 AM

No idea why, nymyth - the only explanation would be missing templates, or template names don't match.

Hobbes 06-13-2003 04:37 AM

question!!!

I was wondering if I could have a minimum amount of posts needed before you can use the forum. and if you dont have the number of posts, they get a message saying so....

possible? and how?

Pollo 06-14-2003 02:36 AM

Since this is hardcoded in the php file, I'm a bit confused as to how to achieve this (probably simple) modification:

//FORUM TO POST NEW THREAD IN
$formforumid = "131";

Above is original, but what I'd like is for users to be able to choose between 4 forums (submit the thread to the most appropriate forum). For example:

The forum is about motorized vehicles. Part of the entire board (4 forums) would be a place where users can submit this form (this hack) and choose if they are telling us about their motorcycle, car, boat, other and it would be submitted to the proper forum (motorcycle, car, boat, other).

If I can't get a drop down, I suppose I could just have multiple forms, and users would make the choice before they even see the form. In some ways that might work better, but I just wanted to know if it is possible to do this.

Great hack!

Erwin 06-14-2003 02:42 AM

Quote:

Yesterday at 03:37 PM Hobbes said this in Post #118
question!!!

I was wondering if I could have a minimum amount of posts needed before you can use the forum. and if you dont have the number of posts, they get a message saying so....


possible? and how?

Easy.

In form1.php (whatever you have called it) find:

PHP Code:

if ($action=="submit") { 

Underneath, add:

PHP Code:

$allowform 100;
if (
$bbuserinfo[posts] < $allowform) {
      eval(
"standarderror(\"".gettemplate("error_notenoughpostsform")."\");");
      exit;
    } 

Change 100 to whatever you like.

Then, ADD a new template called "error_notenoughpostsform".

with the contents:

Code:


You need a postcount of at least $allowform in order to send a form.

Done! :)


All times are GMT. The time now is 04:18 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.01583 seconds
  • Memory Usage 1,837KB
  • 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
  • (1)bbcode_code_printable
  • (16)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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