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)

optrex 12-13-2006 01:17 PM

Nice hack Abe1,

I have a couple of questions before I install.

1) Is there a need/requirement for flood control
2) Is there a need/requirement for image verification

Just wondering if these would be measures to put in to prevent "spamming" ?

blacklancer 12-14-2006 09:57 PM

I'm having problems with this hack...

I have the need for 2 forms. I made the easier one of the 2 first and tested it and it works fine. When I do the 2nd one, it gives me the following error when I try to submit the form.

Quote:

Fatal error: Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in \includes\class_dm.php on line 763
any advice on what to do??

blacklancer 12-15-2006 05:31 PM

anyone? http://www.sclc.net/forum/images/smilies/lol.gif

laittnet 12-18-2006 02:31 AM

I wanna write the form variables to the database, but it turn in to trouble if one field contains quote mark, for example " or '

PHP Code:

        //$db->query_write(" 
        //    INSERT IGNORE INTO agent_register(userid, fullname, email, phone_mobile, phone_fixed, address, city, country, agent_type, ic_owner, ic_pc, sell_already, sell_cards, cards_month, pay_direct, pay_atm, pay_transfer, pay_post, pay_mb, pay_other, otherinfo, date_submit) 
        //    VALUES 
        //    ({$vbulletin->userinfo['userid']}, {$vbulletin->GPC['answer1']},  {$vbulletin->GPC['answer2']}, {$vbulletin->GPC['answer3']}, {$vbulletin->GPC['answer4']}, {$vbulletin->GPC['answer5']}, {$vbulletin->GPC['answer6']}, {$vbulletin->GPC['answer7']}, {$vbulletin->GPC['radioanswer3']}, {$vbulletin->GPC['radioanswer4']}, {$vbulletin->GPC['radioanswer4other']}, {$vbulletin->GPC['radioanswer5']}, {$vbulletin->GPC['radioanswer5other']}, {$vbulletin->GPC['dropdownanswer1']}, {$vbulletin->GPC['checkboxanswer1_1']}, {$vbulletin->GPC['checkboxanswer1_2']}, {$vbulletin->GPC['checkboxanswer1_3']}, {$vbulletin->GPC['checkboxanswer1_4']}, {$vbulletin->GPC['checkboxanswer1_5']}, {$vbulletin->GPC['checkboxanswer1_6']}, $vbtextanswer, ". TIMENOW . ") 
        //"); 

How can I handle this problem?

DarkDraco07 12-18-2006 06:01 PM

can anyone help with my problem? i want only members that are logged in to be able to use the form =/

civil78 12-18-2006 08:32 PM

Quote:

Originally Posted by DarkDraco07 (Post 1141100)
can anyone help with my problem? i want only members that are logged in to be able to use the form =/

Search in form hack php code, this phrase

PHP Code:

//USERGROUPS ALLOWED 

It's in the start of php.

After that find this if check

PHP Code:

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

Remove the // and in the array(2,5,6,7) set the id numbers of the user groups that you want to allow.

DarkDraco07 12-22-2006 02:55 PM

wow... how did i not see that...
thx

gullystation 12-22-2006 05:58 PM

where is this : /newthread.php?do=form ? Where do i put it, can anyone help me?

civil78 12-22-2006 06:49 PM

Quote:

Originally Posted by gullystation (Post 1143579)
where is this : /newthread.php?do=form ? Where do i put it, can anyone help me?

Go to Plugins & Products --> Plugin Manager and edit under the the Product : Form Hack the Form Hack plugin (you can add more forms if you go down in the [Add New Plugin], see the example of Form Hack and clone it) and in the inside the php code find this

PHP Code:

$formname "form"

The varieble formname is the name of your form. To call your form from your site just write "http://www.yoursitename.com/newthread.php?do= + $formname". like http://www.yoursitename.com/newthread.php?do=form

As you see you can add multiple forms just change the name in the $formname varieble in every new plugin.

Also if you want to make new forms you have to change or add a new template in Styles & Templates, the templates with names in this variebles.

PHP Code:

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

$maintemplate is the varieble that contains the name of the template as it show if you call the newthread.php?do=form url, and the $answertemplate contains the name of the template of the post.

I hope that you are undestand that.

elricstorm 12-26-2006 07:39 PM

I'm starting to become very proficient with this plugin and I've created 5 separate "advanced" forms, but now I'd like to take it to a new level.

I want to move the form from posting a message in a thread to posting a calendar event. How difficult would this be?

For instance, the normal forms point to newthread_start and I'm guessing I would change this to calendar_start. So my questions are thus:

1. What form elements would I use to handle date parameters that are already in the existing calendars?
2. Would the form elements have to be separate to account for single day, multi-day, and recurring events?
3. If you look at a "recurring calendar event" I would want to start the form so that it looks exactly like this, with the exception of the editor box which the rest of the form would replace so that I could choose the type of questions/answers I would use here.

I know this might sound difficult, but I feel that if I'm pointed in the right direction, I'm positive I could figure it out. I'm good at hacking/editing existing code due to having a photographic memory.

Thanks in advance.

John Diver 12-28-2006 09:16 AM

Can this be included in a custom page? I would like to include multiple forms in one page - www.DeuceAce.com/advertise.php

Thanks,
John

EDIT: I have it installed on a separate page but when it gets submitted I get the error:

No Thread specified. If you followed a valid link, please notify the administrator

Mr Pink 12-28-2006 11:07 AM

This is what I'm searching for my GDR! Thanks, Abe1. Installed, and nominated as MOTM.

cooldude714 12-28-2006 01:44 PM

I imported the product... what now?

So complicated!

Shazz 12-28-2006 04:01 PM

Quote:

Originally Posted by cooldude714 (Post 1146354)
I imported the product... what now?

So complicated!

Did you read the installation file

soul__stealer 12-29-2006 03:17 PM

Just like to say thanks and this is a great addon for vBulletin.

For people starting out with modifying their vBulletin configs, it does seem a little complicated at first. After a few attempts, re-reads of this thread and a bit of trial and error, I've come up with exactly what I wanted and it works like a charm.

Clicked Installed

Mr Pink 12-29-2006 03:21 PM

I haven't understand where can I customize it! :(

ccmoon 12-29-2006 04:32 PM

this is great Add-on. But I would like to use it as a music module for song writer. Please look at this link first
http://www.trinhnu.net/h/hoason/?act...w&musicId=1533

Is there a way to upload mp3 file, and song sheet JPG or GIF file?
After uploading completed, it will display like the link above.

can this be done??
Or anyone know whether we have a music module for vB or not??
thanks

blind-eddie 12-30-2006 12:36 AM

To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely



I do have one question on editing, look at Screen Shot and please tell me how to get rid of the 5 dots....Please & Thank You,

http://img138.imageshack.us/img138/2410/formcf9.th.gif

John Diver 12-30-2006 08:14 AM

Quote:

Originally Posted by John Diver (Post 1146258)
Can this be included in a custom page? I would like to include multiple forms in one page - www.DeuceAce.com/advertise.php

Thanks,
John

EDIT: I have it installed on a separate page but when it gets submitted I get the error:

No Thread specified. If you followed a valid link, please notify the administrator

Anyone know?

Thanks :)

blind-eddie 12-30-2006 12:41 PM

Did you go to admincp/Plugins & Products/Plugin Manager and edit the second
form hack?

//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 = "Whatever id you want";

Mr Pink 12-30-2006 04:13 PM

Quote:

Originally Posted by blind-eddie (Post 1147281)
To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely

Thanks.

civil78 12-30-2006 05:08 PM

Quote:

Originally Posted by blind-eddie (Post 1147281)
To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely

I do have one question on editing, look at Screen Shot and please tell me how to get rid of the 5 dots....Please & Thank You,

First of all you use this for the radio button.

HTML Code:

<td><input type="radio" name="radioanswer1" value="" checked="checked" />  </td>
<td><input type="radio" name="radioanswer1" value="" checked="checked" />  </td>

This is wrong because you don't parse any value with
HTML Code:

value=""
Second you don?t put a string between
HTML Code:

/>  </td>
this is required to know the user what it means the check and to parse a value on $RadioAnswer if this opton is checked.
Third you can't set as checked both radio buttons with this
HTML Code:

checked="checked"
The correct format is this

HTML Code:

<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceA" <if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if> /> $RadioChoiceA
<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceB" <if condition="$RadioChoiceB == $RadioAnswer">checked="checked"</if> /> $RadioChoiceB

RadioAnswer1 -> The name i must be the same in every group of radio buttons.

$RadioChoiceA,$RadioChoiceB -> These variables must set it in the PHP code of your form with this to show it on the user.

PHP Code:

$RadioChoiceA "Message of option 1";
$RadioChoiceB "Message of option 2"

$RadioAnswer -> In PHP again this variable keeps the choice of the user (in this string keeps the values of options $RadioChoiceA or $RadioChoiceB)

PHP Code:

'Part 1'
RadioAnswer' => TYPE_STR,
'
Part 2
$RadioAnswer 
$vbulletin->GPC['RadioAnswer']; 

Final if you see we use this if condition

PHP Code:

<if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if> 

This is because if you make Reset or Preview the user wants to keep the choice.

I hope that it helps.

blind-eddie 12-30-2006 08:31 PM

Thank You Very Much...

Spinball 12-30-2006 09:50 PM

Hello,
trying after a long while to reinstate this functionality.
I'm using it in conjunction with your 'edit new thread button' hack to open a classified adverts form for several specific (classifieds) forums.
So I need to have an &f=n in the link to the form.
E.g. And you have a comment in your plugin which says
Quote:

//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.
So I did this:
PHP Code:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'ad_type' => TYPE_STR,
'ad_title' => TYPE_STR,
'ad_location' => TYPE_STR,
'ad_agree' => TYPE_STR,
'f' => TYPE_STR
));

// Part 2
$ad_type $vbulletin->GPC['ad_type'];
$ad_title $vbulletin->GPC['ad_title'];
$ad_location $vbulletin->GPC['ad_location'];
$ad_agree $vbulletin->GPC['ad_agree'];
$f $vbulletin->GPC['f']; 

and I put this in, 'just in case'
PHP Code:

//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.
if (!$f) {$f=62;}  // default forum is av kit for sale
$formforumid $f

But the value of f isn't being assigned to the parameter variable. It's always 62
What additional stuff do I need, please?
And do I need to create a hidden input in the form value of $f to pass it on?

zeropaid 01-03-2007 03:26 AM

I am looking for a developer to help me with creating a few simple forms that I don't have time to deal with.

If you are interested, please PM me.

Thanks

Luky 01-03-2007 02:14 PM

Awesome Idea!

hal05 01-05-2007 10:17 PM

Looking for the same thing, everything else looks good.:surprised:

Quote:

Originally Posted by DarkDraco07 (Post 1126927)
how can i make it possible to use $post[fieldx] variable as my $posttitle? i would really like this to work. thx


Spinball 01-06-2007 09:55 PM

Can anyone help with my request above?
Thanks

civil78 01-13-2007 02:17 PM

I can make a form that it creates a poll in the message, but I am trying to find the way to make it to vote in an existing poll in a thread. Any idea?

criscokid 01-13-2007 04:24 PM

Suggestion for future version: The ability for the contents of the form to be posted as an event in the calendar.

Abe1 01-14-2007 01:42 AM

Quote:

Originally Posted by criscokid (Post 1158156)
Suggestion for future version: The ability for the contents of the form to be posted as an event in the calendar.

Nice Idea. Putting on my list.

basilrath 01-14-2007 06:24 PM

any idea why i cant make question 4 appear on the form ?

and how to add questions etc ive tried to add number 4 but not showing although ive entered in the variables

// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'.
// After, change the form name. You can't have 2 forms with the same name.

// Name of this form
$formname = "improvement";

if ($_REQUEST['do'] == $formname)
{

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//VARIABLES
//Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two.
////////////////////////////////////////////////////////////////////////////////////////////////////

// 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,
'answer4' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR,
'longanswer1' => 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'];
$answer4 = $vbulletin->GPC['answer4'];
$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'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE
////////////////////////////////////////////////////////////////////////////////////////////////////

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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
//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 = "76";

//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 = "1559";

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

//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 = "admin@thebigfatsofa.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 = "0";

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



////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message (thread, reply, pm, or email)
// 1 - redirect to post (thread or reply)
// 2 - redirect to thread (thread only)
// 3 - redirect to forum (thread only)
// 4 - redirect to editpost (thread or reply)
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
//If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it.
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall = "0";

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

$formtitle = "TBFS Improvement Survey Form";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$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 recieve feedback from members in the community, please answer honestly to give us a true picture of what is good / bad or indeed both.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "How did you find the TBFS community";

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

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

$radioquestion1 = "Would you recommend a friend to join TBFS";

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

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

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

$radioquestion2 = "Which of the options below descibes TBFS best";

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

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

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

$radioquestion3 = "Is there anyway you can think of we could improve the site, if yes elaborate for us.";

// 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 first name?";
$explain1 = "Please enter your first 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 = "Are you a member of another site like TBFS if so help us by giving the URL?";
$explain3 = "Please enter your URL of the other forum / site here.";


//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "Is there anything in particular you DISLIKE about the site?";
$explain4 = "Please give a little detail.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "How many times do you log in on average weekly.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "5";
$checkboxchoice1_2 = "20";
$checkboxchoice1_3 = "100+";

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

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

$longquestion1 = "Please write down a paragraph about how you could improve the site in any shape or form.";
$longexplain1 = "For example, what makes this forum different from all other forums and how is it worse or better, please be honest as this helps us improve TBFS.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$vbtextquestion = "Anything you would like to add further please feel free.";
$vbtextexplain = "For example things you feel are important to the success of TBFS, your honesty is appreciated as it helps us improve";

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

Spinball 01-14-2007 06:36 PM

Abe1, any chance you could help me with the above question, please?

Abe1 01-15-2007 03:16 AM

Quote:

Originally Posted by basilrath (Post 1159149)
any idea why i cant make question 4 appear on the form ?

and how to add questions etc ive tried to add number 4 but not showing although ive entered in the variables

// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'.
// After, change the form name. You can't have 2 forms with the same name.

// Name of this form
$formname = "improvement";

if ($_REQUEST['do'] == $formname)
{

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//VARIABLES
//Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two.
////////////////////////////////////////////////////////////////////////////////////////////////////

// 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,
'answer4' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR,
'longanswer1' => 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'];
$answer4 = $vbulletin->GPC['answer4'];
$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'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE
////////////////////////////////////////////////////////////////////////////////////////////////////

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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
//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 = "76";

//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 = "1559";

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

//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 = "admin@thebigfatsofa.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 = "0";

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



////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message (thread, reply, pm, or email)
// 1 - redirect to post (thread or reply)
// 2 - redirect to thread (thread only)
// 3 - redirect to forum (thread only)
// 4 - redirect to editpost (thread or reply)
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
//If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it.
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall = "0";

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

$formtitle = "TBFS Improvement Survey Form";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$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 recieve feedback from members in the community, please answer honestly to give us a true picture of what is good / bad or indeed both.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "How did you find the TBFS community";

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

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

$radioquestion1 = "Would you recommend a friend to join TBFS";

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

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

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

$radioquestion2 = "Which of the options below descibes TBFS best";

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

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

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

$radioquestion3 = "Is there anyway you can think of we could improve the site, if yes elaborate for us.";

// 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 first name?";
$explain1 = "Please enter your first 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 = "Are you a member of another site like TBFS if so help us by giving the URL?";
$explain3 = "Please enter your URL of the other forum / site here.";


//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "Is there anything in particular you DISLIKE about the site?";
$explain4 = "Please give a little detail.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "How many times do you log in on average weekly.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "5";
$checkboxchoice1_2 = "20";
$checkboxchoice1_3 = "100+";

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

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

$longquestion1 = "Please write down a paragraph about how you could improve the site in any shape or form.";
$longexplain1 = "For example, what makes this forum different from all other forums and how is it worse or better, please be honest as this helps us improve TBFS.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$vbtextquestion = "Anything you would like to add further please feel free.";
$vbtextexplain = "For example things you feel are important to the success of TBFS, your honesty is appreciated as it helps us improve";

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

Add it to the template also.

Abe1 01-15-2007 03:18 AM

Quote:

Originally Posted by Spinball (Post 1159158)
Abe1, any chance you could help me with the above question, please?

You need to add in the template a 'hidden' field so the f gets moved from the original page to the submit page.

SEYTAN_NL 01-15-2007 09:10 PM

having problem with caracter encoding ş ı show up as Þ ý
can somone help please ?

joh 01-15-2007 10:58 PM

ok i just added this to my site.
I can find where to fill out the form http://nsraweb.com/newthread.php?do=form
once it is filled out, it goes to Moderation at http://nsraweb.com/modcp/moderate.php?do=posts

now once i Validate I get this
PHP Code:

Fatal errorExisting data passed is not an array
Called set_existing in /home/joh77/nsraweb.com/html/includes/functions_databuild.php on line 164
Called build_forum_counters in 
/home/joh77/nsraweb.com/html/modcp/moderate.php on line 674
in 
/includes/class_dm.php on line 235 

where did I go wrong?
why is it going to Moderation?

I am not a coder so I have no clue what is going on.

Kinneas 01-17-2007 11:15 AM

Nice hack, got a quick question though.

I'm currently using the 3.5 version of this and it took me ages to set up all my current forms. Is there an easy way to upgrade to this version without trashing all my current forms and having to start again?

If not I'll just have to stick with the old version :(

Abe1 01-17-2007 11:46 AM

Compare the 2 version.

PinkDaisy 01-18-2007 02:21 PM

Okay, I have modified the questions and all to suit my needs for it working as a Community Leader Application, and once it's submitted, it goes to Admin forum for us to vote on and discuss. The only thing I can't get to work is all the questions from the application/form itself, showing up in the thread it starts in the Admin forum. What am I doing wrong ??

Thanks in advance!!


All times are GMT. The time now is 05:06 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.02074 seconds
  • Memory Usage 2,016KB
  • 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
  • (5)bbcode_html_printable
  • (11)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete