Hallo jottlieb,
sorry: Es handelt sich um das babble-Theme. Allerdings habe ich durch eine Änderung in der index.php den Kommentarzähler nach oben gezogen. Normalerweise wird die Kommentaranzahl unter den Beitrag geschrieben. Dort sieht es jetzt so aus:
<small>Autor: <?php the_author() ?> <?php edit_post_link('bearbeiten', ' | '); ?> - Kategorie: <?php the_category(', ') ?> - <?php comments_popup_link('0 Kommentare', '1 Kommentar', '% Kommentare'); ?></small>
Ein "comments off" lässt sich auch in der Datei nicht finden.
Die comments.php zeig ich auch gerne - vielleicht muss da ja nur ein Teil raus?
<?php if ( pings_open() ) : ?>
<h4>Trackback Uri kopieren</h4>
<pre>
<code class="klein"><?php trackback_url() ?></code>
</pre>
<?php endif; ?>
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Zugriff verweigert');
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>Zugriff verweigert<p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>
<?php if ($comments) : ?>
<h3><a name="comments"></a>Kommentare</h3>
<p>
<?php comments_number('Es liegen noch keine Kommentare vor', 'Sie finden hier 1 Kommentar ', 'Sie finden hier % Kommentare ' );?> zum Thema “<?php the_title(); ?>”
</p>
<ol id="kommentar">
<?php foreach ($comments as $comment) : ?>
<?php
global $comment;
if ( ($comment->comment_author_email == get_the_author_email()) && ($comment->user_id != 0) ) {
$isByAuthor = true;}
else {
$isByAuthor = false;
}
?>
<li class="<?php if($isByAuthor ) { echo "admin";} else { echo "user"; } ?>" id="comment-<?php comment_ID() ?>">
<cite><?php comment_author_link() ?></cite>
<?php if ($comment->comment_approved == '0') : ?>
<strong>Achtung: Der Kommentar muß erst noch freigegeben werden.</strong>
<?php endif; ?>
<small>
meinte am <?php comment_date('j. F Y') ?> um <?php comment_time('H:i') ?> Uhr<?php edit_comment_link('Bearbeiten','<strong>|</strong>',''); ?>
</small>
<?php comment_text() ?>
<!-- Die Anzeige der Kommentar-ID interssiert ja nun keinen...
<p class="next"><a href="#comment-<?php comment_ID() ?>" title="nächster Kommentar"> ID <?php comment_ID() ?></a></p>
-->
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<?php else : // comments are closed ?>
<p>Kommentare sind zu diesem Thema nicht möglich.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>
Du mußt <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">angemeldet</a> sein, um kommentieren zu können.
</p>
<?php else : ?>
<?php
//-------- Formularcheck beginn ---------------------//
// Variablen vorbereiten
if (isset($_POST['xname'])) $xname = $_POST['xname'];
if (isset($_POST['mail'])) $mail = $_POST['mail'];
if (isset($_POST['home'])) $home = $_POST['home'];
if (isset($_POST['text'])) $text = $_POST['text'];
// alles auf default setzen
if(isset($_POST['first'])) {
$mail = str_replace("+", "@", $mail);
$error = false;
$error1 = "";
$error2 = "";
$error3 = "";
$error4 = "";
$class1 = "";
$class2 = "";
$class3 = "";
//--------- Name leer
if ($req && ! $user_ID && !(strlen(trim($xname)))) {
$error1 = "<li>Bitte geben Sie einen <dfn>Namen</dfn> an.</li>";
$error = true;
$class1 = " class=\"error\"";
}
//--------- Link im Namensfeld
if (eregi("http://", $xname) or eregi("www.", $xname) or eregi("url", $xname)){
$error2 = "<li>Das Feld für den <dfn>Namen</dfn> enthält unerlaubten Code.</li>";
$error = true;
$class1 = " class=\"error\"";
}
//--------- E-Mail falsch
if ($req && ! $user_ID && !(eregi('^[a-z0-9_\.-]+@[a-z0-9_-]+\.[a-z0-9_\.-]+$',$mail))){
$error3 = "<li>Ihre <dfn>E-Mail-Adresse</dfn> fehlt oder ist fehlerhaft.</li>";
$error = true;
$class2 = " class=\"error\"";
}
//---------- Textfeld leer
$strip = strip_tags($text);
if (!(strlen(trim($strip)))){
$error4 = "<li>Sie haben keinen <dfn>Text</dfn> hinterlassen.</li>";
$error = true;
$class3 = " class=\"error\"";
}
//------------ Fehlerdialog
if ($error == true){
?>
<h3>
<a name="check"></a>Das Formular konnte nicht verschickt werden
</h3>
<p>Bitte überprüfen Sie nochmals folgende Angaben:</p>
<?php
echo "<ol>$error1$error2$error3$error4</ol>";
}
else {
//----------- Variablen zum Speichern vorbereiten
$xname = strip_tags($xname);
$text = wordwrap($text, 40, " ", 1);
$text = strip_tags($text);
$text = str_replace("\"", """, $text);
$text = stripslashes($text);
$comment_author = $xname;
$comment_author_email = $mail;
$comment_author_url = $home;
$comment = $text;
//----------- Daten jetzt an Wordpress senden
?>
<h3><a name="check"></a>Vielen Dank für Ihren Kommentar!</h3>
<p>Die Eingaben wurden geprüft und für richtig befunden.</p>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post">
<p>
<input type="hidden" name="author" value="<?php echo $comment_author; ?>" />
<input type="hidden" name="email" value="<?php echo $comment_author_email; ?>" />
<input type="hidden" name="url" value="<?php echo $comment_author_url; ?>" />
<input type="hidden" name="comment" value="<?php echo $comment; ?>" />
<input class="btn" title="fertig" name="submit" type="submit" id="submit" value="Kommentar jetzt anzeigen" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
</form>
<?php
}
}
//------------Formular nur anzeigen, wenn....
if(!isset($_POST['first']) or $error == true && !isset($_POST['submit'])) {
?>
<form action="<?php echo get_permalink(); ?>#check" method="post" id="comm">
<fieldset>
<legend>Was sagen Sie dazu?</legend>
<p>
<?php if ( $user_ID ) : ?>
<p>
Angemeldet als: <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a> » <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="von diesem Account abmelden">Abmelden</a>
</p>
<?php else : ?>
<label for="author">Name: <?php if ($req) echo "*"; ?></label>
<input<?php echo "$class1"; ?> type="text" name="xname" id="author" value="<?php echo "$xname"; ?>" />
<br />
<label for="email">E-Mail: <?php if ($req) echo "*"; ?></label>
<input<?php echo "$class2"; ?> type="text" name="mail" id="email" value="<?php echo "$mail"; ?>" />
<br />
<label for="url">Homepage:</label>
<input type="text" name="home" id="url" value="<?php echo "$home"; ?>" />
</p>
<?php endif; ?>
<?php do_action('comment_form', $post->ID); ?>
<p>
<?php
$xname = strip_tags($xname);
$text = wordwrap($text, 40, " ", 1);
$text = strip_tags($text);
$text = str_replace("\"", """, $text);
$text = stripslashes($text);
?>
<label class="nonlabel" for="t">Ihr Text</label>
<textarea<?php echo "$class3"; ?> name="text" id="t" cols="40" rows="7" onkeyup="ReloadTextDiv();"><?php echo "$text"; ?></textarea>
</p>
<p>
<input class="btn" title="Kommentar jetzt absenden" name="first" type="submit" id="submit" value="ab die Post" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
</fieldset>
</form>
<?php do_action('comment_form', $post->ID); ?>
<?php
}
?>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
Alles anzeigen