This added code allows the Wordpress front page (and probably some others that calculate comment count) to show the number of replies in the vb thread.
Note: I am using WP version 3.0.1 and VB version 3.8.6
In vbbridge.php, add to the end:
Code:
add_filter('get_comments_number', 'comments_count', 10, 2);
### Return Comment count
function comments_count($count, $postID = false) {
global $vbulletin, $vwd;
$wpdb =& $GLOBALS['wpdb'];
$sql = "select vb_threadid FROM " . $GLOBALS['table_prefix'] . "posts where ID = '$postID'";
$results = $wpdb->get_row($sql);
$sql = "select replycount FROM " . TABLE_PREFIX . "thread where threadid = '$results->vb_threadid'";
$results2 = $wpdb->get_row($sql);
return $results2->replycount;
}
That should work pretty well. Did some testing on it, seems to work fine.