
08-07-2007, 12:25 PM
|
|
|
|
Join Date: Dec 2005
Location: Sibiu - Romania
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Create thread function only accepts threads with titles of up to 45 characters ?!
NEVERMIND, I SORTED OUT !
Hi,
I am using this function to create threads:
PHP Code:
function _createThread_vbulletin($forumid, $posttitle, $postpagetext, $postuserid=0)
{
global $vbulletin;
if ($postuserid == 0) $postuserid = $this->postuserid;
echo "forumid = '$forumid', posttitle = '$posttitle', postpagetext = '$postpagetext', postuserid = '$postuserid' <br />";
$threadinfo = array();
$foruminfo = fetch_foruminfo($forumid);
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$threaddm->set('forumid', $forumid);
$threaddm->set('userid', $postuserid);
$threaddm->set('pagetext', $postpagetext);
$threaddm->set('title', $posttitle);
$threaddm->set('allowsmilie', '1');
$threaddm->set('visible', '1');
$threaddm->set_info('forum', $foruminfo);
$threaddm->pre_save();
if(count($threaddm->errors) < 1)
{
$threadid = $threaddm->save();
build_thread_counters($threadid);
}
else return 0;
build_forum_counters($forumid);
return $threadid;
}
I took the function from this thread:
https://vborg.vbsupport.ru/showthrea...t=97283&page=5
Everything is fine except that there seems to be a hard limit of 45 characters for the thread title . If the thread title is longer than that then the function fails when calling "pre_save".
What can be the issue ?
Regards,
Razvan M.
|