PDA

View Full Version : Datamanager thread post - search index?


benFF
11-12-2005, 05:05 AM
Hi,

I have the following code working posting to vB, however neither the "Last Post" in the forum listing updates, nor is the post indexed for searching :(

Here is my code so far:

// Start thread create
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);

// Make the post
$title = $adtype . ': ' . $title . " (" . $catname . ")";
$pagetext = $desc . "\n\n[CLASSIFIED" . $productid . "]";
$allowsmilie = '1';
$visible = '1';
$forumid = $vbulletin->options['PPCvAC_ForumID'];

// Insert thread
$threaddm->do_set('forumid', $forumid);
$threaddm->do_set('postuserid', $userid);
$threaddm->do_set('userid', $userid);
$threaddm->do_set('username', $username);
$threaddm->do_set('pagetext', $pagetext);
$threaddm->do_set('title', $title);
$threaddm->do_set('allowsmilie', $allowsmilie);
$threaddm->do_set('visible', $visible);
$threaddm->save();

To get the forum details to update, I found:

require_once('./includes/functions_databuild.php');
build_forum_counters($forumid);

However this doesn't help the search indexing (and seems like a big of a resource hog...?)

Anyone got any ideas? :) thanks.

ben