@Nelson
your PHP-Momory-Limit is too small ...
set on 128M
@VBDev
I have wirte a littlt function to create an Auto-Post from Backend. Whn i use this function, it creats an Error
Code:
Fatal error: Call to a member function authorize_user_newthread_newpost_notif() on a non-object in /var/www/vhosts/****************/forum/mgc_cb_evo/plugins/postdata_postsave.php on line 49
i use this Code in my function:
Code:
<?php
function post_game()
{
global $vbulletin, $config;
require_once(DIR . '/includes/class_dm.php');
require_once(DIR . '/includes/class_dm_threadpost.php');
require_once(DIR . '/includes/functions_databuild.php');
$title = $config['gtitle'];
$allowsmilie = '1';
$visible = '1';
$thema = 13360;
$post_user_name = 'ArcadeMaster';
$post_user_id = 15;
// Floating-Schutz disable
$last = $vbulletin -> options['floodchecktime'];
$vbulletin -> options['floodchecktime'] = 0;
$last_game = $vbulletin -> db -> query_first('SELECT MAX(gid) AS gid FROM ' . TABLE_PREFIX . 'games_list');
$message = "ONE MESSAGE TEXTE HERE";
$getfirstpost = $vbulletin->db->query_first("SELECT postid
FROM " . TABLE_PREFIX . "post
WHERE threadid = " . $thema . "
ORDER BY dateline LIMIT 1");
$parentid = $getfirstpost['postid'];
$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postdm->do_set('username', addslashes($post_user_name) );
$postdm->do_set('userid', intval($post_user_id) );
$postdm->do_set('threadid', intval($thema) );
$postdm->do_set('title', addslashes($title) );
$postdm->do_set('pagetext', $message);
$postdm->do_set('parentid', $parentid);
$postdm->do_set('allowsmilie', $allowsmilie);
$postdm->do_set('visible', $visible);
$postdm->save();
unset($postdm);
build_thread_counters( $thema );
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user
SET posts = posts + 1
WHERE userid = " . intval($post_user_id) . " LIMIT 1");
// Foolting-Schutz wieder einschalten
$vbulletin -> options['floodchecktime'] = $last;
}
?>
thanks vor your help