Site - www.eteknix.com
Example (scroll down to comments) - http://www.eteknix.com/news/win-a-xfx-radeon-hd5770-1gb-graphics-card-with-eteknix-com-and-xfx/
I have a website using Wordpress and a forum using vBulletin.
I recently added a bridge so that the comment system used is the one from the forum.
Now the issues i have are:
The code is:
Thanks,
Andy
Example (scroll down to comments) - http://www.eteknix.com/news/win-a-xfx-radeon-hd5770-1gb-graphics-card-with-eteknix-com-and-xfx/
I have a website using Wordpress and a forum using vBulletin.
I recently added a bridge so that the comment system used is the one from the forum.
Now the issues i have are:
- I want to add a quote button
- See screenshot to see the problem i have with quotes
- I only want it to display the 5 newest replies
- I also want the title "eTeknix Forum Comments to link to the thread, i tried the code below but it just popped up as http://www.eteknix.com/forums/showthread.php?p= so it was missing the thread id.
PHP:
<h3 id="comments"><a href="<?php echo get_option('vbb_VBURL') ?>/showthread.php?p=<?php echo $reply['postid'] ?>">eTeknix Forum Comments:</h3></a>

The code is:
PHP:
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die (__('Please do not load this page directly. Thanks!','eVid'));
if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.','eVid'); ?></p>
<?php
return;
}
?>
<!-- You can start editing here. -->
<?php
#### Vbridge Replacement code for comments
if (function_exists('Comment_Handler')) {
$vbridge = Comment_Handler($post->ID);
global $vbulletin;
}
if ($vbridge[id] > 0) {
?>
<div class="comments">
<?php
if(is_single()) {
if (is_array($vbridge[replies])) {
?>
<h3 id="comments">eTeknix Forum Comments:</h3>
<ol class="commentlist">
<?php
foreach ($vbridge[replies] as $reply) {
?>
<li style="" class="comment byuser comment-author- bypostauthor even thread-even depth-1" id="comment-<?php echo $reply['postid'] ?>">
<div id="div-comment-<?php echo $reply['postid'] ?>">
<div class="comment-author vcard">
<a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $reply['userid'] ?>><?php echo $reply['username'] ?></a>
<span class="says">says:</span>
</div>
<div class="comment-meta commentmetadata"><a href="<?php echo get_option('vbb_VBURL') ?>/showthread.php?p=<?php echo $reply['postid'] ?>"><?php echo vbdate($vbulletin->options['dateformat'],$reply['dateline']) . ' ' . vbdate($vbulletin->options['timeformat'],$reply['dateline']) ?></a></div>
<p style=""><?php echo $vbridge[vb_parser]->do_parse($reply[pagetext], false, true); ?></p>
</div>
</li>
<?php
}
?>
</ol>
<center><a href=<?php echo get_option('vbb_VBURL') ?>/newreply.php?do=newreply&noquote=1&t=<?php echo $vbridge[id] ?>><img src="http://www.eteknix.com/wp-content/uploads/2010/01/reply.gif"></a></center>
</div>
<?php
}
}
}
##End Vbridge Replacement
?>
<?php if ( have_comments() and ($vbridge[id] == '')) : ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<?php endif; // if you delete this the sky will fall on your head ?>
<div style="clear: both;"></div>
Thanks,
Andy