
03-14-2009, 02:19 PM
|
 |
|
|
Join Date: Mar 2009
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by bananalive
- this uses BB Code Table & Easy Forms v3.3
- Create thread/post eg.
HTML Code:
[table]column1|column2|column3
[/table]
- Form Hook: Before Submit
PHP Code:
if ($complete)
{
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
$postid = 245;
$postinfo = fetch_postinfo($postid);
$postpagetext = str_replace('[/table]', "\r\n $formoutput [/table]", $postinfo[pagetext]);
$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postdm->set_existing($postinfo);
$postdm->set('pagetext', $postpagetext);
$postdm->pre_save();
if(count($postdm->errors) < 1)
{
$postdm->save();
}
else
{
foreach ($errors as $error) {
$errorss .= $error. "<br />";
}
$errormessage = "Following errors occurred".$errorss;
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
unset($postdm);
if ($form[submitmessage])
{
$errormessage = $form[submitmessage];
}
else
{
$errormessage = "Form was submitted successfully. Click <a href=\"showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p=" . $postinfo[postid] . "#post" . $postinfo[postid] . "\">here</a> to view the post.";
}
}
- Replace 245 with appropriate postid
- Use custom output e.g.
Code:
$qo[75] | $thisuser[username] | $qo[59]
|
I get to this page when I tried making these updates:
Quote:
Fatal error: Existing data passed is not an array
Called set_existing in [path]/misc.php(100) : eval()'d code(1039) : eval()'d code on line 9
Called eval in [path]/misc.php(100) : eval()'d code on line 1039
Called eval in [path]/misc.php on line 100
in [path]/includes/class_dm.php on line 235
#0 vb_error_handler(256, Existing data passed is not an array
Called set_existing in /var/www/vhtdocs/userweb61076/html/forum/misc.php(100) : eval()'d code(1039) : eval()'d code on line 9
Called eval in /var/www/vhtdocs/userweb61076/html/forum/misc.php(100) : eval()'d code on line 1039
Called eval in /var/www/vhtdocs/userweb61076/html/forum/misc.php on line 100
, /var/www/vhtdocs/userweb61076/html/forum/includes/class_dm.php, 235, Array ([existing] => ,[line] =>
Called set_existing in /var/www/vhtdocs/userweb61076/html/forum/misc.php(100) : eval()'d code(1039) : eval()'d code on line 9
Called eval in /var/www/vhtdocs/userweb61076/html/forum/misc.php(100) : eval()'d code on line 1039
Called eval in /var/www/vhtdocs/userweb61076/html/forum/misc.php on line 100
....
|
Thanks for all your help
|