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)

DivineMessenger 03-07-2008 11:52 AM

ok i got an error:

"XML Error: not well-formed (invalid token) at Line 548"
the line is
"$dropdownanswer3_g = $vbulletin->GPC['dropdownanswer3_g'];"

Any ideas?

illithid 03-07-2008 03:37 PM

Quote:

Originally Posted by DivineMessenger (Post 1459236)
ok i got an error:

"XML Error: not well-formed (invalid token) at Line 548"
the line is
"$dropdownanswer3_g = $vbulletin->GPC['dropdownanswer3_g'];"

Any ideas?

It looks like you may be setting up your variables incorrectly. Send your xml file to me, I will take a look at it and see if I can fix it for you.

snunhuck 03-07-2008 08:47 PM

Quote:

Originally Posted by illithid (Post 1458145)
You need to edit the following templates :
  • form
  • formanswers

To do this open the product-form.xml in a text editor. Find
Code:

<template name="form" templatetype="template"
Look through the code that follows, it is the actual template that sets up the structure of the form. This is the area in which the html code will be for the drop down menu and the radio buttons.

Once you have edited that, find
Code:

<template name="formanswers" templatetype="template"
This template returns the questions and answers from the form. You will need to remove the variables in this template that correspond to the drop down menu and the radio buttons.

Now find
Code:

// Part 1
Remove the lines that correspond to the drop down menu and the radio button that you have removed from the templates. Proceed down the page a bit to
Code:

// Part 2
Again, remove the lines that correspond to the drop down menu and radio buttons.

The next part is optional, but I recommend that you do this -> continue down the page until you find where the radio button variables and drop down menu are set with values. Remove these from the file. No sense in code existing in the file if it is not being used.

Thanks :D

Skyline_GT 03-08-2008 11:06 AM

This is very confusing when adding new questions..

synisterk 03-08-2008 05:11 PM

I was fighting a simple order form on my site,

This is perfect for that....great hack.

Deep-X 03-17-2008 11:15 PM

Ok some times its the ; or the , that you deleted that you miss. So I need help with this if anybody can direct me.

Quote:

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

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,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'dropdownanswer2' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer1'];
$normalanswer3 = $vbulletin->GPC['normalanswer1'];
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$dropdownanswer2 = $vbulletin->GPC['dropdownanswer1'];
$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,9))) 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 = "recruitment";
// 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 = "4";

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

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

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

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

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

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

//USERNAME TO PM TO (separate multiple usernames with a ';')
$formpmname = "Ol_Man;Professor;Suicide;Art;Slayer";

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

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

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "csnyderiii@global-fortress.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";

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



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

$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 = "1";

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

$formtitle = "GFC R.A.C Application";

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "If you are interested in joining the Global Fortress Community you must read & follow the instructions below";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Fill in your Game user name(s).";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Do you own & use a microphone? We require all new recruits to use Ventrilo www.ventrilo.com & you will need a microphone for this. Check out the Ventrilo Server Info on the front of the website. r IP and setup info. With out a microphone you will not be recruited.";

// 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)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion2 = "Fill in your xfire user name.";
//$radioquestion2 = "Do you have xFire Installed(recommended).
//www.xfire.com";

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


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

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

//$radioquestion3 = "";
$normalquestion3 = "Make sure you get your steam ID / BF2 PID / BF2142 PID / In Game user Name";
// 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 = "How long have you been playing?";
$explain1 = "Please list how long you have been playing the game which you are applying";

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

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Have you been in any clans?";
$explain3 = "Please enter your Clan names that you have been associated with.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Are you presently in a another Clan?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "No";
$dropdownchoice1b = "Yes";
//$dropdownchoice1c = "Yes but with another Game";

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

$dropdownquestion2 = "Which Games are you applying for?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "Counter-Strike Source";
$dropdownchoice1b = "Team Fortress 2";
$dropdownchoice1c = "Day of Defeat Source";
$dropdownchoice1d = "Battlefield2";
$dropdownchoice1e = "Battlefield 2142";
$dropdownchoice1f = "Call of Duty 4";
$dropdownchoice1g = "Project Torque";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Which game are you applying for.";

// The following choices must NOT have quotation marks
//$checkboxchoice1_1 = "Counter-Strike : Source";
//$checkboxchoice1_2 = "Battlefield 2142";
//$checkboxchoice1_3 = "Other then listed Above";


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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 tell us why you want to join Global Fortress Community.";
$longexplain1 = "Please be as detailed as possible.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "In order to keep GFC gaming servers, voice server, fourms etc running we require donations by members. Are you willing to donate a small ($5) monthly amount to help with these costs? Please write down any additional information that you want to add that might help us recruit you.";
$vbtextexplain = "";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
We are a gaming clan so this is a recruitment form any suggestion would be great.

Kwikms 03-18-2008 07:42 AM

Quote:

Originally Posted by Deep-X (Post 1467456)
Are you willing to donate a small ($5) monthly amount to help with these costs?

I think the "$5" could be a problem. User HTML-Code instead.

Deepdog009 03-18-2008 04:12 PM

Been away folks and its good 2 be back and C that this mod by ABE1 is over 900 installs,,, Beauts...


I recently had an accident on the freeway and im still recovering from injuries inflicted by slamming head on into separator...


I'll never buy another V-8 engine :( 2 many headaches... :eek:;)

I will try 2 assist if time permits...

Good Luck 2 ALL...

amroawad 03-18-2008 07:57 PM

Hi,

I have imported the xml file but I can change anything. Where can I start using this tool.

Thanks

tehtide 03-20-2008 03:09 PM

Quote:

Originally Posted by Grimbone (Post 1386959)
In the code below. how would I go about sending a post to 2 different forums?

Code:

$formforumid = "13";
I am trying to get this to post to both a regular section of the forums and to a private section.

Has anyone been able to come up with a solution to have this post in two different forums? I'm in the same boat... I need this form to go to a public section so that the user can comment, but then I need to have that same form be posted to a private section where membership can comment and discuss w/o the user being able to read the comments etc...

Basically a complaint form.


All times are GMT. The time now is 09:34 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.02487 seconds
  • Memory Usage 1,826KB
  • 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_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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