Forums

tweetbacks on Sandbox theme (1 post)

  1. rosschapman
    Member
    Posted 3 years ago #

    i have followed the instructions very carefully. all that is outputting is the normal comment thread with the tweetbacks embedded therein. i'm pretty sure my code is correct, but pasting here anyway (full comments.php file). wondering if maybe the Sanbox theme has some functions that are messing with the plugin? i'm not really a php person. thanks!

    <div id="comments">
    
    <?php
    	$req = get_settings('require_name_email'); // Checks if fields are required. Thanks, Adam. ;-)
    	if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) )
    		die ( 'Please do not load this page directly. Thanks!' );
    	if ( ! empty($post->post_password) ) :
    		if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) :
    ?>
    				<div class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'sandbox') ?></div>
    			</div><!-- .comments -->
    <?php
    		return;
    	endif;
    endif;
    ?>
    
    				<div id="comments-list" class="comments">
    								<ol>
    
    <?php if ( have_comments() ) : ?>
    
     <?php if ( ! empty($comments_by_type['comment']) ) : ?>
        <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
    
      <ol class="commentlist">
    <?php wp_list_comments('type=comment'); ?>
      </ol>
      <?php endif; ?>
    
      <?php if ( ! empty($comments_by_type['tweetback']) ) : ?>
      <h3 id="tweetbacks">Tweetbacks</h3>
    
      <ol class="commentlist">
      <?php wp_list_comments('type=tweetback'); ?>
      </ol>
    <?php endif; ?>
    
    <?php if ( ! empty($comments_by_type['pings']) ) : ?>
      <h3 id="pings">Trackbacks/Pingbacks</h3>
    
      <ol class="commentlist">
      <?php wp_list_comments('type=pings'); ?>
      </ol>
    <?php endif; ?>
    
      <div class="navigation">
        <div class="alignleft"><?php previous_comments_link() ?></div>
        <div class="alignright"><?php next_comments_link() ?></div>
      </div>
    
    					</ol>
      <?php endif; /* end have comments */ ?>
      				</div><!-- #trackbacks-list .comments -->
    
    <?php if ( 'open' == $post->comment_status ) : ?>
    				<div id="respond">
    					<h3><?php _e('Post a Comment', 'sandbox') ?></h3>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    					<p id="login-req"><?php printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'sandbox'),
    					get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?>
    
    <?php else : ?>
    					<div class="formcontainer">
    						<form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post">
    
    <?php if ( $user_ID ) : ?>
    							<p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'sandbox'),
    								get_option('siteurl') . '/wp-admin/profile.php',
    								wp_specialchars($user_identity, true),
    								wp_logout_url() ) ?>
    
    <?php else : ?>
    
    							<p id="comment-notes"><?php _e('Your email is <em>never</em> published nor shared.', 'sandbox') ?> <?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'sandbox') ?>
    
    							<div class="form-label"><label for="author"><?php _e('Name', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div>
    							<div class="form-input"><input id="author" name="author" type="text" value="<?php echo $comment_author ?>" size="30" maxlength="20" tabindex="3" /></div>
    
    							<div class="form-label"><label for="email"><?php _e('Email', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div>
    							<div class="form-input"><input id="email" name="email" type="text" value="<?php echo $comment_author_email ?>" size="30" maxlength="50" tabindex="4" /></div>
    
    							<div class="form-label"><label for="url"><?php _e('Website', 'sandbox') ?></label></div>
    							<div class="form-input"><input id="url" name="url" type="text" value="<?php echo $comment_author_url ?>" size="30" maxlength="50" tabindex="5" /></div>
    
    <?php endif /* if ( $user_ID ) */ ?>
    
    							<div class="form-label"><label for="comment"><?php _e('Comment', 'sandbox') ?></label></div>
    							<div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div>
    
    							<div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php _e('Post Comment', 'sandbox') ?>" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div>
    
    							<?php do_action('comment_form', $post->ID); ?>
    
    						</form><!-- #commentform -->
    					</div><!-- .formcontainer -->
    <?php endif /* if ( get_option('comment_registration') && !$user_ID ) */ ?>
    
    				</div><!-- #respond -->
    <?php endif /* if ( 'open' == $post->comment_status ) */ ?>
    
    			</div><!-- #comments -->

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags