示例#1
0
<span class="continue"><?php 
        $pos = strpos($post->post_content, '<!--more-->');
        if ($pos == '') {
            ?>
<a class="nr_comm_spot" href="<?php 
            the_permalink();
            ?>
#comments"><?php 
            if (fb_get_comment_type_count('comment') == 1) {
                _e('1 Comment', 'lightword');
            } elseif ('open' != $post->comment_status) {
                _e('Comments Off', 'lightword');
            } elseif (fb_get_comment_type_count('comment') == 0) {
                _e('No Comments', 'lightword');
            } else {
                echo fb_get_comment_type_count('comment') . " " . __('Comments', 'lightword');
            }
            ?>
</a><?php 
        } else {
            ?>
<a title="<?php 
            _e('Read more about', 'lightword');
            ?>
 <?php 
            the_title();
            ?>
" href="<?php 
            the_permalink();
            ?>
#more-<?php 
示例#2
0
<?php

if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
    die('Please do not load this page directly. Thanks!');
}
if (post_password_required()) {
    echo '<p class="nocomments">';
    echo _e('This post is password protected. Enter the password to view comments.', 'lightword');
    echo '</p>';
    return;
}
$comments_nr = fb_get_comment_type_count('comment');
$trackbacks_nr = fb_get_comment_type_count('pings');
$oddcomment = 'alt ';
?>
<div id="tabsContainer">
<a href="#" class="tabs selected"><span><?php 
_e('Comments', 'lightword');
?>
 (<?php 
echo $comments_nr;
?>
)</span></a>
<a href="#" class="tabs"><span><?php 
_e('Trackbacks', 'lightword');
?>
 (<?php 
echo $trackbacks_nr;
?>
)</span></a>
<span class="subscribe_comments"><?php 
示例#3
0
function lw_show_sidebox()
{
    global $lw_sidebox_settings;
    switch ($lw_sidebox_settings) {
        case "Enabled":
        default:
            echo "<div class=\"comm_date\"><span class=\"data\"><span class=\"j\">" . get_the_time('j') . "</span>" . get_the_time('M/y') . "</span><span class=\"nr_comm\">";
            echo "<a class=\"nr_comm_spot\" href=\"" . get_permalink() . "#comments\">";
            if (!comments_open()) {
                _e('Off', 'lightword');
            } else {
                echo fb_get_comment_type_count('comment');
            }
            echo "</a></span></div>\n";
            break;
        case "Disabled":
            break;
        case "Show only in posts":
            if (is_single()) {
                echo "<div class=\"comm_date\"><span class=\"data\"><span class=\"j\">" . get_the_time('j') . "</span>" . get_the_time('M/y') . "</span><span class=\"nr_comm\">";
                echo "<a class=\"nr_comm_spot\" href=\"" . get_permalink() . "#comments\">";
                if (!comments_open()) {
                    _e('Off', 'lightword');
                } else {
                    echo fb_get_comment_type_count('comment') . "</a>";
                }
                echo "</span></div>\n";
            }
            break;
        case "Show only date":
            /* START ONLY DATE */
            echo "<div class=\"comm_date only_date\"><span class=\"data\"><span class=\"j\">" . get_the_time('j') . "</span>" . get_the_time('M/y') . "</span><span class=\"nr_comm\">";
            echo "</span></div>\n";
            /* END ONLY DATE */
            break;
        case "Last two options together":
            /* START  LAST TWO */
            if (is_single()) {
                echo "<div class=\"comm_date only_date\"><span class=\"data\"><span class=\"j\">" . get_the_time('j') . "</span>" . get_the_time('M/y') . "</span><span class=\"nr_comm\">";
                echo "</span></div>\n";
            }
            /* END LAST TWO */
            break;
    }
    // end switch
}