View Single Post
  #747  
Old 08-14-2009, 05:18 PM
MOGmartin MOGmartin is offline
 
Join Date: Feb 2008
Location: London
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

same problem as darry11 above me:

BUT - Im using a highly customised template, Ive inserted the code in seemingly the right place, but then the other single line snippets I have NO idea where to put, because the stuff that Im looking for to replace just doesnt exist!

my code currently looks like this:

PHP Code:
<?php
    
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
        die (
'Please do not load this page directly. Thanks!');
?>

<div id="comments">
    <div id="commentlist">
<?php
    
if ( !empty($post->post_password) ) {
        if ( 
$_COOKIE['wp-postpass_' COOKIEHASH] != $post->post_password ) {
        return;
        }
    }
<?
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])) {
?>
<br /><br />
<h3 id="comments">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">
<img src="<?php echo get_option('vbb_VBURL'?>/image.php?u=<?php echo $reply['userid'?>&amp;dateline=<?php echo TIMENOW ?>" alt="<?php echo $reply['username'?>'s Avatar" class="avatar avatar-32 photo avatar-default" width="32" height="32">

        <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], falsetrue); ?></p>

        </div>
</li>

<?php
            
}
?>

</ol>

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

if ($comments) {
    $ping_count = $comment_count = 0;
    foreach ($comments as $comment){
        if(get_comment_type() == "comment"){ ?>
        <div class="index-comment comment">
            <div class="ic-avatar"><?php echo get_avatar(get_comment_author_email(), '37'); ?></div>
            <div class="ic-text">
                <div class="ic-meta ic-author"><?php echo get_comment_author_link(); ?></div>
                <div class="ic-content"><?php comment_text() ?></div>
                <div class="ic-meta ic-date"><?php echo get_comment_date('j F y'); ?> at <?php echo get_comment_date('H:i'); ?></div>
            </div>
        </div>
<?php    $comment_count++;
        } else { 
?>
        <div class="index-comment">
            <a name="#comment-<?php comment_ID() ?>">&nbsp;</a>
            <div class="ic-text nofloat">
                <div class="ic-meta"><?php echo get_comment_author_link(); ?> at <?php echo get_comment_date('H:i'); ?> on <?php echo get_comment_date('j F Y'); ?></div>
                <div><?php comment_text() ?></div>
            </div>
        </div>
<?php     $ping_count++;
        }
    }
}
?>
    </div>
    <span id="respond"></span>
    <?php if($post->comment_status == 'open' && get_option('slf_ajax') == && ($comment_count $ping_count) != 0) { ?>
        <div class="index-comment"><textarea class="respondtext single">Write a comment..</textarea></div><?php 
    
?>
    <div id="comment_form" class="index-comment" style="display: none">
    <?php if($post->comment_status != 'open') { ?>
        Comment form currently closed..
    <?php } else { ?>
        <form id="commentform" action="<?php bloginfo('wpurl'?>/wp-comments-post.php" method="post">
        <?php if($user_ID) { ?>
            <div class="form_login ic-avatar">
                <?php $user_email $wpdb->get_var("select user_email from $wpdb->users where ID = '$user_ID'"); ?>
                <?php echo get_avatar($user_email'37'); ?>
            </div>
        <?php } else { ?>
            <div class="form_input">
                <input id="author" name="author" type="text" class="focus" />
                <label for="author">Name</label>
            </div>
            <div class="form_input">
                <input id="email" name="email" type="text" />
                <label for="email">Email</label>
            </div>
            <div class="form_input">
                <input id="url" name="url" type="text" />
                <label for="url">Website</label>
            </div>
        <?php ?>
            <div class="form_comment">
                <textarea name="comment" class="focus <?php if($user_ID) { echo "commenttextright"; } ?>"></textarea>
            </div>
            <div class="form_submit<?php if ($user_ID) { echo "_right"; } ?>">
                <input type="submit" name="submit" value="Comment" class="submit" />
            </div>
            <input type="hidden" name="comment_post_ID" value="<?php echo $id?>" />
        </form>
    <?php ?>
    </div>
</div>
Any ideas where I need to put the extra bits in to get the comment engine working?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01433 seconds
  • Memory Usage 1,860KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete