Hallo Leute,
ich habe mir nach der Anleitung von
Barbara ein Gästebuch in meinen Blog eingebaut. Prinzipiell funktioniert auch alles, aber ich bekomme bei der
Valdierung 4 Errors angezeigt und komme damit nicht so recht weiter... Leider habe ich von xhtml noch nicht so recht die Ahnung... Ist mein erster Versuch damit.
Alle anderen Seiten meines Blogs sind in Ordnung. daher vermute ich mal, dass der Fehler nur in der guestbook.php oder der comments-paged.php, beide im
themes/spirit/-Verzeichnis, liegen kann.
Hier mal die Dateien:
guestbook.php
PHP-Code:
<?php
/*
Template Name: Gästebuch
*/
?>
<?php get_header(); ?>
<div id="outerColumnContainer">
<div id="innerColumnContainer">
<div id="SOWrap">
<div id="middleColumn">
<div class="inside">
<!--- middle (posts) column content begin -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- post date and title -->
<h1 style="text-align: center" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
<!-- post -->
<?php the_content('Lies den Rest dieses Eintrags »'); ?>
<!-- post meta -->
<h5><?php if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template(); ?></h5>
<hr />
<?php endwhile; ?>
<div class="alignleft"><?php posts_nav_link('','','« Vorherige Einträge') ?></div>
<div class="alignright"><?php posts_nav_link('','Nächste Einträge »','') ?></div>
<div class="clear"></div>
<?php else : ?>
<h2 class="center">Nicht gefunden</h2>
<p class="center"><?php _e("Sorry, aber Du suchst gerade nach etwas, was hier nicht ist."); ?></p>
<?php endif; ?>
<!--- middle (main content) column content end -->
<hr class="hide"/>
</div> <!-- closes the inside div -->
</div> <!-- closes the middleColumn div -->
<div id="leftColumn">
<div class="inside">
<?php get_sidebar(); ?>
<hr class="hide" />
</div> <!-- closes the inside div -->
</div> <!-- closes the leftColumn div -->
<div class="clear mozclear"></div>
</div> <!-- closes the innerColumnContainer div -->
</div> <!-- closes the outerColumnContainer div -->
<?php get_footer(); ?>
comments-paged.php
PHP-Code:
<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?>
<div id="comments">
<h4> <?php comments_number(__('Keine Einträge'), __('1 Eintrag'), __('% Einträge')); ?>
<?php if ( comments_open() ) : ?>
<a href="#postcomment" title="<?php _e("Erstelle einen Eintrag"); ?>">»</a>
<?php endif; ?>
</h4>
</div>
<?php if ( $comments ) : ?>
<!-- Comment page numbers -->
<?php if ($paged_comments->pager->num_pages() > 1): ?>
<p class="comment-page-numbers"><?php _e("Seiten:"); ?> <?php paged_comments_print_pages(); ?></p>
<?php endif; ?>
<!-- End comment page numbers -->
<ol class="commentlist" style="list-style-type: none">
<?php foreach ($comments as $comment) : ?>
<?php $i++; /* For different background colors */
($i % 2 == 1) ? $bg_comment = 'class_comment1' : $bg_comment = 'class_comment2';
?>
<li id="comment-<?php comment_ID() ?>" class="<?php echo $bg_comment; ?>">
<div class="comment-number"><?php echo $comment_number; $comment_number += $comment_delta;?></div>
<cite><?php comment_author_link() ?></cite> schreibt:
<?php if ($comment->comment_approved == '0') : ?>
<em>Achtung: Der Kommentar muß erst noch freigegeben werden.</em>
<?php endif; ?>
<br />
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('l, d. F Y') ?> um <?php comment_time('H:i') ?> Uhr</a> <?php edit_comment_link('e','',''); ?></small>
<?php comment_text() ?>
</li>
<?php endforeach; ?>
</ol>
<!-- Comment page numbers -->
<?php if ($paged_comments->pager->num_pages() > 1): ?>
<p class="comment-page-numbers"><?php _e("Seiten:"); ?> <?php paged_comments_print_pages(); ?></p>
<?php endif; ?>
<!-- End comment page numbers -->
<?php endif; ?>
<br/>
<br/>
<?php if ( comments_open() ) : ?>
<h3 id="postcomment"><?php _e('Ins Gästebuch eintragen'); ?></h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Eingeloggt 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" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>eMail (wird nicht angezeigt) <?php if ($req) _e('(required)'); ?></small></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p>
<?php endif; ?>
<p>
<?php if (function_exists('lmbbox_comment_quicktags_display')) { lmbbox_comment_quicktags_display(); } ?>
<!-- <small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small> //-->
<textarea name="comment" id="comment" cols="100%" rows="12" tabindex="4"></textarea>
</p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Eintragen" /></p>
<p>
<br/>
<br/>
<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 else : // Comments are closed ?>
<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
<?php endif; ?>
Vielleicht hat ja jemand von Euch Lust und Zeit mir zu helfen??
Meine Dankbarkeit sei Euch gewiss!!
Danke
Michael