Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 11-05-2014, 05:12 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok there are several if/else statements & variables that contain $_POST['do'].

Code:
if ($_POST['do'] == 'updateformresult')

$_POST['do'] = 'postform';

if ($_POST['do'] == 'postform')

if ($_POST['do'] == 'insertform')

if ($_POST['do'] == 'updateform')

if ($_POST['do'] == 'insertq')

if ($_POST['do'] == 'updateq')

if ($_POST['do'] == 'formresults_export')

if ($_POST['do'] == 'updateqorder')

if ($_POST['do'] == 'importform')

if ($_POST['do'] == 'addq')
But it seems that the 'postform' may have the most to do with this, but I'm not a PHP coder so I'm not entirely sure. Here is the code that looks about like it has to do with viewing the form:

Code:
	if (($caneditformresult && !is_member_of($vbulletin->userinfo, $caneditformresult)) AND (!$canmanageownformresults OR !$vbulletin->userinfo['userid']))
	{
		print_no_permission();
	}
	$show['edit_id'] = $id = $vbulletin->input->clean_gpc('p', 'id', TYPE_UINT);
	$fid = $vbulletin->input->clean_gpc('p', 'fid', TYPE_UINT);
	$_POST['do'] = 'postform';
	$show['editing'] = true;
	$where = "";
	if ($canmanageownformresults && !is_member_of($vbulletin->userinfo, $caneditformresult))
	{
		$where = " AND userid = '" . $vbulletin->userinfo['userid'] . "'";
	}
	$formresult = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' AND id = '$id' $where");
	if (!$formresult)
	{
		$errormessage = $vbphrase[form_error_data_not_exist];
       	eval(standard_error($errormessage));
	}
}
if ($_POST['do'] == 'postform')
{
	$POST_FORM = true;
	$canviewform = unserialize($vbulletin->options['canviewform']);
	if (!$canviewform OR !is_member_of($vbulletin->userinfo, $canviewform))
	{
		print_no_permission();
	}
	$fid = $vbulletin->input->clean_gpc('p', 'fid', TYPE_UINT);
	if (empty($fid))
	{
		$errormessage = $vbphrase[form_error_not_existing_form];
       	eval(standard_error($errormessage));
	}
	$posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);
	$poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_NOHTML);
	$hiddenfield1 = $vbulletin->input->clean_gpc('p', 'hiddenfield1', TYPE_NOHTML);
	$hiddenfield2 = $vbulletin->input->clean_gpc('p', 'hiddenfield2', TYPE_NOHTML);
	$hiddenfield3 = $vbulletin->input->clean_gpc('p', 'hiddenfield3', TYPE_NOHTML);
	$complete = true;
	$incompleteqs = array();
	$iqs = array();
	$form = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "forms WHERE fid = '$fid'");
	if (!$form)
	{
		$errormessage = $vbphrase[form_error_not_existing_form];
       	eval(standard_error($errormessage));
	}
	($hook = vBulletinHook::fetch_hook('easy_forms_post_form_start')) ? eval($hook) : false;
	if ($form[submitlimitperuser] >= 1 && !$show['editing'])
	{
Reply With Quote
  #22  
Old 11-05-2014, 06:28 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you'd have to know the actual value of $_POST['do'] when the error happens. You say that this happens when you click on a button that you created? Then if that button isn't submitting a form, $_POST['do'] won't have a value. That could be the problem - maybe it's not meant to be used that way. Maybe you'd have to submit a form with some data for it to work.

But really this has gotten in to helping with a mod, and that shouldn't be done in this forum (my fault, I should have said that before). We could just continue in the mod thread, if anyone else has anything to post.
Reply With Quote
  #23  
Old 11-05-2014, 07:41 PM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you put any plugins at hook location easy_forms_view_question_start ?
Reply With Quote
  #24  
Old 11-05-2014, 07:46 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please continue this in the mods thread, this is not the proper place for discussing the mod.
Reply With Quote
  #25  
Old 11-06-2014, 02:29 AM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been solved thanks all for your help.
Reply With Quote
  #26  
Old 11-06-2014, 02:02 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What was the solution so that if others run into the problem they can solve it?
Reply With Quote
  #27  
Old 11-06-2014, 03:03 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by squidsk View Post
What was the solution so that if others run into the problem they can solve it?
Check in the modifications thread for the solution.
Reply With Quote
  #28  
Old 11-06-2014, 03:44 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Check in the modifications thread for the solution.
Yeah what he said....lol
Reply With Quote
Благодарность от:
ozzy47
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:02 PM.


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.05360 seconds
  • Memory Usage 2,241KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (1)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete