Richtig, soll ja auch nur eine Zwischenlösung bis zum nächsten Wordpress Release sein.
Beiträge von Treppenhausklatsch
-
-
Du lachst, aber die Log-Datei die ich zusätzlich erstelle sagt mir was anderes und das obwohl ich kein Antispam Plugin am laufen hab. Misteriös misteriös :mrgreen:
-
Nachdem mir gestern aufgefallen ist das in meinem Blog seit dem Update auf [COLOR=Red]Wordpress 2.0.4 [COLOR=Black]keine Trackbacks erscheinen hatte ich mir gestern dazu die betreffenden Beiträge im Forum angekuckt. Leider hat mich keiner der Lösungsvorschläge weitergebracht. Heute früh hab ich mir dann die wp-trackback.php, xmlrpc.php usw. vorgenommen und ne kleine Bugsuche veranstaltet. Die Methode funktioniert bei mir. Bleibt nur zu hoffen bei euch auch :mrgreen:
Die Permalinks sehen wie folgt aus:[/COLOR][/COLOR]
Die Trackbacks gebe ich mit
aus. So das die Trackback-Uri wie in der Standardeinstellung angezeigt wird:
Jetzt muss nur noch die Funktion wp_new_comment() in der comment-functions.php (im wp-includes Ordner) angepasst werden:
Die alte Funktion:
PHP
Alles anzeigenfunction wp_new_comment( $commentdata ) { $commentdata = apply_filters('preprocess_comment', $commentdata); $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; $commentdata['user_ID'] = (int) $commentdata['user_ID']; $commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR']; $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; $commentdata['comment_date'] = current_time('mysql'); $commentdata['comment_date_gmt'] = current_time('mysql', 1); $commentdata = wp_filter_comment($commentdata); $commentdata['comment_approved'] = wp_allow_comment($commentdata); $comment_ID = wp_insert_comment($commentdata); do_action('comment_post', $comment_ID, $commentdata['comment_approved']); if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching if ( '0' == $commentdata['comment_approved'] ) wp_notify_moderator($comment_ID); $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment if ( get_settings('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] ) wp_notify_postauthor($comment_ID, $commentdata['comment_type']); } return $comment_ID; }mit dieser ersetzen:
PHP
Alles anzeigenfunction wp_new_comment( $commentdata ) { $commentdata = apply_filters('preprocess_comment', $commentdata); $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; $commentdata['user_ID'] = (int) $commentdata['user_ID']; $commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR']; $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; $commentdata['comment_date'] = current_time('mysql'); $commentdata['comment_date_gmt'] = current_time('mysql', 1); $commentdata = wp_filter_comment($commentdata); if($commentdata["comment_type"]=="trackback"){ $commentdata['comment_approved'] = '0'; $comment_ID = wp_insert_comment($commentdata); }else{ $commentdata['comment_approved'] = wp_allow_comment($commentdata); $comment_ID = wp_insert_comment($commentdata); do_action('comment_post', $comment_ID, $commentdata['comment_approved']); if ( 'spam' !== $commentdata['comment_approved'] ) {// If it's spam save it silently for later crunching if ( '0' == $commentdata['comment_approved'] ) wp_notify_moderator($comment_ID); $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment if ( get_settings('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] ) wp_notify_postauthor($comment_ID, $commentdata['comment_type']); } return $comment_ID; } }Neu dazu gekommen ist eigentlich nur eine IF-Abfrage die die Überprüfung durch Wordpress umgeht und die Trackbacks als ungeprüft in die Datenbank einträgt.