[Plugin: pagebar] Commentbar under the Theme "German Newspaper"???
-
Hello,
have installed the theme “German Newspaper”. Since I have a lot of comments per page, I want to integrate the plugin in the comments.php. Tried it but it does not work. This is my comments.php where should I insert the CodeSnippet:
<?php
// Do not delete these lines
if ( isset($_SERVER[‘SCRIPT_FILENAME’]) && ‘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
echo ‘ <p class=”nocomments”>’ . __(‘This post is password protected. Enter the password to view comments.’, ‘german_newspaper’) . ‘</p>’ . “\n”;return;
}
}/* This variable is for alternating comment background */
$oddcomment = ‘class=”alt” ‘;// <!– You can start editing here. –>
if ( $comments )
{
echo ‘ <h3 id=”comments”>’;
comments_number(__(‘No Responses’, ‘german_newspaper’), __(‘One Response’, ‘german_newspaper’), __(‘% Responses’, ‘german_newspaper’));
echo ‘ ‘;
printf(__(‘to “%s”’, ‘german_newspaper’), the_title(”, ”, false));
echo ‘ </h3>’ . “\n\n”;
echo ‘ <ol class=”commentlist”>’ . “\n”;foreach ( $comments as $comment )
{
echo ‘ <li ‘ . $oddcomment . ‘id=”comment-‘ . get_comment_ID() . ‘”>’ . get_avatar( $comment, 32 ) . “\n”;
printf(__(‘<cite>%s</cite> Says:’, ‘german_newspaper’), get_comment_author_link());if ( $comment->comment_approved == ‘0’ )
{
echo ‘ ‘ . __(‘Your comment is awaiting moderation.’, ‘german_newspaper’) . ‘‘ . “\n”;
}echo ‘
‘ . “\n”;
echo ‘ <small class=”commentmetadata”>‘;
printf(__(‘%1$s at %2$s’, ‘german_newspaper’), get_comment_date(__(‘F jS, Y’, ‘german_newspaper’)), get_comment_time());
echo ‘ ‘;
edit_comment_link(__(‘edit’, ‘german_newspaper’),’ ‘,”);
echo ‘</small>’ . “\n\n\n”;comment_text();
echo “\n\n\n” . ‘ ‘ . “\n”;
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? ‘class=”alt” ‘ : ”;}
echo ” . “\n\n”;
}
else
{
// this is displayed if there are no comments so farif ( ‘open’ == $post->comment_status )
{
// <!– If comments are open, but there are no comments. –>
}
else
{
// comments are closed
// <!– If comments are closed. –>
echo ‘ <p class=”nocomments”>’ . __(‘Comments are closed.’, ‘german_newspaper’) . ‘</p>’ . “\n”;
}
}if ( ‘open’ == $post->comment_status )
{
echo ‘ <h3 id=”respond”>’ . __(‘Leave a Reply’, ‘german_newspaper’) . ‘</h3>’ . “\n”;if ( get_option(‘comment_registration’) && !$user_ID )
{
echo ‘ <p>’;
printf(__(‘You must be logged in to post a comment.’, ‘german_newspaper’), get_option(‘siteurl’) . ‘/wp-login.php?redirect_to=’ . urlencode(get_permalink()));
echo ‘ </p>’ . “\n”;
}
else
{
echo ‘ <form action=”‘ . get_option(‘siteurl’) . ‘/wp-comments-post.php” method=”post” id=”commentform”>’ . “\n”;if ( $user_ID )
{
echo ‘ <p>’;
printf(__(‘Logged in as %2$s.’, ‘german_newspaper’), get_option(‘siteurl’) . ‘/wp-admin/profile.php’, $user_identity);
echo ‘ ‘ . __(‘Log out »’, ‘german_newspaper’) . ‘</p>’ . “\n”;
}
else
{
echo ‘<p><input type=”text” name=”author” id=”author” value=”‘ . $comment_author . ‘” size=”22″ tabindex=”1″ />’ . “\n”;
echo ‘<label for=”author”><small>’ . __(‘Name’, ‘german_newspaper’) . ‘ ‘;if ( $req ) _e(“(required)”, “german_newspaper”);
echo ‘</small></label></p>’ . “\n”;
echo ‘<p><input type=”text” name=”email” id=”email” value=”‘ . $comment_author_email . ‘” size=”22″ tabindex=”2″ />’ . “\n”;
echo ‘<label for=”email”><small>’ . __(‘Mail (will not be published)’, ‘german_newspaper’) . ‘ ‘;
if ($req) _e(“(required)”, “german_newspaper”);echo ‘</small></label></p>’ . “\n”;
echo ‘<p><input type=”text” name=”url” id=”url” value=”‘ . $comment_author_url . ‘” size=”22″ tabindex=”3″ />’ . “\n”;
echo ‘<label for=”url”><small>’ . __(‘Website’, ‘german_newspaper’) . ‘</small></label></p>’ . “\n”;
}echo ‘<!–<p><small>’;
printf(__(‘XHTML: You can use these tags:%s
‘, ‘german_newspaper’), allowed_tags());
echo ‘</small></p>–>’ . “\n”;
echo ‘<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea></p>’ . “\n”;
echo ‘<p><input name=”submit” type=”submit” id=”comment_submit” tabindex=”5″ value=”‘ . __(‘Submit Comment’, ‘german_newspaper’) . ‘” />’ . “\n”;
echo ‘<input type=”hidden” name=”comment_post_ID” value=”‘ . $id . ‘” />’ . “\n”;
echo ‘</p>’ . “\n”;do_action(‘comment_form’, $post->ID);
echo ‘</form>’ . “\n\n”;
}
// If registration required and not logged in
}?>
Thanks for your help!!
- The topic ‘[Plugin: pagebar] Commentbar under the Theme "German Newspaper"???’ is closed to new replies.