Hallo zusammen,
ich hab eine Problem mit meinen Passwortgeschützten Beiträgen. Und zwar folgendes:
Alles ist in Ordnung, mein Beitrag und die Kommentare sind verschlossen, bis ich dann Passwort eingebe. Nach Eingabe des Passwortes erscheint mein Artikel, wenn ich allerdings kommentieren möchte, kommt noch immer
ZitatAuch die Kommentare sind durch das Passwort geschützt.
Wieso kommt noch immer die Meldung, obwohl das Passwort ja bereits eingegeben wurde?
Mein comments.php sieht so aus:
ZitatAlles anzeigen<?php // Nicht l�schen oder bearbeiten!
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="nocomments"><?php _e("Auch die Kommentare sind durch das Passwort geschützt."); ?><p>
<?php
return;
}
}?>
<!-- Ab hier kannst du bearbeiten -->
<?php if ($comments) : ?>
<p>
<!-- Der folgende Abschnitt gibt deine Kommentare aus -->
<ul class="commentlist">
<?php foreach ($comments as $comment) : ?>
<li>
<table id="cmt" width="100%"><tr><td valign="top" width="20%" class="cmtinfo">
<b><?php comment_author_link() ?></b><br>
<?php comment_date('d M Y') ?> <?php comment_time() ?>
</td>
<td width="2%">
</td>
<td valign="top" class="comment"><?php comment_text() ?>
</td>
</tr></table>
</li>
<?php endforeach; ?>
</ul><?php else : ?>
<?php if ('open' == $post-> comment_status) : ?>
<?php else : // comments are closed ?>
<?php endif; ?><?php endif; ?>
<p><?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 : ?>
<!-- Dieser Abschnitt ist f�r das Formular -->
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?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="<?php _e('Log out of this account')
?>">Logout »</a></p><?php else : ?>
<p><input type="text" name="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name</small></label></p>
<p><input type="text" name="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email">
<small>E-Mail</small></label></p>
<p><input type="text" name="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p>
<?php endif; ?>
<!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
<p>
<textarea name="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="senden" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p><?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
Es wäre wirklich toll, wenn mir einer von euch helfen könnte :)
Danke,
romy