Awesome mod, works like a charm, but I've run into a bit of an issue - I have had my blog going for nearly 2 years, and am just now adding this forum.
1. As I have seen thus far, this is not retro-active, creating a new forum thread for every old post (which is a GOOD thing).
2. When I replace the comment text in my wordpress template, I've noticed that comments completely disappear for posts that do not currently have a vBulletin thread, which makes sense.
Would it be possible to include some php that says, basically, 'if this post was published before MM/DD/YYYY, then continue using the existing Wordpress comments code. If this post was published AFTER MM/DD/YYYY, then use this new vBulletin comment code.'
I realize I would then still need to monitor Wordpress' comments for older posts, but I think that would be the cleanest integration.
Or did I miss something?
Update: I got it taken care of, here's the code I used:
PHP Code:
<?php
$date1 = strtotime('2008-10-17');
$date2 = strtotime( $post->post_date );
if ($date1 < $date2) {
#### Vbridge Replacement code for comments
if ($vbridge[id] > 0) {
echo "<div class='comments'>";
if(is_single()) {
if (is_array($vbridge[replies])) {
echo "<br /><br /><h3 id='comments'>Comments</h3><ol class='commentlist'>";
foreach ($vbridge[replies] as $reply) {
echo "<li class=";
echo $oddcomment;
echo "id='comment-'";
echo comment_ID();
echo ">";
echo $vbridge[vb_parser]->do_parse($reply[pagetext], false, true);
echo "<small class='commentmetadata'>";
echo " ";
echo "<img src='";
echo bloginfo('stylesheet_directory');
echo "/images/comment_arr.gif' />";
echo "by <cite> <a href=;";
echo get_option('vbb_VBURL');
echo "/member.php?u='";
echo $reply[userid];
echo ">";
echo $reply[username];
echo "</a></cite></small><br /></li>";
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
}
}
echo "</ol>";
}
echo "<a href=";
echo get_option('vbb_VBURL');
echo "/showthread.php?t=";
echo $vbridge[id];
echo ">";
echo intval($vbridge[count]);
echo "comments</a> |";
echo "<a href=";
echo get_option('vbb_VBURL');
echo "/newreply.php?do=newreply&noquote=1&t=";
echo $vbridge[id];
echo ">";
echo "Add your comments</a></div>";
}
##End Vbridge Replacement
} else {
echo "<div id='comments-template'>";
comments_template();
echo "</div>";}
?>
The date at the top is the cutoff date, so that newer posts use the forum comments, whereas older posts use the legacy Wordpress comments function. My old comments code is found in the last 4 lines, after the "} else {"