diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..9922d09 --- /dev/null +++ b/comments.php @@ -0,0 +1,42 @@ + + +
  • +
    +
    + +
    +
    + %s'), get_comment_author_link()); ?> + comment_approved == '0') : ?> + 你的评论正在审核,稍后会显示出来!
    + +
    + + '回复','depth' => $depth, 'max_depth' => $args['max_depth']))) ?> + +
  • + + + + diff --git a/functions.php b/functions.php index 179e20c..deb0f3e 100755 --- a/functions.php +++ b/functions.php @@ -128,6 +128,25 @@ function wpdx_paging_nav(){ } } +/* 获取文章的评论人数 */ +function zfunc_comments_users($postid=0,$which=0) { + $comments = get_comments('status=approve&type=comment&post_id='.$postid); //获取文章的所有评论 + if ($comments) { + $i=0; $j=0; $commentusers=array(); + foreach ($comments as $comment) { + ++$i; + if ($i==1) { $commentusers[] = $comment->comment_author_email; ++$j; } + if ( !in_array($comment->comment_author_email, $commentusers) ) { + $commentusers[] = $comment->comment_author_email; + ++$j; + } + } + $output = array($j,$i); + $which = ($which == 0) ? 0 : 1; + return $output[$which]; //返回评论人数 + } + return 0; //没有评论返回0 +} class FontAwesomeFour { diff --git a/index.php b/index.php index 0670450..697c0d1 100755 --- a/index.php +++ b/index.php @@ -11,8 +11,12 @@
    发表于 - - 阅读次数 ID); ?> + + 条评论 + + ID)->comment_count; ?>条评论 + + 阅读次数 ID); ?>
    @@ -41,14 +45,6 @@
    - diff --git a/option.php b/option.php index ba62fa9..cc2aa84 100755 --- a/option.php +++ b/option.php @@ -1,7 +1,7 @@ 0 && isset($_POST['next_settings']) ){ - $options = array ('author','avator','site_time','duoshuo_shortname','scheme'); + $options = array ('author','avator','site_time','comment_type','scheme', 'sohucs_appid', 'sohucs_conf'); foreach ( $options as $opt ){ delete_option ( 'next_'.$opt, $_POST[$opt] ); add_option ( 'next_'.$opt, $_POST[$opt] ); @@ -48,14 +48,27 @@ function next_settings(){?>
    -
    - - -
    +
    + + +
    + +
    + + + + +
    +