vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Create thread function only accepts threads with titles of up to 45 characters ?! (https://vborg.vbsupport.ru/showthread.php?t=154547)

mihai11 08-07-2007 01:25 PM

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'$vbulletinERRTYPE_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.


All times are GMT. The time now is 06:38 AM.

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.00939 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete