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 02-13-2005 01:02 AM

Quote:

Originally Posted by Cheertobi
Hi,

I am sorry, I have not been through all of the thread right now! Just one quick question, is it also possible to post calender events via form.php?!

Regards,

Tobi

Possible but I have not added that function to the hack yet. I may in future.

Erwin 02-13-2005 01:03 AM

Quote:

Originally Posted by Leeper
I just want to make sure that I'm on the right train of thought here before I jump in with this major addition. I believe that with this and some custom work I can come up with a much better solution than what we have now.
Currently we have a very cumbersome process for person to join our club. To register as a guest on the forum is very straight forward process as it is the one built by vB. To join the club however is a bit more of a pain. Member uses join form and once completed and they submit, an email is generated to the admin team and the new user is sent to paypal. The problem is that there is nothing explaining that they still need to register on the forums. Once payment is received the member is moved into the member area but again, this is a very separate process that I?d like to integrate.
Can I create a "Join Form" with all of the variables that I need and a payment function that then leads the user into the registration area? The new join form would post the information into an admin forum.

Sorry if I?m posting this in the wrong area and I?m probably over complicating this but I?m a novice trying to find a better way.

That can be done - you just change the redirect options.

ChrisBaktis 02-13-2005 01:55 PM

Erwin,

I use this form to post trades between two members and currently have it setup to post the trade to a a specific form...I would also like to have it so it sends a PM to the other member (the person posting the form has to enter the other members name). Could I use the form answer variable to do this? Also if it is possible, and the person posting the trade enters a wrong member name (misspelled etc) would it still post in the form but not send the pm?

Erwin 02-13-2005 08:48 PM

Quote:

Originally Posted by ChrisBaktis
Erwin,

I use this form to post trades between two members and currently have it setup to post the trade to a a specific form...I would also like to have it so it sends a PM to the other member (the person posting the form has to enter the other members name). Could I use the form answer variable to do this? Also if it is possible, and the person posting the trade enters a wrong member name (misspelled etc) would it still post in the form but not send the pm?

Yes, you can definitely do all that. It's only a matter of changing the variables and adding a line to the code to search for the userid in order to send the pm.

Leeper 02-13-2005 09:19 PM

Quote:

Originally Posted by Erwin
That can be done - you just change the redirect options.

Wow! Normally I can see work that has been done and customize it a bit but I'm just not having much luck with this. Erwin thank you for your hard work and rather than pestering you with another question every hour or so, can you recommend someone to build a fairly elaborate form? Your work is great and I can see a ton of applications for this but in this particular case I'm working with a time constraint and it needs to be done right the first time since it will be handling money transactions.

ChrisBaktis 02-13-2005 11:05 PM

Quote:

Originally Posted by Erwin
Yes, you can definitely do all that. It's only a matter of changing the variables and adding a line to the code to search for the userid in order to send the pm.

I can do the variables but can you help with the line of code to search for the userid?

DarrinM 02-16-2005 04:06 PM

Can anyone advise me or provide help with the following scenario

When viewing someone's profile I wish to be able to click to open up a new form which will then be sent both to the person who's profile is being viewed and also to a third party preset email address.

I understand how to get most of the data prefilled on the form (such as the senders email address) but cannot see how I can pass the username and usernames email address of the person who's profile is being viewed into and to be used by the form

An alternative to doing this would be the ability to select a user from the member list (maybe in drop down) and then return to the form and populate the fields with their name, email address and maybe a custom field from their profile

Hope someone can assist and many thanks in advance

Regards

Darrin

Jolten 02-16-2005 04:10 PM

The variables for the profile owners page are $userinfo[username] etc. rather than $bbuserinfo.. you should be able to use those to fill out form fields.

ge66 02-16-2005 07:01 PM

Seemes to be a very useful hack.

I have a suggestion/question. Is i possible to make a form that I can fill in and submit today and that will be posted as a thred on Sunday say 7 am.

I want to use this to be able to spread news articles that I post at one time over several days.

I also guess it could be nice if you wanted a poll posted 6 am the first day of the month or something.

A chance to post a thread at any given date and time that you set in a form.

Cheertobi 02-19-2005 12:15 PM

Hi,

once again, have not been through all post of this thread. Just want to let you know, that I found two missing TABLE_PREFIXes!

Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
          $DB_site->query("UPDATE thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid");
                          $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid

have to be like

Code:

$DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
          $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid");
                          $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid

Anyway, it is a really great hack, can I parse BBCode for Bold etc. in anyway?!

Tobi

Cheertobi 02-19-2005 01:30 PM

Hi,

just found out how to parse the bbcode.

But also found another "problem", the redirect does not work ;( The url just ended like:

Code:

editpost.php?do=editpost&p=
Where p is empty.

Regards,

Tobi

ChrisBaktis 02-21-2005 04:57 PM

Does anyone know how to add it so forms that post to threads are added to the search index? Currently the posts will not show up until someone replies to them without using a form.

vbted 02-23-2005 11:17 PM

how would i make one of the input boxes check to see if it matches a custom profile field and pm to that user? any help would be great i'm sql noob. -Ted

life is boost 02-24-2005 01:22 PM

im still working on trying to get the form to add the users IP like a normal post would. If anyone has an ideas please let me know.

ChrisBaktis 02-24-2005 02:00 PM

Quote:

Originally Posted by ChrisBaktis
Does anyone know how to add it so forms that post to threads are added to the search index? Currently the posts will not show up until someone replies to them without using a form.

Anyone?

Abe1 02-24-2005 04:24 PM

Quote:

Originally Posted by ChrisBaktis
Anyone?

yes, use the option that will make the form go to the 'edit post' after. Once the user clicks 'submit,' the words will be added to the search.

ChrisBaktis 02-25-2005 12:09 AM

Thanks - I didnt see that verion 1.6 came out - this actually works out well for me.

ChrisBaktis 02-25-2005 04:55 PM

Has anyone played with this hack so a member can type in the username of the person they want the form pm'd to?

ChrisBaktis 02-26-2005 07:20 PM

Quote:

Originally Posted by ChrisBaktis
Has anyone played with this hack so a member can type in the username of the person they want the form pm'd to?

Just looking for a member to be able to type in a username and the form will PM that member the contents of a custom profile field.

unixdotcom 03-02-2005 03:35 AM

Dear Erwin,

Thank you for this "hack". We are working on a non-profit site, currently prototyped at www.inss.com, which will be moved to the "right domain" soon.

We need a form that is a "case submission" that permits a person who has been "abused" by the IRS to submit a custom designed form, which will be moderated, and then posted into the forum database.

Is this possible with your software?

Thank you for your help with our query.

Neo

morrow 03-13-2005 10:30 PM

Quote:

Originally Posted by PKRWUD
I'll tell you what I'm going to use it for (as soon as I can figure out how to add a redirect). :) My website is automotive themed, and we have a couple Tech forums, where members come to ask advice on how to fix various problems that they are having with their vehicles. A common problem that we see is when a member doesn't give important information when they are starting a thread. There have been times when all they'll say is: "My car runs crappy. What's wrong with it?" They forget that we may not know their Make/Model/Year, etc. For a couple years now, I've wanted to have a form that needs to be filled out in order to make a post in that forum, so that I could tell them specifically what info is needed.

I don't know what your forum is about, but perhaps you could find a similar use for this wonderful hack. :) Attached is a pic of my form page.

Take care,
~Chris

I am working on something very similar (automotive) and would like almost identicle information to what you have. Would you be willing to send me your form and templates? I'd really appreciate that. I'm not looking to copy what you have, but just want to see what you did to get it working.

Thanks alot!

morrow 03-15-2005 02:45 AM

Can somebody / anybody who has this installed with multiple questions post their working sample? I'd really love to get this hack up and running with more than the stock questions.

Thanks!

morrow 03-15-2005 05:33 PM

Can I offer some $$$$$$ for some help here? Let's not get too crazy, what I'm asking for will take someone approximately 1 1/2 minutes to accomplish.

Thanks

ChrisBaktis 03-16-2005 07:31 PM

what do you want a template of the form.php file?

morrow 03-17-2005 04:18 AM

Quote:

Originally Posted by ChrisBaktis
what do you want a template of the form.php file?

I would like the form.php and the two templates. I would like to look at somebody's working copy. I know the version here works, but it only provides 1 of each type of question. All I would like to do is see what this software looks like with multiples of each question, or at least the first question.

Thanks for the response.

ChrisBaktis 03-17-2005 12:34 PM

form:

Code:

<?php

/*======================================================================*\
|| #################################################################### ||
|| # FORM TO THREAD/ FORUM/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS    # ||
|| # Version 1.6 for vBulletin 3.x.x by Dr Erwin Loh                  # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Dr Erwin Loh. All Rights Reserved.          # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #################################################################### ||
\*======================================================================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

$globaltemplates = array(
    'tc_tradepostform',
    'tc_tradepostformanswers'
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

globalize($_POST, array(
'normalanswer1' => STR,
'radioanswer1' => STR,
'radioanswer2' => STR,
'radioanswer3' => STR,
'radioanswer3other' => STR,
'answer1' => STR,
'answer2' => STR,
'answer3' => STR,
'longanswer1' => STR,
'action' => STR
));

// #######################################################################
// ######################## CUSTOMIZE VARIABLES ##########################
// #######################################################################

////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($bbuserinfo['usergroupid'], array(2,5,6,9,13,15,16,17,19))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF THIS PHP FILE AND TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS!
//You can easily make more forms by just copying this file, renaming it, and modifying the variable in
//this file. You can keep the same templates for different forms. For more customization, you can
//use different templates, by renaming and modifying the templates.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of this file
$phpfilename = "tc_tradepostform.php";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

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

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

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$formoption1 = "Yes";
$formoption2 = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////

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

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid = "456";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "0";

//USERID TO PM TO
$formpmid = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO
$formemailaddress = "youremail@yourforums.com";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message
// 1 - redirect to post
// 2 - redirect to thread
// 3 - redirect to forum
// 4 - redirect to editpost to upload attachments
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "4";

$errormessage = "Thank you for submitting this form!"; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////

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

$answerall = "0";

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

$formtitle = "Personal Trade Center - Post A Trade/Sale";

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

$formpurpose = "Use This Form To Post A Trade or Sale Between RST Members";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Is This A Trade Or Sale?";

// The following choices must NOT have quotation marks
$radiochoice1a = "Trade";
$radiochoice1b = "Sale";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion2 = "Insurance On Shipping";

// The following choices must NOT have quotation marks
$radiochoice2a = "Yes";
$radiochoice2b = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion3 = "Delivery Confirmation";

// The following choices must NOT have quotation marks
$radiochoice3a = "Yes";
$radiochoice3b = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 4 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion4 = "Who Is Sending First";

// The following choices must NOT have quotation marks
$radiochoice4a = "Me";
$radiochoice4b = "Trade Partner";
$radiochoice4c = "Same Time";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "Trade/Sale Member Name #1";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion1 = "Please Post What Member #1 Will RECEIVE";

////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion2 = "Trade/Sale Member Name #2";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion2 = "Please Post What Your Trade/Sale Partner WILL RECEIVE";

////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion3 = "Include Any Other Info Here";

////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// start navbar
$navbits = array(
    "$phpfilename?$session[sessionurl]" => $formtitle
);

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

if ($action=="submit") {

if ($answerall == "1") {
    if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' 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();
    }
}

    eval('$formsend = "' . fetch_template('tc_tradepostformanswers') . '";');

    if ($formforum == "1") {
                    $DB_site->query("
                                INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount,
                                postusername, postuserid, lastposter, dateline, iconid, visible, attach)
                                VALUES
                                        ('".addslashes(htmlspecialchars($bbuserinfo[username]))." / $normalanswer2', " . TIMENOW . ", $formforumid,
                                        1, 0, '" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid],
                                        '" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", 0, 1,
                                        0)
                        ");
                $thread['threadid'] = $DB_site->insert_id();
                $DB_site->query("
                        INSERT INTO " . TABLE_PREFIX . "post
                                (threadid, title, username, userid, dateline, pagetext, allowsmilie,
                                showsignature, iconid, visible)
                        VALUES
                                ($thread[threadid], '".addslashes(htmlspecialchars($bbuserinfo[username]))." / $normalanswer2',
                                '" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid], " . TIMENOW . ",
                                '" . addslashes($formsend) . "', 1, 1,
                                0, 1)
                ");
                $post['postid'] = $DB_site->insert_id();
                $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "thread
                                SET firstpostid = $post[postid]
                                WHERE threadid = $thread[threadid]
                        ");
                $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                threadcount = threadcount + 1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '" . addslashes($bbuserinfo['username']) . "',
                                lastthread = '".addslashes(htmlspecialchars($bbuserinfo[username]))." /$normalanswer2',
                                lastthreadid = $thread[threadid]
                                WHERE forumid = $formforumid
                        ");
$forum[forumid] = $formforumid;
    }

    if ($formpoll == "1") {
              $DB_site->query("INSERT INTO " . TABLE_PREFIX . "poll (question,dateline,options,votes,active,numberoptions,timeout,multiple,public) VALUES ('".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle'," . TIMENOW . ",'$formoption1|||$formoption2','" . addslashes("0|||0") . "',1,2,0,0,0)");
            $pollid = $DB_site->insert_id();
            $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET pollid = '".$pollid."' WHERE threadid = '".$thread[threadid]."'");
}

    if ($formreply == "1") {
      $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
      $DB_site->query("UPDATE thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid");
                      $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid
                        ");
$forum[forumid] = $formreplyforumid;
    }

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");
    }

    if ($formemail == "1") {
    vbmail($formemailaddress, $formtitle, $formsend);
    }

if ($redirectoption == "1") {
            $url = "showthread.php?$session[sessionurl]p=$post[postid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "2") {
            $url = "showthread.php?$session[sessionurl]t=$thread[threadid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "3") {
            $url = "forumdisplay.php?$session[sessionurl]f=$forum[forumid]";
        eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "4") {
            $url = "editpost.php?do=editpost&$session[sessionurl]p=$post[postid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
  eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
  exit();
}
eval('print_output("' . fetch_template('tc_tradepostform') . '");');
?>

Form Template (I left out my custom skin template info)

Code:

<!-- main page contents -->

<form enctype="multipart/form-data" method="post" action="$phpfilename">
<input type="hidden" value="$userid" name="userid">
<input type="hidden" value="submit" name="action">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="3">
                $formtitle
        </td>
</tr>


<!-- Sale or Trade Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion1</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer1" value="$radiochoice1a"> <b>$radiochoice1a</b> <INPUT TYPE="radio" NAME="radioanswer1" value="$radiochoice1b"> <b>$radiochoice1b</b> </td>
</tr>
<!-- Sale or Trade End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->


<!-- Member #1 Start -->
<tr>
        <td class="alt2" colspan="3">

        <b><font color="#ff0000">What will $bbuserinfo[username] get?</font></b><br>


<textarea rows="5" cols="70" name="longanswer1"></textarea>
</td>
</tr>
<!-- Member #1 End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->


<!-- Member #2 Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">Username of your trade/sale partner? (must be exact - please be careful)</font></b><br>
               


<input type="text" size="30" name="normalanswer2"><br><BR>


        <b><font color="#ff0000">$longquestion2</font></b><br>


<textarea rows="5" cols="70" name="longanswer2"></textarea>
</td>
</tr>
<!-- Member #2 End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->

<!-- Insurance Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000"><b>$radioquestion2</b></font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer2" value="$radiochoice2a"> <b>$radiochoice2a</b> <INPUT TYPE="radio" NAME="radioanswer2" value="$radiochoice2b"> <b>$radiochoice2b</b> </td>
</tr>
<!-- Insurance End End-->

<!-- Del Conf. Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion3</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer3" value="$radiochoice3a"> <b>$radiochoice3a<b> <INPUT TYPE="radio" NAME="radioanswer3" value="$radiochoice3b"> <b>$radiochoice3b</b> </td>
</tr>
<!-- Del. Conf. End-->

<!-- Shipping Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion4</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4a"> <b>$radiochoice4a</b> <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4b"> <b>$radiochoice4b</b> <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4c"> <b>$radiochoice4c</b> </td>
</tr>
<!-- Shipping End-->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->

<!-- Misc Info Start -->
<tr>
<td class="alt2" colspan="3">
<b><font color="#ff0000">$longquestion3</font></b><br>       
<textarea rows="5" cols="70" name="longanswer3"></textarea>
</td>
</tr>
<!-- Misc Info End -->

<tr>
<td valign="top">
<p align="center">
<input type="submit" value="Submit" name="submit" style="font-family: Verdana; font-size: 10pt" class="button">
<input type="reset" value="Reset" name="reset" style="font-family: Verdana; font-size: 10pt" class="button">
</p></td></tr>
</table>
</td>
</tr>
</table>

</font>

</form>

<!-- / main page contents -->

Answer Template

Code:

This $radioanswer1 Is Between: $bbuserinfo[username] & $normalanswer2

Type Of Transaction: $radioanswer1

$radioquestion2: $radioanswer2

$radioquestion3: $radioanswer3

$radioquestion4: $radioanswer4

-------------------------------------------------

$bbuserinfo[username] gets:
$longanswer1

$normalanswer2 gets:
$longanswer2

-------------------------------------------------

Misc Information:
$longanswer3

The answer template has bb code because I have this directed to post to a forum.

morrow 03-17-2005 06:28 PM

Quote:

Originally Posted by ChrisBaktis
form:

Code:

<?php

/*======================================================================*\
|| #################################################################### ||
|| # FORM TO THREAD/ FORUM/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS    # ||
|| # Version 1.6 for vBulletin 3.x.x by Dr Erwin Loh                  # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Dr Erwin Loh. All Rights Reserved.          # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #################################################################### ||
\*======================================================================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

$globaltemplates = array(
    'tc_tradepostform',
    'tc_tradepostformanswers'
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

globalize($_POST, array(
'normalanswer1' => STR,
'radioanswer1' => STR,
'radioanswer2' => STR,
'radioanswer3' => STR,
'radioanswer3other' => STR,
'answer1' => STR,
'answer2' => STR,
'answer3' => STR,
'longanswer1' => STR,
'action' => STR
));

// #######################################################################
// ######################## CUSTOMIZE VARIABLES ##########################
// #######################################################################

////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($bbuserinfo['usergroupid'], array(2,5,6,9,13,15,16,17,19))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF THIS PHP FILE AND TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS!
//You can easily make more forms by just copying this file, renaming it, and modifying the variable in
//this file. You can keep the same templates for different forms. For more customization, you can
//use different templates, by renaming and modifying the templates.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of this file
$phpfilename = "tc_tradepostform.php";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

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

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

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$formoption1 = "Yes";
$formoption2 = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////

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

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid = "456";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "0";

//USERID TO PM TO
$formpmid = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO
$formemailaddress = "youremail@yourforums.com";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message
// 1 - redirect to post
// 2 - redirect to thread
// 3 - redirect to forum
// 4 - redirect to editpost to upload attachments
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "4";

$errormessage = "Thank you for submitting this form!"; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////

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

$answerall = "0";

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

$formtitle = "Personal Trade Center - Post A Trade/Sale";

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

$formpurpose = "Use This Form To Post A Trade or Sale Between RST Members";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Is This A Trade Or Sale?";

// The following choices must NOT have quotation marks
$radiochoice1a = "Trade";
$radiochoice1b = "Sale";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion2 = "Insurance On Shipping";

// The following choices must NOT have quotation marks
$radiochoice2a = "Yes";
$radiochoice2b = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion3 = "Delivery Confirmation";

// The following choices must NOT have quotation marks
$radiochoice3a = "Yes";
$radiochoice3b = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 4 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion4 = "Who Is Sending First";

// The following choices must NOT have quotation marks
$radiochoice4a = "Me";
$radiochoice4b = "Trade Partner";
$radiochoice4c = "Same Time";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "Trade/Sale Member Name #1";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion1 = "Please Post What Member #1 Will RECEIVE";

////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion2 = "Trade/Sale Member Name #2";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion2 = "Please Post What Your Trade/Sale Partner WILL RECEIVE";

////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion3 = "Include Any Other Info Here";

////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// start navbar
$navbits = array(
    "$phpfilename?$session[sessionurl]" => $formtitle
);

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

if ($action=="submit") {

if ($answerall == "1") {
    if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' 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();
    }
}

    eval('$formsend = "' . fetch_template('tc_tradepostformanswers') . '";');

    if ($formforum == "1") {
                    $DB_site->query("
                                INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount,
                                postusername, postuserid, lastposter, dateline, iconid, visible, attach)
                                VALUES
                                        ('".addslashes(htmlspecialchars($bbuserinfo[username]))." / $normalanswer2', " . TIMENOW . ", $formforumid,
                                        1, 0, '" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid],
                                        '" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", 0, 1,
                                        0)
                        ");
                $thread['threadid'] = $DB_site->insert_id();
                $DB_site->query("
                        INSERT INTO " . TABLE_PREFIX . "post
                                (threadid, title, username, userid, dateline, pagetext, allowsmilie,
                                showsignature, iconid, visible)
                        VALUES
                                ($thread[threadid], '".addslashes(htmlspecialchars($bbuserinfo[username]))." / $normalanswer2',
                                '" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid], " . TIMENOW . ",
                                '" . addslashes($formsend) . "', 1, 1,
                                0, 1)
                ");
                $post['postid'] = $DB_site->insert_id();
                $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "thread
                                SET firstpostid = $post[postid]
                                WHERE threadid = $thread[threadid]
                        ");
                $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                threadcount = threadcount + 1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '" . addslashes($bbuserinfo['username']) . "',
                                lastthread = '".addslashes(htmlspecialchars($bbuserinfo[username]))." /$normalanswer2',
                                lastthreadid = $thread[threadid]
                                WHERE forumid = $formforumid
                        ");
$forum[forumid] = $formforumid;
    }

    if ($formpoll == "1") {
              $DB_site->query("INSERT INTO " . TABLE_PREFIX . "poll (question,dateline,options,votes,active,numberoptions,timeout,multiple,public) VALUES ('".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle'," . TIMENOW . ",'$formoption1|||$formoption2','" . addslashes("0|||0") . "',1,2,0,0,0)");
            $pollid = $DB_site->insert_id();
            $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET pollid = '".$pollid."' WHERE threadid = '".$thread[threadid]."'");
}

    if ($formreply == "1") {
      $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
      $DB_site->query("UPDATE thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid");
                      $DB_site->query("
                                UPDATE " . TABLE_PREFIX . "forum
                                SET replycount = replycount +  1,
                                lastpost = " . TIMENOW . ",
                                lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
                                lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
                                lastthreadid = $formreplythreadid
                                WHERE forumid = $formreplyforumid
                        ");
$forum[forumid] = $formreplyforumid;
    }

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");
    }

    if ($formemail == "1") {
    vbmail($formemailaddress, $formtitle, $formsend);
    }

if ($redirectoption == "1") {
            $url = "showthread.php?$session[sessionurl]p=$post[postid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "2") {
            $url = "showthread.php?$session[sessionurl]t=$thread[threadid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "3") {
            $url = "forumdisplay.php?$session[sessionurl]f=$forum[forumid]";
        eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
if ($redirectoption == "4") {
            $url = "editpost.php?do=editpost&$session[sessionurl]p=$post[postid]";
            eval(print_standard_redirect('redirect_postthanks'));
  exit();
}
  eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
  exit();
}
eval('print_output("' . fetch_template('tc_tradepostform') . '");');
?>

Form Template (I left out my custom skin template info)

Code:

<!-- main page contents -->

<form enctype="multipart/form-data" method="post" action="$phpfilename">
<input type="hidden" value="$userid" name="userid">
<input type="hidden" value="submit" name="action">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="3">
                $formtitle
        </td>
</tr>


<!-- Sale or Trade Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion1</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer1" value="$radiochoice1a"> <b>$radiochoice1a</b> <INPUT TYPE="radio" NAME="radioanswer1" value="$radiochoice1b"> <b>$radiochoice1b</b> </td>
</tr>
<!-- Sale or Trade End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->


<!-- Member #1 Start -->
<tr>
        <td class="alt2" colspan="3">

        <b><font color="#ff0000">What will $bbuserinfo[username] get?</font></b><br>


<textarea rows="5" cols="70" name="longanswer1"></textarea>
</td>
</tr>
<!-- Member #1 End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->


<!-- Member #2 Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">Username of your trade/sale partner? (must be exact - please be careful)</font></b><br>
               


<input type="text" size="30" name="normalanswer2"><br><BR>


        <b><font color="#ff0000">$longquestion2</font></b><br>


<textarea rows="5" cols="70" name="longanswer2"></textarea>
</td>
</tr>
<!-- Member #2 End -->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->

<!-- Insurance Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000"><b>$radioquestion2</b></font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer2" value="$radiochoice2a"> <b>$radiochoice2a</b> <INPUT TYPE="radio" NAME="radioanswer2" value="$radiochoice2b"> <b>$radiochoice2b</b> </td>
</tr>
<!-- Insurance End End-->

<!-- Del Conf. Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion3</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer3" value="$radiochoice3a"> <b>$radiochoice3a<b> <INPUT TYPE="radio" NAME="radioanswer3" value="$radiochoice3b"> <b>$radiochoice3b</b> </td>
</tr>
<!-- Del. Conf. End-->

<!-- Shipping Start -->
<tr>
        <td class="alt2" colspan="3"> <b><font color="#ff0000">$radioquestion4</font></b><br>
        <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4a"> <b>$radiochoice4a</b> <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4b"> <b>$radiochoice4b</b> <INPUT TYPE="radio" NAME="radioanswer4" value="$radiochoice4c"> <b>$radiochoice4c</b> </td>
</tr>
<!-- Shipping End-->

<!-- Blank Line -->
<tr>
<td class="alt1" valign="middle" height="25"></td>
</tr>
<!-- Blank Line End-->

<!-- Misc Info Start -->
<tr>
<td class="alt2" colspan="3">
<b><font color="#ff0000">$longquestion3</font></b><br>       
<textarea rows="5" cols="70" name="longanswer3"></textarea>
</td>
</tr>
<!-- Misc Info End -->

<tr>
<td valign="top">
<p align="center">
<input type="submit" value="Submit" name="submit" style="font-family: Verdana; font-size: 10pt" class="button">
<input type="reset" value="Reset" name="reset" style="font-family: Verdana; font-size: 10pt" class="button">
</p></td></tr>
</table>
</td>
</tr>
</table>

</font>

</form>

<!-- / main page contents -->

Answer Template

Code:

This $radioanswer1 Is Between: $bbuserinfo[username] & $normalanswer2

Type Of Transaction: $radioanswer1

$radioquestion2: $radioanswer2

$radioquestion3: $radioanswer3

$radioquestion4: $radioanswer4

-------------------------------------------------

$bbuserinfo[username] gets:
$longanswer1

$normalanswer2 gets:
$longanswer2

-------------------------------------------------

Misc Information:
$longanswer3

The answer template has bb code because I have this directed to post to a forum.

Chris,

Thank you so much for your time and effort. I really appreciate this. I'm going to give this a shot later tonight.

ChrisBaktis 03-18-2005 12:18 PM

your welcome

kisersose 03-20-2005 06:06 PM

Parse error: parse error, unexpected T_STRING in /home/****/public_html/forum/form.php on line 137

i keep getting this or another line.............. AND I DID EVERYTHING CORRECT PLEASE HELp!!!1

org 03-29-2005 09:32 PM

This is exactly the reason I needed to take the leap into converting an existing website (+12000 companies and +3000 active members) into vBulletin. Again thank you Erwin!

agiacosa 03-30-2005 11:56 AM

Quote:

Originally Posted by org
This is exactly the reason I needed to take the leap into converting an existing website (+12000 companies and +3000 active members) into vBulletin. Again thank you Erwin!

I am trying to use the redirect to edit post feature. I need the user tobe able to attach and excel spreadsheet when they respond and that is added as a post to an existing thread.

When I hit submit, I get an error: No Post Specified.

What is going wrong?

Erwin 03-31-2005 01:13 AM

Quote:

Originally Posted by agiacosa
I am trying to use the redirect to edit post feature. I need the user tobe able to attach and excel spreadsheet when they respond and that is added as a post to an existing thread.

When I hit submit, I get an error: No Post Specified.

What is going wrong?

Not sure, as it obviously works for other people.... mmm... the postid is not being passed for some reason...

agiacosa 03-31-2005 01:16 PM

Quote:

Originally Posted by Erwin
Not sure, as it obviously works for other people.... mmm... the postid is not being passed for some reason...

I have Dani's mod-rewrite hack. Could that be causing the problem?

Erwin 04-01-2005 11:05 AM

Quote:

Originally Posted by agiacosa
I have Dani's mod-rewrite hack. Could that be causing the problem?

That's it.

agiacosa 04-01-2005 02:54 PM

Quote:

Originally Posted by Erwin
That's it.

Great! I was afraid of that. :-(

wynode 04-03-2005 07:07 AM

*clicks install*

I was actually looking for a very simple form tool for something else.......and came across this.

Now I ran into some other problem on my forum and this is going to help resovle that problem.

Great work!

gldtn 04-11-2005 03:27 PM

Erwin,

I installed this hack and it works fine, but there is a couple of things I would like to do that I don't quite know how. So I was wondering if you or anyone here could share a bit of your knowledge w/ me.

First; I wanted to be able to let me users to set thier own title to the thread.
Second; I want the form to be executed only when someone click on newthread on a certain forum.

I have a basic idea on how this could be done, but yet don't know how, and for the second option I know I would probably have to edit my showthread template and add an if statement along with some php file editing, but that won't be a problem if someone can provide me the code.

Thanks a Lot!

Erwin 04-13-2005 10:10 PM

Quote:

Originally Posted by gldtn
Erwin,

I installed this hack and it works fine, but there is a couple of things I would like to do that I don't quite know how. So I was wondering if you or anyone here could share a bit of your knowledge w/ me.

First; I wanted to be able to let me users to set thier own title to the thread.
Second; I want the form to be executed only when someone click on newthread on a certain forum.

I have a basic idea on how this could be done, but yet don't know how, and for the second option I know I would probably have to edit my showthread template and add an if statement along with some php file editing, but that won't be a problem if someone can provide me the code.

Thanks a Lot!

1. You need to edit the PHP file and replace the title variable with a form variable. Not hard to figure out if you take a look at the code itself.

2. That's just a template edit. Somewhere in this thread someone posted a way to do this already.

datainternet 04-17-2005 05:41 PM

Hi Erwin,

1. In the form.php - file there is an option called "REDIRECT OPTIONS:". There you can choose Option 0 to show a thank you message.

Now my question: Is it possibly to show this message AND redirect after some seconds to another page?

I need this for this hack by mtha: https://vborg.vbsupport.ru/showpost....&postcount=131

Would be nice if you could help me :).

MFG datainternet

Erwin 04-19-2005 11:14 AM

Quote:

Originally Posted by datainternet
Hi Erwin,

1. In the form.php - file there is an option called "REDIRECT OPTIONS:". There you can choose Option 0 to show a thank you message.

Now my question: Is it possibly to show this message AND redirect after some seconds to another page?

I need this for this hack by mtha: https://vborg.vbsupport.ru/showpost....&postcount=131

Would be nice if you could help me :).

MFG datainternet

Anything is possible. :) You just add a redirect javascript to the template for the redirect I think.


All times are GMT. The time now is 08:12 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.02256 seconds
  • Memory Usage 2,103KB
  • 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
  • (9)bbcode_code_printable
  • (18)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