The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
Hello all,
im trying to create a PHP Function that will add a thread to the forums. This is what i got must its not working: Code:
private function MakeThread( $ForumId, $Title, $Content ) { mysql_query( "INSERT INTO `thread` (`threadid`,`title`,`prefixid`,`firstpostid`,`lastpostid`,`lastpost`,`forumid`,`pollid`,`open`,`replycount`,`hiddencount`,`deletedcount`,`postusername`,`postuserid`,`lastposter`,`dateline`,`lastedit`,`views`,`iconid`,`notes`,`visible`,`sticky`,`votenum`,`votetotal`,`attach`,`similar`,`taglist`,`vbseo_linkbacks_no`,`lastposterid`,`keywords`,`wrdate`) VALUES (NULL, '". mysql_real_escape_string($Title) ."', '', '0', '0', '". $ForumId ."', '0', '0', '0', '0', '0', '". $this->UserData['username'] ."', '". $this->UserData['userid'] ."', '". $this->UserData['username'] ."', '". SCRIPT_TIME ."', '0', '0', '', '0', '', '1', '0', '0', '0', '0', '0', '0', '". $this->UserData['userid'] ."', '0', '0')" ) or die( "Q1: " . mysql_error( ) ); // Get the inserted thread ID $ThreadID = mysql_insert_id( ); mysql_query( "INSERT INTO 'post` (`postid`,`threadid`,`parentid`,`username`,`userid`,`title`,`dateline`,`lastedit`,`pagetext`,`allowsmilie`,`showsignature`,`ipaddress`,`iconid`,`visible`,`attach`,`infraction`,`reportthreadid`,`htmlstate`) VALUES (NULL, '". $ThreadID ."', '0', '". $this->UserData['username'] ."', '". $this->UserData['userid'] ."', '', '". SCRIPT_TIME ."', '', '" . $Content . "', '0', '0', '". $this->UserIP ."', '0', '1', '0', '0', '0', 'on_nl2br')" ) or die( "Q2: " . mysql_error( ) ); $PostID = mysql_insert_id( ); mysql_query( "UPDATE `thread` SET `firstpostid` = " . $PostID . ", `lastpostid` = " . $PostID . " WHERE `threadid` = " . $ThreadID . " LIMIT 1" ); } At this point no thread is being made. Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|