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 05-08-2007 03:34 PM

Quote:

Originally Posted by ComputerVitals (Post 1243043)
How do I make it so,

When someone selects a radio button, pushes the submit button, it still emails, but depending on which radio button they pushed, it will direct you to a certain page.


ComputerVitals take a look C at this post...

https://vborg.vbsupport.ru/showpost....&postcount=409

ComputerVitals 05-08-2007 06:09 PM

Quote:

Originally Posted by Deepdog009 (Post 1243733)
ComputerVitals take a look C at this post...

https://vborg.vbsupport.ru/showpost....&postcount=409

Rock and roll
Thanks Deepdog009 & rayw

Tweaked that for the radio buttons and now it work just like it did before..
Now to add your image verification to it!!

Deepdog009 05-08-2007 08:03 PM

Quote:

Originally Posted by ComputerVitals (Post 1243844)
Rock and roll
Thanks Deepdog009 & rayw

Tweaked that for the radio buttons and now it work just like it did before..
Now to add your image verification to it!!



ComputerVitals i released a Forms Pack *** add-on that helps with Java Calendar pop-up window 2 help with events.

BBcode smileys add-on 2 help with answer template look and feel.

Posticons & Subtitle add-on 2 help with posting topic image.

ABE1 Form Hack takes all credit and hopefully add these to his hack...

Good Luck:cool:

ComputerVitals 05-09-2007 02:09 AM

A little tweaking.
When you enable the:
$answerall = "1";

The error message will display if you dont fill it out.
Is there a way to add a text link for a "go back" instead of the user hitting the browser back button?
If not i'll just change the words to tell them to hit the back button.

ComputerVitals 05-16-2007 01:43 PM

I'm getting this error when I click the submit button:

Error: 'vB-Editor_.vB_Editor_001' is null or not an object

It has the yellow exclamation in the lower left of the browser when submitting.
On reference to vb_editor in the hack I have found was in the form template.
Code:

<form name="vbform" action="newthread.php" method="post"<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
Any ideas how to fix this?

JTMON 05-16-2007 08:07 PM

Hi, I haven't found this problem searching this thread so here goes...did the edits, made sure part 1 and 2, had all working until I finished..now I get this error:

Parse error: parse error, unexpected '}' in /home/www/ticketdoctor/forums/newthread.php(71) : eval()'d code on line 608

My code is:
Code:

// #######################################################################
// ######################## 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(
'FirstNameAnswer' => TYPE_STR,
'LastNameAnswer' => TYPE_STR,
'AddressAnswer' => TYPE_STR,
'CityAnswer' => TYPE_STR,
'StateAnswer' => TYPE_STR,
'ZipcodeAnswer' => TYPE_STR,
'DOBAnswer' => TYPE_STR,
'PrimaryPhoneNumberAnswer' => TYPE_STR,
'SecondaryPhoneNumberAnswer' => TYPE_STR,
'ValidLicenseAnswer' => TYPE_STR,
'NotValidLicenseAnswer' => TYPE_STR,
'EmailAddressAnswer' => TYPE_STR,
'NewsletterSignupAnswer' => TYPE_STR,
'LicenseNumberAnswer' => TYPE_STR,
'AccidentInvolvedAnswer' => TYPE_STR,
'CriminalRecordAnswer' => TYPE_STR,
'OneTicketOnStopAnswer' => TYPE_STR,
'TicketNumberAnswer' => TYPE_STR,
'Charges1Answer' => TYPE_STR,
'Charges2Answer' => TYPE_STR,
'Charges3Answer' => TYPE_STR,
'Charges4Answer' => TYPE_STR,
'ViolationCode1Answer' => TYPE_STR,
'ViolationCode2Answer' => TYPE_STR,
'ViolationCode3Answer' => TYPE_STR,
'ViolationCode4Answer' => TYPE_STR,
'CourtToAppearInAnswer' => TYPE_STR,
'AppearanceDateAnswer' => TYPE_STR,
'AppearanceTimeAnswer' => TYPE_STR,
'HowHeardAboutUsAnswer' => TYPE_STR
));

// Part 2
$FirstNameAnswer = $vbulletin->GPC['FirstNameAnswer'];
$LastNameAnswer = $vbulletin->GPC['LastNameAnswer'];
$AddressAnswer = $vbulletin->GPC['AddressAnswer'];
$CityAnswer = $vbulletin->GPC['CityAnswer'];
$StateAnswer = $vbulletin->GPC['StateAnswer'];
$ZipcodeAnswer = $vbulletin->GPC['ZipcodeAnswer'];
$DOBAnswer = $vbulletin->GPC['DOBAnswer'];
$PrimaryPhoneNumberAnswer = $vbulletin->GPC['PrimaryPhoneNumberAnswer'];
$SecondaryPhoneNumberAnswer = $vbulletin->GPC['SecondaryPhoneNumberAnswer'];
$ValidLicenseAnswer = $vbulletin->GPC['ValidLicenseAnswer'];
$NotValidLicenseAnswer = $vbulletin->GPC['NotValidLicenseAnswer'];
$EmailAddressAnswer = $vbulletin->GPC['EmailAddressAnswer'];
$NewsletterSignupAnswer = $vbulletin->GPC['NewsletterSignupAnswer'];
$LicenseNumberAnswer = $vbulletin->GPC['LicenseNumberAnswer'];
$AccidentInvolvedAnswer = $vbulletin->GPC['AccidentInvolvedAnswer'];
$CriminalRecordAnswer = $vbulletin->GPC['CriminalRecordAnswer'];
$OneTicketOnStopAnswer = $vbulletin->GPC['OneTicketOnStopAnswer'];
$TicketNumberAnswer = $vbulletin->GPC['TicketNumberAnswer'];
$Charges1Answer = $vbulletin->GPC['Charges1Answer'];
$Charges2Answer = $vbulletin->GPC['Charges2Answer'];
$Charges3Answer = $vbulletin->GPC['Charges3Answer'];
$Charges4Answer = $vbulletin->GPC['Charges4Answer'];
$ViolationCode1Answer = $vbulletin->GPC['ViolationCode1Answer'];
$ViolationCode2Answer = $vbulletin->GPC['ViolationCode2Answer'];
$ViolationCode3Answer = $vbulletin->GPC['ViolationCode3Answer'];
$ViolationCode4Answer = $vbulletin->GPC['ViolationCode4Answer'];
$CourtToAppearInAnswer = $vbulletin->GPC['CourtToAppearInAnswer'];
$AppearanceDateAnswer = $vbulletin->GPC['AppearanceDateAnswer'];
$AppearanceTimeAnswer = $vbulletin->GPC['AppearanceTimeAnswer'];
$HowHeardAboutUsAnswer = $vbulletin->GPC['HowHeardAboutUsAnswer'];

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

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

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

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

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "computerguy@ticketdoctor.net";

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

//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";
//This is the thank you message
$errormessage = "Thank you for submitting your ticket! Someone from our office will contact you shortly.";

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

////////////////////////////////////////////////////////////////////////////////////////////////////
//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 = "Ticket Submission 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 = "Use this form to submit your ticket information. If you submit it during normal business hours we will contact you within 30 minutes.";

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

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

$FName = "First Name:";
$LName = "Last Name:";
$MAddress = "Mailing Address:";
$City = "City:";
$State = "State:";
$ZipCode = "Zip Code:";
$DOB = "Date of Birth:";
$PrimaryPhoneNumber = "What is your primary phone number?";
$SecondaryPhoneNumber = "Please provide a second phone number where we can reach you.";
$ValidLicense = "Do you have a Valid NY State License?";
$EmailAddress = "Email Address:";
$LicenseNumber= "What is your 9 digit license number? (located on top of your Drivers License).";
$TicketNumber = "What is your ticket number (located in the upper left corner of ticket in bold, can be a letter-number combination:";
$Charges = "What are your charges? (Speeding, Passed Stop Sign, etc):";
$SectionSub = "What is the Section-Subsection code of your charge? (located above charge description, usually 4 digits and a letter)";
$CourtToAppearIn = "What Court do you need to appear in?:";
$AppearanceDate = "What is your appearance date?:";
$AppearanceTime = "What is your appearance time?:";
$HowHeardAboutUs = "How did you hear about us?:";

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

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

$NewsLetterSignup = "Would you like to sign up for our future Newsletter?";

// The following choices must NOT have quotation marks
$NewsLetterSignupChoicea = "Yes";
$NewsletterSignupChoiceb = "No";

$AccidentInvolved = "Was there an accident involved?";

$AccidentInvolvedChoicea = "Yes";
$AccidentInvolvedChoiceb = "No";

$OneTicketOnStop = "Did you only receive this ONE ticket on THIS stop?";

$OneTicketOnStopChoicea = "Yes";
$OneTicketOnStopChoiceb = "No";

$CriminalRecord = "Do you have a criminal record?";

$CriminalRecordChoicea = "Yes";
$CriminalRecordChoiceb = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////

any ideas? Line 71 in newthread is eval..and the normal stuff doesn't go to line 608?


any help is mucho appreciated..thanks!

ComputerVitals 05-17-2007 03:01 AM

did you modify the lower part of the hook?
If you did, look there for line 608, looks like an extra curly is there.
If you need a free text editor with line numbers try winsyntax

JTMON 05-17-2007 04:44 AM

I even checked it with araxis merge and found no difference other than variables..maybe it's in the template?

samual 05-17-2007 02:14 PM

I added an extra raido button to this form but it is showing up on the right side of the page. What do I need to do to move it back to the other side?

JTMON 05-17-2007 05:17 PM

I found out my problem, I had chopped off the little bit of code above the variables.

Samual..you need to edit the "form" template.


All times are GMT. The time now is 08:15 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.02071 seconds
  • Memory Usage 1,816KB
  • 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
  • (2)bbcode_code_printable
  • (3)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