My purpose install wp-recaptcha is to avoid spam comments on web, but it’s seems this plugins read error about the filter. When i reply comments from wordpress dashboard it always come to be spam.
Hmmmm…is there any other way?
My purpose install wp-recaptcha is to avoid spam comments on web, but it’s seems this plugins read error about the filter. When i reply comments from wordpress dashboard it always come to be spam.
Hmmmm…is there any other way?
if you care about valid HTML5, there is another small problem in the disqus plugin. It is using rel attributes in <span> tags (which is not allowed in HTML5) to mark these tags for the JavaScript code that later replaces them with the x comments and y reactions link.
Instead of rel attributes, a HTML5 conformal data-* attribute can be used. To fix this, do the following:
This will make HTML5 validators happy without affecting the functionality of the plugin.
Note: tested in most modern browsers (Internet Explorer 8 and up), Chrome, Firefox 4, Opera 10+11. I cannot guarantee that some older browsers may react strangely on data-* attributes. In theory, they shouldn’t, but you never know…
source: blog miranda
<?php
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT 10";
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
$output .= "\n<ul>";
foreach ($comments as $comment) {
$output .= "\n<li>".strip_tags($comment->comment_author)
.":" . "<a href=\"" . get_permalink($comment->ID) .
"#comment-" . $comment->comment_ID . "\" title=\"on " .
$comment->post_title . "\">" . strip_tags($comment->com_excerpt)
."</a></li>";
}
$output .= "\n</ul>";
$output .= $post_HTML;
echo $output;?>
<?php
$comments = get_comments('status=approve&number=5');
if ($comments) {
echo '<ul id="recent_comments">';
foreach ($comments as $comment) {
echo '<li><a href="'. get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID .'" title="'.$comment->comment_author .' | '.get_the_title($comment->comment_post_ID).'">' . get_avatar( $comment->comment_author_email, $img_w);
echo '<span class="recent_comment_name">' . $comment->comment_author . ': </span>';
$comment_string = $comment->comment_content;
$comment_excerpt = substr($comment_string,0,100);
echo $comment_excerpt;
if (strlen($comment_excerpt) > 99){
echo ' ...';
}
echo '</a></li>';
}
echo '</ul>';
}
else{
echo '<ul id="recent_comments">
<li>No Comments Yet</li>
</ul>';
}
?>