Comment system

Soldato
Joined
29 Dec 2004
Posts
5,653
Location
Chatham, Kent
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:

  • 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>

bridgecomment.jpg


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
 
Just quickly.

Without looking at the code, the reason why your links don't work is that you are trying to link threads as posts. Your thread ID is 1710 and the POST ID (your opening post of that thread) is 1548. You need to find out what the class handle for the thread number is.

You would also have to go in to the class vbridge to change the number of posts it will return.

No idea about the quotes graphical blip, I only assume this is a conflicting CSS.


I can pull the class apart and try and help you fix a few of your problems if you would like, but I'm afraid there is nothing from that piece of code you have posted to sort out any of the problems you have above
 
After taking a look again, it messed up a lot of my site, so will revisit it again when i have the time to fiddle about and maybe hire someone to write out a solution where my site and forums will be integrated.

Main problem is the way the plugin works is very buggy and it moved my sidebar into the footer randomly on a couple of posts.

Andy
 
Back
Top Bottom