vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

Deepdog009 08-05-2007 12:23 AM

Quote:

Originally Posted by SuthernKumfort (Post 1301890)
If someone else could take a look at this screeen shot and not be so vague, I would greatly appreciate it. I have searched high and low to find where to edit the boxes so they wouldnt be black. Can anyone help please?



SuthernKumfort,

I extracted the code thats causing the black bkgd issue that U want 2 correct...
Look 4 this {{{ <td class="alt1" colspan="3"> }}} code and edit class options in Radioquestions 1,2 and 3...

HTML Code:

<tr>
<td class="alt1" colspan="3">
<b>$radioquestion1</b>
</td>
</tr><tr>
<td><input type="radio" name="radioanswer1" value="$radiochoice1a" <if

condition="$radiochoice1a == $radioanswer1">
checked="checked"</if> />

$radiochoice1a </td>
<td><input type="radio" name="radioanswer1" value="$radiochoice1b" <if

condition="$radiochoice1b == $radioanswer1">
checked="checked"</if> />

$radiochoice1b </td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="alt2" colspan="3">
<b>$radioquestion2</b>
</td></tr><tr>
<td><input type="radio" name="radioanswer2" value="$radiochoice2a" <if

condition="$radiochoice2a == $radioanswer2">
checked="checked"</if> />

$radiochoice2a </td>
<td><input type="radio" name="radioanswer2" value="$radiochoice2b" <if

condition="$radiochoice2b == $radioanswer2">
checked="checked"</if> />

$radiochoice2b </td>
<td><input type="radio" name="radioanswer2" value="$radiochoice2c" <if

condition="$radiochoice2c == $radioanswer2">
checked="checked"</if> />

$radiochoice2c </td>
</tr>
<tr>
<td class="alt1" colspan="3">
<b>$radioquestion3</b>
</td>
</tr><tr>
<td><input type="radio" name="radioanswer3" value="$radiochoice3a" <if

condition="$radiochoice3a == $radioanswer3">
checked="checked"</if> />

$radiochoice3a </td>
<td><input type="radio" name="radioanswer3" value="$radiochoice3b" <if

condition="$radiochoice3b == $radioanswer3">
checked="checked"</if> />

$radiochoice3b </td>
<td>If $radiochoice3a, please explain: <input type="text"

value="$radioanswer3other" name="radioanswer3other" />
</td>
</tr>


1.) change td class 2 alter bkgd color
2.) add css style in header of template

Example code
***********
<style>
.radio button class {
background: #FFFFFF;
}
</style>

above is added 2 header area of template

***********

<td class="alt1" colspan="3"> before changes

<td class="radio button class" colspan="3"> after changes


edit all three radioquestion td classes in radioquestions 1,2 and 3...

I hope this gets U over the hump;)

Tralala 08-05-2007 05:04 AM

Quote:

Originally Posted by Deepdog009 (Post 1309976)
Tralala back from out of town...

Sure U should be able 2 do all of that, by making a few modifications using conditionals...

Check some of the conditional mods here...


Do a search on conditionals here and over at vBulletin.com...

I hope that helps U ;)

Thanks...
I discovered Abe1's excellent "Force Users to Read a Thread" mod:
https://vborg.vbsupport.ru/showthread.php?t=151737

So I am hoping there's a way to "force users to fill out the form!"

shanevas2 08-05-2007 07:20 AM

Thank You Grunt For Link!
And Thanks For Fixing My File Deepdog009

Deepdog009 08-05-2007 02:28 PM

Quote:

Originally Posted by shanevas2 (Post 1310187)
Thank You Grunt For Link!
And Thanks For Fixing My File Deepdog009


Shanevas2 Im glad U got it sorted out and Alive and Kicking...

I liked your earlier post about { how the hell do i install it } Im still laughing on that one...:)

******************************************

Tralala thats great U found what U where looking 4...:up:

ABE1 has mega mods that help all...
Theres another modder that uses conditionals alot and has useful hacks... check Logician mods...

Tralala 08-05-2007 04:08 PM

Quote:

Originally Posted by Deepdog009 (Post 1310406)
Tralala thats great U found what U where looking 4...:up:

ABE1 has mega mods that help all...
Theres another modder that uses conditionals alot and has useful hacks... check Logician mods...

Yes, cool, thanks. Since Abe1 wrote both I am hoping he can provide clues to integrate them. All else fails I suppose I can just "force users to read the thread" that tells them about the form.

I will search on Logician now, too. Thanks again!

SuthernKumfort 08-07-2007 04:49 AM

Quote:

Originally Posted by Deepdog009 (Post 1309976)
Tralala back from out of town...

Sure U should be able 2 do all of that, by making a few modifications using conditionals...

Check some of the conditional mods here...


Do a search on conditionals here and over at vBulletin.com...

I hope that helps U ;)



*********************************************

SuthernKumfort Im working on your form and I have a Q???... bkgd color?


*********************************************

shanevas2 im still not sure what you're asking 4, but maybe its this...>>>

http://www.yoursite/forum/newthread.php?do=name of your form here ??? :erm:

White background, black letters!

Deepdog009 08-07-2007 02:38 PM

Quote:

Originally Posted by SuthernKumfort (Post 1311655)
White background, black letters!


Look @ this POST

SuthernKumfort 08-08-2007 05:41 AM

Quote:

Originally Posted by Deepdog009 (Post 1311923)
Look @ this POST

I am totally confused. I mean TOTALLY. I got it all messed up now and most of my form is even missing!

Deepdog009 08-08-2007 12:02 PM

Quote:

Originally Posted by SuthernKumfort (Post 1312443)
I am totally confused. I mean TOTALLY. I got it all messed up now and most of my form is even missing!


SuthernKumfort I think its best that U go back 2 your post that has your form code, copy and paste it back 2 your main form template, next if U look closely at my post about editing your form 2 change background colors in only Radioquestions 1,2 and 3, it only shows edit the CLASS of those three RADIO buttons listed...

The only area of that template that U will edit is here...>>>
**********************************************
Edit only Radioquestions 1,2 and 3

<td class="alt1" colspan="3"> before changes

<td class="radio button class" colspan="3"> after changes


That should fix all yo troubles...

Tralala 08-08-2007 02:34 PM

The Form Hack seems to be working okay on my forum. I set up a job request sheet (for volunteer hours) and everyone seems to be liking it. The form results are posted into a thread.

One issue I note is that the "last post" for this thread, on FORUMHOME doesn't seem to accurately update and reflect what the last post actually is. I've had 25 responses so far and the "last post" is displaying the 22nd one.

SuthernKumfort 08-08-2007 03:40 PM

Quote:

Originally Posted by Deepdog009 (Post 1312636)
SuthernKumfort I think its best that U go back 2 your post that has your form code, copy and paste it back 2 your main form template, next if U look closely at my post about editing your form 2 change background colors in only Radioquestions 1,2 and 3, it only shows edit the CLASS of those three RADIO buttons listed...

The only area of that template that U will edit is here...>>>
**********************************************
Edit only Radioquestions 1,2 and 3

<td class="alt1" colspan="3"> before changes

<td class="radio button class" colspan="3"> after changes


That should fix all yo troubles...

Its not the question that is blacked out on my form. Its the answers!

Deepdog009 08-08-2007 06:30 PM

Quote:

Originally Posted by SuthernKumfort (Post 1312809)
Its not the question that is blacked out on my form. Its the answers!



SuthernKumfort I can fix yo issue, but I will need both templates code and the plugin code in order 2 complete your request???

Upload in .txt format or post them like U did with the main template and I will help U resolve this issue...

CremeEgg 08-10-2007 09:36 AM

Just a quick question for those of you in the know, can you post the form into multiple forums at the same time?

JHC 08-11-2007 06:39 PM

When I try to add 6 checkbox questions, why will it only show 5? I've changed everything like I was supposed to, including the variables in the beginning. Is there a work around for this?

dsotmoon 08-11-2007 09:04 PM

is anyone else getting hammered with SPAM using it as a contact form? i even added in the Image Match "Forms Hack add-on" which works but it has not slowed down the SPAM, i mean about 5 per minute

any ideas

Centrix 08-12-2007 08:15 AM

Could you explain more about how to customize this? cause you say do this with hook, this hook that, blabla, hook so.... but im kinda new to this all and I dont really know... what a hook is... and how to edit it...

Deepdog009 08-12-2007 01:57 PM

Quote:

Originally Posted by Tralala (Post 1312731)
The Form Hack seems to be working okay on my forum. I set up a job request sheet (for volunteer hours) and everyone seems to be liking it. The form results are posted into a thread.

One issue I note is that the "last post" for this thread, on FORUMHOME doesn't seem to accurately update and reflect what the last post actually is. I've had 25 responses so far and the "last post" is displaying the 22nd one.


Tralala Im not sure about why thats happening, sounds like a conflict with code or another hack my be affecting it. Ask ABE1...

************************************************** ****


Quote:

Originally Posted by CremeEgg (Post 1314293)
Just a quick question for those of you in the know, can you post the form into multiple forums at the same time?

CremeEgg Im not sure about that, ask ABE1...


************************************************** ****


Quote:

Originally Posted by JHC (Post 1315341)
When I try to add 6 checkbox questions, why will it only show 5? I've changed everything like I was supposed to, including the variables in the beginning. Is there a work around for this?

JHC go over your form again and look 4 anything out of place or covert over 2 .txt format and upload your form, I will take a look C where the issue is and fix 4 ya...


************************************************** ****


Quote:

Originally Posted by dsotmoon (Post 1315446)
is anyone else getting hammered with SPAM using it as a contact form? i even added in the Image Match "Forms Hack add-on" which works but it has not slowed down the SPAM, i mean about 5 per minute

any ideas

Yes,

{1} Turn on answer all questions in form hack...

{2} I will look into adding that hack by Antialiasis {no spam } or some other no spam add-on...

{3} Change form link name and alert members of changes.

{4} check your logs in control panel and verify IP address's that are the culprits doing the damage. Block um by htaccess...

If I have more time away from my job, I will try 2 create more Add-ons 2 help with this...


************************************************** ****


Quote:

Originally Posted by Centrix (Post 1315738)
Could you explain more about how to customize this? cause you say do this with hook, this hook that, blabla, hook so.... but im kinda new to this all and I dont really know... what a hook is... and how to edit it...

Centrix the hook area is in the plugin, goto admincp and look at bottom of screen 4 plugins...
Open plugin manager and look 4 FORMS HACK, open and click large edit box...
There U will find how 2 edit your form...

Remember there are 3 parts 2 this, two templates and one plugin most be modified in order for your new forms 2 activate...


Give it a go;)

lazytown 08-13-2007 09:37 AM

Quote:

Originally Posted by dsotmoon (Post 1315446)
is anyone else getting hammered with SPAM using it as a contact form? i even added in the Image Match "Forms Hack add-on" which works but it has not slowed down the SPAM, i mean about 5 per minute

any ideas

Yes, spam bots will hammer the form when used as a contact us. I used the NoSpam! mod with directions on integrating with this. However, there is a small bug that has not yet been resolved in integrating this with the NoSpam mod.

-vissa

Deepdog009 08-13-2007 11:43 AM

Quote:

Originally Posted by vissa (Post 1316428)
Yes, spam bots will hammer the form when used as a contact us. I used the NoSpam! mod with directions on integrating with this. However, there is a small bug that has not yet been resolved in integrating this with the NoSpam mod.

-vissa


Yeap, spammers come and come and keep on coming
...:eek:

BUT, if there's a will then there's a way...;)

Verification 4 each input box with image & no spam may be the answer... What do ya think???

lazytown 08-14-2007 05:22 AM

Quote:

Originally Posted by Deepdog009 (Post 1316480)

Yeap, spammers come and come and keep on coming
...:eek:

BUT, if there's a will then there's a way...;)

Verification 4 each input box with image & no spam may be the answer... What do ya think???

The "NoSpam!" mod stopped them completely.. However, I'm not happy with what happens when they don't answer correctly -- it goes to a blank page right now as I mention in this post: https://vborg.vbsupport.ru/showthrea...66#post1313566

-vissa

zompus 08-15-2007 02:42 PM

$dropdownchoice1a = "name";
$dropdownchoice1b = "name";
$dropdownchoice1c = "name";
etc.

What happens when i reach 'z'? I plan on having over 500 options. :'(

Tralala 08-15-2007 06:57 PM

500 options in a drop down menu?

Yikes.

FW FH-K?ln 08-15-2007 11:12 PM

@zompus:
aa
ab
ac
...
ba
bb
bc
...
^^

@all:
i install this hack and i love it. but one question: i want create a "Insert into" with the variables into a seperate table to extract it to office. how do I make that?

Deepdog009 08-23-2007 04:39 AM

Quote:

Originally Posted by vissa (Post 1317047)
The "NoSpam!" mod stopped them completely.. However, I'm not happy with what happens when they don't answer correctly -- it goes to a blank page right now as I mention in this post: https://vborg.vbsupport.ru/showthrea...66#post1313566

-vissa

Vissa I looked into that and can see some solutions, but 2 busy with work at this time...

I have seen several new mods 4 spam that may help...


*****************************************

FW FH-K?ln,,,

Sorry, but not sure how 2 do that... Try Caspio 4 more on this

FCS-Webmaster 08-29-2007 05:59 PM

Well this mod is awesome!
But is there a possibility to use a "fix user - like the admin" to post every form into a thread?!

Background:
We want to use this form for a booking request.
After the form is send, a new thread should be created which
can be only viewed from our coaches

What I want is that every form will be posted in the forum through one ID.
I would be appreciated about a helping hand. tried to work this out the last
4 hours :-(

Deepdog009 08-29-2007 07:38 PM

Quote:

Originally Posted by FCS-Webmaster (Post 1328247)
Well this mod is awesome!
But is there a possibility to use a "fix user - like the admin" to post every form into a thread?!

Background:
We want to use this form for a booking request.
But before the request is for every User sightable it should be
overviewed and be discussed from Coches, a special usergroup


Sure U can customize your forms 2 do whatever ye wish...

ABE1 has the hook in plugin area so that U can make modifications 2 which forum its posted to, U can have it posted 2 staff forum first so that yo folks can judge it and then bump it 2 members or customers area...

It might take some time, but browse through most posts and U will C that its a cool MOD 2 use for many ways in manipulation of guests and soon 2 be members and regulars...

Gooden Lucken:up:


FCS-Webmaster 08-29-2007 08:13 PM

Quote:

Originally Posted by Deepdog009 (Post 1328293)
Sure U can customize your forms 2 do whatever ye wish...

ABE1 has the hook in plugin area so that U can make modifications 2 which forum its posted to, U can have it posted 2 staff forum first so that yo folks can judge it and then bump it 2 members or customers area...

It might take some time, but browse through most posts and U will C that its a cool MOD 2 use for many ways in manipulation of guests and soon 2 be members and regulars...

Gooden Lucken:up:


Hm, sorry but when I am not registered the post goes no where if the Forum is "hidden".
This is needed to stay in Background. So normal Users don`t see this part of the Forum.
We don`t wan`t to see this section either to guests/unregistered...

Did you get what I want to say?!
Sorry 4 my bad language skills

FCS-Webmaster 08-29-2007 09:18 PM

Quote:

Originally Posted by thalamus (Post 1082431)
I've set this up, and amended the file and templates to generate a Contact us function that is to be posted into a specified forum.

The form looks good, the information is great and it works wonderfully when posting into the forum... for those that have the relevant permissions...

Unfortunately, the form will be completed and submitted by unregistered members and I was wondering whether there's anything at all can be done to allow this to happen. The process is: guest or member (who generally doesn't have access to the forum into which its posted) completes a contact us form. It gets posted into the forum, and a "support" usergroup member responds or it's discussed.

Any clues as to where I should start looking for this solution?

edit: just saw this in the hack description:

Well either I'm missing something completely obvious, or it simply doesn't do this. Unless it's this image verification thing that was mentioned a few pages back that's stopping it? I have it set to avoid spammage, so is that the problem I'm facing??

edit again: OK, just found that it *is* the image verification problem that was causing it. It now posts, but as Moderated - guess I'll have to tweak the forum/usergroup permissions to get around that. Just to confirm... by setting Guest Posts needs Image Verification to yes in your vb Options DOES cause this hack not to post into forums in those situations. Oh and the color red becomes green on these forums for some inexplicable reason...

This is exactly hat I need!
Is there any solution for it?

Derek Chai 09-01-2007 10:55 PM

http://collide.elementfx.com/vbullet...hp?do=form&f52 getting the no thread or forum error didn't help what i searched but that is my code below my template isnt the problem it is this thing below. i erased some parts but once i added $longanswer1 2 and 3 to the tops the questions and the bottom where you do the ORS it wont show up,.

Code:

$formname = "form";

if ($_REQUEST['do'] == $formname)
{
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'radioanswer3other' => TYPE_STR,
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR,
'longanswer1' => TYPE_STR
'longanswer2' => TYPE_STR
'longanswer3' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$radioanswer3other = $vbulletin->GPC['radioanswer3other'];
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3'];
$longanswer1 = $vbulletin->GPC['longanswer1'];
$longanswer2 = $vbulletin->GPC['longanswer2'];
$longanswer3 = $vbulletin->GPC['longanswer3'];



// if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7))) print_no_permission();


// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";


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

//FORUM TO POST NEW THREAD IN
//You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list.
$formforumid = "2";

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$polloption[1] = "Yes";
$polloption[2] = "No";
$polloption[3] = "Maybe";

//Make poll public - 1 = yes, 0 = no
$pollpublic = "0";



//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";

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

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

//ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no
$formpm = "0";

//USERNAME TO PM TO (separate multiple usernames with a ';')
$formpmname = "Abe";

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

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

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "youremail@yourforums.com";

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

//ENABLE ATTACHMENTS - 1 = yes, 0 = no
//attachments can only be used if the form is going to make a new thread or post
$allow_attachments = "1";

$redirectoption = "0";

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

/
$answerall = "0";

$formtitle = "Generic Form";



$posttitle = "$formtitle";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose = "The purpose of this form is to allow you to submit a form, and this form will be made into a thread in a particular forum, or be PMed to a moderator or be emailed to a moderator.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "What is the meaning to life?";


$radioquestion1 = "Choose one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";


$radioquestion2 = "Choose another one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice2a = "good";
$radiochoice2b = "bad";
$radiochoice2c = "both";



$radioquestion3 = "Is it yes or no? If yes, please elaborate";

// The following choices must NOT have quotation marks
$radiochoice3a = "yes";
$radiochoice3b = "no";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your email?";
$explain2 = "Please enter your real email here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "male";
$dropdownchoice1c = "female";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";



$longquestion1 = "Please write down a paragraph about yourself.";
$longquestion2 = "Please write down a paragraph about yourself.";
$longquestion3 = "Please write down a paragraph about yourself.";
/

$vbtextquestion = "Please write down a paragraph about how you like this forum.";
$vbtextexplain = "For example, what makes this forum different from all other forums?";
if ($_REQUEST['action'] == '')
{
  $_REQUEST['action'] = "form";
}


$bbuserinfo = $vbulletin->userinfo;

// start navbar
$navbits = array();
$navbits['newthread.php?' . $vbulletin->session->vars['sessionurl'] . "do=$formname"] = $formtitle;

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

if ($_REQUEST['action'] == "submit")
{

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

        $vbulletin->input->clean_array_gpc('p', array(
                'wysiwyg'                        => TYPE_BOOL,
                'message'                        => TYPE_STR
                ));

        if ($vbulletin->GPC['wysiwyg'])
        {
                require_once(DIR . '/includes/functions_wysiwyg.php');
                $vbtextanswer = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);
        }
        else
        {
                $vbtextanswer =& $vbulletin->GPC['message'];
        }

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

        $posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);
        $poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_UINT);

        if ($_POST['submit'] == 'Submit')
        {
                if ($formforum == "1")
            {
                $foruminfo = verify_id('forum', $formforumid, 0, 1);
                $forumperms = fetch_permissions($foruminfo[forumid]);
                $newpost['username'] =& $vbulletin->userinfo['username'];
                $newpost['message'] =& $formsend;
                $newpost['title'] =& $posttitle;
                $newpost['parseurl'] = '1';
                $newpost['poststarttime'] = $poststarttime;
                        $newpost['posthash'] = $posthash;

                        if ($vbulletin->userinfo['autosubscribe'] != -1)
                        {
                                $newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
                        }
                        else
                        {
                                $newpost['emailupdate'] = 9999;
                        }

                        if ($vbulletin->userinfo['signature'] != '')
                        {
                                $newpost['signature'] = '1';
                        }
                        else
                        {
                                $newpost['signature'] = '0';
                        }

                    build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);

                if ($formpoll == "1")
                {
                    $threadinfo = verify_id('thread', $newpost[threadid], 0, 1);
                    $polloptions = count($polloption);
                    $question = $posttitle;
                    $vbulletin->GPC['options'] = $polloption;

                    $counter = 0;
                    $optioncount = 0;
                    $badoption = '';
                    while ($counter++ < $polloptions)
                    { // 0..Pollnum-1 we want, as arrays start with 0
                        if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
                        {
                            $badoption .= iif($badoption, ', ') . $counter;
                        }
                        if (!empty($vbulletin->GPC['options']["$counter"]))
                        {
                            $optioncount++;
                        }
                    }

                    // Add the poll
                    $poll =& datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);

                    $counter = 0;
                    while ($counter++ < $polloptions)
                    {
                        if ($vbulletin->GPC['options']["$counter"] != '')
                        {
                            $poll->set_option($vbulletin->GPC['options']["$counter"]);
                        }
                    }

                    $poll->set('question',        $question);
                    $poll->set('dateline',        TIMENOW);
                    $poll->set('active',        '1');
                    $poll->set('public',        $pollpublic);

                    $pollid = $poll->save();
                    //end create new poll

                    // update thread
                    $threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
                    $threadman->set_existing($threadinfo);
                    $threadman->set('pollid', $pollid);
                    $threadman->save();
                        }
            }

            if ($formreply == "1")
            {
                $threadinfo = verify_id('thread', $formreplythreadid, 0, 1);
                $forumperms = fetch_permissions($threadinfo[forumid]);
                $newpost['username'] =& $vbulletin->userinfo['username'];
                $newpost['message'] =& $formsend;
                $newpost['title'] =& $posttitle;
                $newpost['parseurl'] = "1";
                $newpost['poststarttime'] = $poststarttime;
                        $newpost['posthash'] = $posthash;
       
                        if ($vbulletin->userinfo['autosubscribe'] != -1)
                        {
                                $newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
                        }
                        else
                        {
                                $newpost['emailupdate'] = 9999;
                        }

                        if ($vbulletin->userinfo['signature'] != '')
                        {
                                $newpost['signature'] = '1';
                        }
                        else
                        {
                                $newpost['signature'] = '0';
                        }

                build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);
            }

            if ($formpm == "1")
            {
                $vbulletin->GPC['message'] =& $formsend;
                $vbulletin->GPC['title'] =& $posttitle;
                $vbulletin->GPC['recipients'] =& $formpmname;

                $pm['message'] =& $vbulletin->GPC['message'];
                $pm['title'] =& $vbulletin->GPC['title'];
                $pm['recipients'] =& $vbulletin->GPC['recipients'];

                // create the DM to do error checking and insert the new PM
                $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);

                $pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
                $pmdm->set('fromusername', $vbulletin->userinfo['username']);
                $pmdm->setr('title', $pm['title']);
                $pmdm->setr('message', $pm['message']);
                $pmdm->set_recipients($pm['recipients'], $permissions);
                $pmdm->set('dateline', TIMENOW);

                // everything's good!
                $pmdm->save();
            }

                if ($formemail == "1")
            {
                        require_once(DIR . '/includes/class_bbcode_alt.php');
                        $plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());
                        $plaintext_parser->set_parsing_language($touserinfo['languageid']);
                        $formsend = $plaintext_parser->parse($formsend);

                    $emails = explode(';', $formemailaddress);
                    foreach ($emails AS $email)
                    {
                        vbmail($email, $posttitle, $formsend);
                        }
            }

            if ($redirectoption == "1")
            {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
                eval(print_standard_redirect('redirect_postthanks'));
                exit();
            }
            if ($redirectoption == "2")
            {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]";
                eval(print_standard_redirect('redirect_postthanks'));
                exit();
            }
            if ($redirectoption == "3")
            {
                $vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]";
                eval(print_standard_redirect('redirect_postthanks'));
                exit();
            }
            if ($redirectoption == "4")
            {
                $vbulletin->url = 'editpost.php?do=editpost&' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
                eval(print_standard_redirect('redirect_postthanks'));
                exit();
            }
            eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
            exit();
        }
        else
        {
                  require_once('./includes/class_bbcode.php');
        $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
        $preview = $parser->do_parse($formsend);

                $_REQUEST['action'] = 'form';
        }
}

if ($_REQUEST['action'] == 'form')
{
        if (($formforum OR $formreply) AND $allow_attachments)
        {
                if ($formforum AND $formreply)
                {
                        $forumid = $formforumid;
                }
                else if ($formreply)
                {
                        $threadid = $formreplythreadid;
                $threadinfo = verify_id('thread', $threadid, 0, 1);
                $forumid = $threadinfo[forumid];
                }
                else
                {
                        $forumid = $formforumid;
                }

        $forumperms = fetch_permissions($forumid);

                // get attachment options
                require_once(DIR . '/includes/functions_file.php');
                $inimaxattach = fetch_max_upload_size();

                $maxattachsize = vb_number_format($inimaxattach, 1, true);
                $attachcount = 0;
                $attach_editor = array();
                $attachment_js = '';

                if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))
                {
                        if (!$posthash OR !$poststarttime)
                        {
                                $poststarttime = TIMENOW;
                                $posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
                        }
                        else
                        {
                                if (empty($postattach))
                                {
                                        $currentattaches = $db->query_read("
                                                SELECT dateline, filename, filesize, attachmentid
                                                FROM " . TABLE_PREFIX . "attachment
                                                WHERE posthash = '" . $db->escape_string($posthash) . "'
                                                        AND userid = " . $vbulletin->userinfo['userid']
                                        );

                                        while ($attach = $db->fetch_array($currentattaches))
                                        {
                                                $postattach["$attach[attachmentid]"] = $attach;
                                        }
                                }

                                if (!empty($postattach))
                                {
                                        foreach($postattach AS $attachmentid => $attach)
                                        {
                                                $attach['extension'] = strtolower(file_extension($attach['filename']));
                                                $attach['filename'] = htmlspecialchars_uni($attach['filename']);
                                                $attach['filesize'] = vb_number_format($attach['filesize'], 1, true);
                                                        $attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif";
                                                $show['attachmentlist'] = true;
                                                eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";');

                                                $attachment_js .= construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], $attach['extension']);

                                                $attach_editor["$attachmentid"] = $attach['filename'];
                                        }
                                }
                        }

                        if ($threadid)
                        {
                                $attachurl = "t=$threadid";
                        }
                        else
                        {
                                $attachurl = "f=$forumid";                       
                        }
                        $newpost_attachmentbit = prepare_newpost_attachmentbit();
                        eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');

                        if ($threadid)
                        {
                                $attach_editor['hash'] = $threadid;
                                $attach_editor['url'] = "newattachment.php?$session[sessionurl]t=$threadid&amp;poststarttime=$poststarttime&amp;posthash=$posthash";
                        }
                        else
                        {
                                $attach_editor['hash'] = $forumid;
                                $attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$forumid&amp;poststarttime=$poststarttime&amp;posthash=$posthash";               
                        }
                }
                else
                {
                        $attachmentoption = '';
                }
        }
        else
        {
                $attachmentoption = '';
        }

        // set message box width to usercp size
        $stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];
        $editorid = construct_edit_toolbar($vbtextanswer);

        eval('print_output("' . fetch_template("$maintemplate") . '");');
}
}


Deepdog009 09-02-2007 01:10 PM

Quote:

Originally Posted by FCS-Webmaster (Post 1328356)
This is exactly hat I need!
Is there any solution for it?

FCS-Webmaster what U ask 4 can be done, but it requires some coding changes...

ABE1 can help U better, I creating a few add-ons 2 this, but not much feedback so I stopped...

**************************************


Derek Chai I-C your issue, U-B missing your comma's...

Check back a few pages and U will C another post about it...

If U still have issues with it give me a jingle and I will fix 4 ya...

FCS-Webmaster 09-04-2007 01:16 AM

I found another great solution - better my beloved girlfriend is the secret genius - If you install this hack https://vborg.vbsupport.ru/showthrea...hlight=chatyou can trick it.

1. Install the Email Integration Hack,do all needed settings
2. And in this Forum hack just place the Email to send from the Email you have to place for a forum in the Integration Hack.


GREAT THING NOW!

But if there would be a update from this hack i won't cry....

FCS-Webmaster 09-04-2007 01:18 AM

Quote:

Originally Posted by Deepdog009 (Post 1330741)
FCS-Webmaster what U ask 4 can be done, but it requires some coding changes...

ABE1 can help U better, I creating a few add-ons 2 this, but not much feedback so I stopped...
[COLOR="Blue"]

Yeah I use your Image Match - GREAT ADD ON!
Prevents my board from a lot spam!

FCS-Webmaster 09-04-2007 10:52 AM

A last question.

Below the form are three buttons: Submit - Preview - Reset.
How can I translate them into another language

I tried to change the value but after this the form only shows the preview and doesn`t work anymor. Any hints?!

thnx a lot

faramir8360 09-04-2007 10:21 PM

Excuse me if I'm going to repeat a question already asked (43 pages are veryyyy long!!), but is it possible tu assign a different Formatting BBcode to every entry of the form?

For eg:

Question: What is your name? ----> Reply: Mark

On submiting the form the messagge will be displayed as, written in bbcode:

[center.][b.]Mark[./b][./center]

etc... with other entries, but anyone with its own bbcode.

In this way the user can automatically insert a new thread standandly formatted...

excuse for bad english... by!

Deepdog009 09-04-2007 10:33 PM

Quote:

Originally Posted by faramir8360 (Post 1332518)
Excuse me if I'm going to repeat a question already asked (43 pages are veryyyy long!!), but is it possible tu assign a different Formatting BBcode to every entry of the form?

For eg:

Question: What is your name? ----> Reply: Mark

On submiting the form the messagge will be displayed as, written in bbcode:

[center.][b.]Mark[./b][./center]

etc... with other entries, but anyone with its own bbcode.

In this way the user can automatically insert a new thread standandly formatted...

excuse for bad english... by!

faramir8360 yes U can...

Alter the answer template with bbcodes and its a done deal...

one of my add-ons has bbcodes added 2 answer sheet,,, it adds some bbcode pics...
;)

************************************************

FCS-Webmaster I have a update 4 that add-on,,, I will upload it by the weekend...:)

faramir8360 09-05-2007 12:05 PM

Quote:

Originally Posted by Deepdog009 (Post 1332522)
faramir8360 yes U can...

Alter the answer template with bbcodes and its a done deal...

one of my add-ons has bbcodes added 2 answer sheet,,, it adds some bbcode pics...
;)

Excuse me deepdog but.... I think.... I did not understand what I have to do to insert the bbcode in the form.... :o :confused: :confused:

Deepdog009 09-05-2007 05:20 PM

Quote:

Originally Posted by FCS-Webmaster (Post 1332044)
A last question.

Below the form are three buttons: Submit - Preview - Reset.
How can I translate them into another language

I tried to change the value but after this the form only shows the preview and doesn`t work anymor. Any hints?!

thnx a lot


Here R a few links that should help with your question...


Input images 1

Input images 2


**********************************************


Faramir8360 take a look below at the answer template,,, add bbcode 2 your answer template and save,,, next submit test form and bbcode will show up in posts...

U may need 2 change images allowed in vBull options and add new bbcodes 2 bbcode mgr...


Good luck 2 ya


HTML Code:

:forms123:
$bbuserinfo[username]:gochat123:
:Music123:

$question1
$answer1

$question2
$answer2

$question3
$answer3

$question4
$answer4

$question5
$answer5 :emailreturn123:

$radioquestion1
$radioanswer1
$radioanswer1other

$radioquestion2
$radioanswer2
$radioanswer2other

:hotstuff123:

$vbtextquestion

$vbtextanswer

:hotstuff123:


xanthide 09-09-2007 11:32 PM

if i want to use it instead of the NEW THREAD, is there a way i can get the $formforumid to determine what forum the thread is started in?

xandizitxu 09-09-2007 11:59 PM

I was looking for it !

xanthide 09-10-2007 04:23 PM

Quote:

Originally Posted by VHLinks (Post 1228110)
Hey guys, maybe I missed it, I also ran a search. Is there way to set this up so you can select a post icon, and not have it be blank when it posts the topic? I was trying to figure out a way to do it, but I kept breaking the code. Any ideas would be great. Thanks!

ye.. i would also like some way to do this..
anyone who can help?


All times are GMT. The time now is 10:52 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.02396 seconds
  • Memory Usage 2,038KB
  • 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
  • (2)bbcode_html_printable
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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