Hey ihr
also ich will im k2 theme die alternierenden kommentare einsetzen leider hab ich hier nichts zu diesem theme gefunden.
hier ist mal die comment.php
PHP
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p class="center"><?php _e('This post is password protected. Enter the password to view comments.','k2'); ?><p>
<?php return; } }
/* Function for seperating comments from track- and pingbacks. */
function k2_comment_type_detection($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
global $comment;
if (preg_match('|trackback|', $comment->comment_type))
return $trackbacktxt;
elseif (preg_match('|pingback|', $comment->comment_type))
return $pingbacktxt;
else
return $commenttxt;
}
$templatedir = get_bloginfo('template_directory');
?>
<!-- You can start editing here. -->
<?php if (($comments) or ('open' == $post-> comment_status)) { ?>
<hr />
<div class="comments" id="comments">
<h4><a href="#comments"><?php comments_number(__('No Responses','k2'), __('One Response','k2'), __('% Responses','k2'));?> <?php _e('to','k2'); ?> “<?php the_title(); ?>” </a></h4>
<div class="metalinks">
<span class="commentsrsslink"><?php comments_rss_link(__('Feed for this Entry','k2')); ?></span>
<?php if ('open' == $post-> ping_status) { ?><span class="trackbacklink"><a href="<?php trackback_url() ?>" title="<?php _e('Copy this URI to trackback this entry.','k2'); ?>"><?php _e('Trackback Address','k2'); ?></a></span><?php } ?>
</div>
<ol class="commentlist" id="commentlist">
<?php if ($comments) { ?>
<?php $count_pings = 1; foreach ($comments as $comment) {
if (k2_comment_type_detection() == "Comment") { ?>
<li class="<?php /* Style differently if comment author is blog author */ if ($comment->comment_author_email == get_the_author_email()) { echo 'authorcomment'; } ?> item" id="comment-<?php comment_ID() ?>">
<?php if (function_exists('gravatar')) { ?><a href="http://www.gravatar.com/" title="<?php _e('What is this?','k2'); ?>"><img src="<?php gravatar("X", 32, ""); ?>" class="gravatar" alt="<?php _e('Gravatar Icon','k2'); ?>" /></a><?php } ?>
<a href="#comment-<?php comment_ID() ?>" class="counter" title="<?php _e('Permanent Link to this Comment','k2'); ?>"><?php echo $count_pings; $count_pings++; ?></a>
<span class="commentauthor" style="font-weight: bold;"><?php comment_author_link() ?></span>
<?php if ( $user_ID ) { edit_comment_link('<img src="'.get_bloginfo(template_directory).'/images/pencil.png" alt="'.__('Edit Link','k2').'" />','<span class="commentseditlink">','</span>'); } ?>
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title="<?php if (function_exists('time_since')) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?><?php _e('Permalink to Comment','k2'); ?><?php } ?>"><?php comment_date('j. M Y') ?> <?php _e('at','k2'); ?> <?php comment_time() ?></a></small>
<div class="itemtext">
<?php comment_text() ?>
</div>
<?php if ($comment->comment_approved == '0') : ?>
<p class="alert"><strong><?php _e('Your comment is awaiting moderation.','k2'); ?></strong></p>
<?php endif; ?>
</li>
<?php } } /* end for each comment */ ?>
</ol>
<?php $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' AND comment_type!= '' ORDER BY comment_date"); ?>
Alles anzeigen
die verwirrt mich nur noch
hier noch der link zu der site Willkommen at