Thread: Forms Hack
View Single Post
  #997  
Old 08-10-2006, 02:59 PM
ProperMethodz's Avatar
ProperMethodz ProperMethodz is offline
 
Join Date: Jan 2005
Location: Stamford CT
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Abe, first off... Awesome hack. This has taught me a lot about how vb works and how to customize a lot of different things I had never tried.

On to my problem. As you can see in my previous post, I've been working on a form. So far it's a pretty intensive, well intensive for me, form.

I started with getting all the information on the page by copy and pasting code then changing the function name, value and name variables to fit the layout I needed. I then went down to the customize area and put in the questions and answers I wanted.

The last part before I want to mess with any of the permissions is the template and Variables. See before I started messing with the variables, only some of my answers would come out. So I looked back and found that I was missing some information there. So I started customizing all the variables and am afraid I mesed up royaly because now... no answers show in the PM/E-mail/Thread creation.

Please tell me what the heck I did wrong... I don't get it. I mimicked what you did .


Here's the template code:

Code:
<template name="formanswers" templatetype="template" date="1149082732" username="ProperMethodz" version="3.5.4"><![CDATA[$formtitle
$bbuserinfo[username]

$question1
$answer1

$question2
$answer2

$question3
$answer3
-------------------------------------------------

$question4 
$answer4

$dropdownquestion1 
$dropdownanswer1

$dropdownquestion2 
$dropdownanswer2

$questionlevel 
$answerlevel

$dropdownquestion3 
$dropdownanswer3

$dropdownquestion4
$dropdownanswer4 $dropdownanswer4a

$dropdownquestion5 
$dropdownanswer5 $dropdownanswer5a

$question5 
$answer5

$question7 
$answer7

$checkboxquestion1
$checkboxanswer1_1
$checkboxanswer1_2
$checkboxanswer1_3
$checkboxanswer1_4
$checkboxanswer1_5
$checkboxanswer1_6
$checkboxanswer1_7
$checkboxanswer1_8
$checkboxanswer1_9
$checkboxanswer1_10
$checkboxanswer1_11
$checkboxanswer1_12
$checkboxanswer1_13
$checkboxanswer1_14
$checkboxanswer1_15

$radioquestion1 
$radioanswer1

$radioquestion2 
$radioanswer2

$question8 
$answer8

$question6 
$answer6a
$answer6b
$answer6c

$vbtextquestion1
------------------------------------------------------

$vbtextanswer

------------------------------------------------------
$vbtextquestion2
------------------------------------------------------

$vbtextanswer2

------------------------------------------------------]]></template>
Here's the variable code:
Code:
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
'$answer2' => TYPE_STR,
'$answer3' => TYPE_STR,
'$answer4' => TYPE_STR,
'$dropdownanswer1' => TYPE_STR,
'$dropdownanswer2' => TYPE_STR,
'$answerlevel' => TYPE_STR,
'$dropdownanswer3' => TYPE_STR,
'$dropdownanswer4' => TYPE_STR,
'$dropdownanswer4a' => TYPE_STR,
'$dropdownanswer5' => TYPE_STR,
'$dropdownanswer5a' => TYPE_STR,
'$answer5' => TYPE_STR,
'$answer7' => TYPE_STR,
'$checkboxanswer1_1' => TYPE_STR,
'$checkboxanswer1_2' => TYPE_STR,
'$checkboxanswer1_3' => TYPE_STR,
'$checkboxanswer1_4' => TYPE_STR,
'$checkboxanswer1_5' => TYPE_STR,
'$checkboxanswer1_6' => TYPE_STR,
'$checkboxanswer1_7' => TYPE_STR,
'$checkboxanswer1_8' => TYPE_STR,
'$checkboxanswer1_9' => TYPE_STR,
'$checkboxanswer1_10' => TYPE_STR,
'$checkboxanswer1_11' => TYPE_STR,
'$checkboxanswer1_12' => TYPE_STR,
'$checkboxanswer1_13' => TYPE_STR,
'$checkboxanswer1_14' => TYPE_STR,
'$checkboxanswer1_15' => TYPE_STR,
'$radioanswer1' => TYPE_STR,
'$radioanswer2' => TYPE_STR,
'$answer8' => TYPE_STR,
'$answer6a' => TYPE_STR,
'$answer6b' => TYPE_STR,
'$answer6c' => TYPE_STR,
'$vbtextanswer' => TYPE_STR,
'$vbtextanswer2' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$dropdownanswer2 = $vbulletin->GPC['dropdownanswer2'];
$answerlevel = $vbulletin->GPC['answerlevel'];
$dropdownanswer3 = $vbulletin->GPC['dropdownanswer3'];
$dropdownanswer4 = $vbulletin->GPC['dropdownanswer4'];
$dropdownanswer4a = $vbulletin->GPC['dropdownanswer4a'];
$dropdownanswer5 = $vbulletin->GPC['dropdownanswer5'];
$dropdownanswer5a = $vbulletin->GPC['dropdownanswer5a'];
$answer5 = $vbulletin->GPC['answer5'];
$answer7 = $vbulletin->GPC['answer7'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3'];
$checkboxanswer1_4 = $vbulletin->GPC['checkboxanswer1_4'];
$checkboxanswer1_5 = $vbulletin->GPC['checkboxanswer1_5'];
$checkboxanswer1_6 = $vbulletin->GPC['checkboxanswer1_6'];
$checkboxanswer1_7 = $vbulletin->GPC['checkboxanswer1_7'];
$checkboxanswer1_8 = $vbulletin->GPC['checkboxanswer1_8'];
$checkboxanswer1_9 = $vbulletin->GPC['checkboxanswer1_9'];
$checkboxanswer1_10 = $vbulletin->GPC['checkboxanswer1_10'];
$checkboxanswer1_11 = $vbulletin->GPC['checkboxanswer1_11'];
$checkboxanswer1_12 = $vbulletin->GPC['checkboxanswer1_12'];
$checkboxanswer1_13 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_14 = $vbulletin->GPC['checkboxanswer1_14'];
$checkboxanswer1_15 = $vbulletin->GPC['checkboxanswer1_15'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$answer8 = $vbulletin->GPC['answer8'];
$answer6a = $vbulletin->GPC['answer6a'];
$answer6b = $vbulletin->GPC['answer6b'];
$answer6c = $vbulletin->GPC['answer6c'];
$vbtextanswer = $vbulletin->GPC['vbtextanswer'];
$vbtextanswer2 = $vbulletin->GPC['vbtextanswer2'];
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01943 seconds
  • Memory Usage 1,794KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete