Hallo, habe zwar shcon imm Forum gesucht, aber bin aus den Beiträgen auch nicht weiter schlau geworden.
Also ich habe versucht ein Gästebuch einzubinden nach diesem Tutorial:
http://www.zyblog.de/2005/11/11/gae…ugin-erstellen/
(Ich habe auch Rumwall und andere Versucht aber bin noch viel früher gescheitert)
Das derzeitige Ergebnis könnt ihr hier betrachten:
http://www.jphoenix.org/blog/?page_id=10
Irgendwie hat es nicht geklappt, dass die comments-topinput.php eingelesen wird, die ja dafür sorgen sollte, dass das Eingabefeld ganz oben steht.
Wenn ich das Plugin Reverse Comments aktiviere verschwinden die bisherigen Einträge.
Außerdem shceint die Sidebar nach rechts verrutscht, und ich weiß nicht, wie ich das im Code lösen soll.
Ich poste hier mal die beiden Templatedateien, vielleicht weiß ja einer ne Lösung *seufz*
gaestebuch.php:
<?php
/*
Template Name: Gaestebuch
*/
?>
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="page-info"><h2 class="page-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php /*Posted by <?php the_author(); ?>*/ ?><?php edit_post_link('(edit this)'); ?></div>
</div>
<?php if(function_exists('ro_comments_template')) ro_comments_template("/comments-topinput.php"); else comments_template(); ?>
<?php endwhile;endif; ?>
</div>
<div id="sidebar">
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
comment-topinput.php:
<?php // Do not delete these lines
if ('comments-topinput.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">Dieser Beitrag ist passwortgeschützt. Bitte gebe das Passwort an um die Kommentare zu sehen.<p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>
<!-- You can start editing here. -->
<?php if ('open' == $post-> comment_status) : ?>
<h3 id="respond">Hinterlasse eine Nachricht2</h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>Du musst <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">eingeloggt sein,</a> um eine Nachricht zu hinterlassen.</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>Mail (will not be published) <?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><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<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 ?>
Alles anzeigen
Wenn jemand eine Lösung weiß, wäre ich sehr froh darüber.
Grüße,
JP