Hallo, ich habe auf meinem Blog, wegen vieler Spam-Kommentare in letzter Zeit, die Kommentarfunktion soweit gesperrt, dass jeder Kommi erst von mir fregegeben werden muss.
Soweit, so gut. Leider erhält der Leser, der einen Kommi schreibt, aber keinen Hinweis darauf.
Ich habe es getestet. Man schreibt einen Kommi, sendet ihn... und nichts passiert...
Kann man diese Hinweisfunktion: "Dein Kommentar erscheint nach Freigabe" irgendwo einstellen?
Kommentar mit Freigabe - Hinweis für Leser
-
-
- Gerade eben
- Anzeige
Hallo!
Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.
- ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
- ✔️ Deutsche Server & DSGVO-konform
- ✔️ Persönlicher Support (kein 0815-Ticket-System)
-
Kannst Du doch manuell ins entsprechende Template schreiben.
-
Dann muss ich mal jemanden Fragen, der sich damit auskennt... ich kann mit HTML und co nix anfangen.... Dachte da gäbe es ein "Knöpfchen"....
Danke trotzdem für die Info.... -
also im Template stehen die Einträge richtig drin.
-
Das ganze siet so aus:
Comments.php
PHP
Alles anzeigenif ( post_password_required() ) return; ?> <div id="comments" class="comments-area"> <?php // You can start editing here -- including this comment! ?> <?php if ( have_comments() ) : ?> <h2 class="comments-title"> <?php printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentytwelve' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?> </h2> <ol class="commentlist"> <?php wp_list_comments( array( 'callback' => 'twentytwelve_comment', 'style' => 'ol' ) ); ?> </ol><!-- .commentlist --> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav id="comment-nav-below" class="navigation" role="navigation"> <h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentytwelve' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentytwelve' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentytwelve' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <?php /* If there are no comments and comments are closed, let's leave a note. * But we only want the note on posts and pages that had comments in the first place. */ if ( ! comments_open() && get_comments_number() ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p> <?php endif; ?> <?php endif; // have_comments() ?> <?php comment_form(); ?> </div><!-- #comments .comments-area -->Comment-template.php
PHP<?php if ( '0' == $comment->comment_approved ) : ?> <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ) ?></em> <br /> <?php endif; ?>Aber es wird nichts angezeigt.
Ich habe eben mal in der comments.php eine foreach reingepackt, welche die Posts rendert.
Mit dem ergebniss das keine not approved Posts Iteriert werden weshalb wohl beim hohlen aus der DB nur die approved Posts geholt werden.PHPif ( $user_ID) { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, $user_ID)); } else if ( empty($comment_author) ) { $comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') ); } else { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email)); }Kenne mich leider mit PHP nicht aus und steige bei dem Chaotischen Wust nicht durch.
Ich hoffe einer von euch kan damit was anfangen und auf den schuldigen schließen.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!