Thread: New Posting Features - Form Hack
View Single Post
  #1285  
Old 10-21-2008, 04:00 PM
a33 a33 is offline
 
Join Date: Mar 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just backed up the code and then deleted things i didn't need. i dont think // will work there.

i didn't need these dropdowns or checkbox so i deleted all this code
PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//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 "Drop down choices?";

// The following choices must NOT have quotation marks
$dropdownchoice1a "no comment";
$dropdownchoice1b "Yes please";
$dropdownchoice1c "No thanks";

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

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

//////////////////////////////////////////////////////////////////////////////////////////////////// 
You also have to remove
PHP Code:
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR
and
PHP Code:
$dropdownanswer1 $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 $vbulletin->GPC['checkboxanswer1_3']; 
from here
PHP Code:
////////////////////////////////////////////////////////////////////////////////////////////////////

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'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
));

// Part 2
$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']; 

You will then have to edit the templates so remove dropdownanswer1 from there aswell

Hope that makes some sense
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01118 seconds
  • Memory Usage 1,803KB
  • 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
  • (4)bbcode_php
  • (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