Hello,
i want to use vB for comments.
I have following wordpress-theme and i can't find the code posted in the readme-file. No code like that in the theme-files...
Code:
IF YOU WANT TO USE VB For comments:
Find in any of the following templates: index.php, single.php, page.php.
<!-- start post loop -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
ADD the following code after it:
<?php
### Vbridge Call
$vbridge = Comment_Handler($post->ID);
###
?>
Find this code (or similar code indicating the comment section of your template):
<?php wp_link_pages(); ?>
<!-- <?php comments_popup_link(__('0 Comments'), __('1 Comments'), __('% Comments')); ?>
And replace with this:
<?php
#### Vbridge Replacement code for comments
if ($vbridge[id] > 0) {
?>
<div class="comments">
<?php
if(is_single()) {
if (is_array($vbridge[replies])) {
?>
<br /><br />
<h3 id="comments">Comments:</h3>
<ol class="commentlist">
<?php
foreach ($vbridge[replies] as $reply) {
?>
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
<?php echo $vbridge[vb_parser]->do_parse($reply[pagetext], false, true); ?>
<small class="commentmetadata">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/comment_arr.gif" alt="" />
by <cite> <a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $reply[userid] ?>><?php echo $reply[username]; ?></a></cite>
</small><br />
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
}
}
?>
</ol>
<?php
}
?>
<a href=<?php echo get_option('vbb_VBURL') ?>/showthread.php?t=<?php echo $vbridge[id] ?>>(<?php echo intval($vbridge[count]) ?>) comments</a> | <a href=<?php echo get_option('vbb_VBURL') ?>/newreply.php?do=newreply&noquote=1&t=<?php echo $vbridge[id] ?>>Add your comments</a>
</div>
<?php
}
##End Vbridge Replacement
?>
You can also now link authors usernames to their VB profile page. Wherever you see the code:
<?php the_author() ?>
You can replace that with something like:
<?php
if ($vbridge[id] > 0) {
?>
<a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $vbridge[thread_starter] ?>><?php the_author() ?></a>
<?php
}
else {
the_author();
}
?>
The Theme i use:
http://themes.blogpimp.de/index.php?...Pimp+WorldNews
I hope somebody can help me...