All my comments show the admin gravatar image, instead of the comment_author_email gravatar image.
Any ideas?
Thanks,
A
function remove_comments_left($comment_author_email) {
global $wpdb;
global $default_comments_allowed;
$table_name = $wpdb->prefix . "gatornet";
$wpdb->query("INSERT INTO ".$table_name." (email, comments_left) VALUES ('".$comment_author_email."', '".$default_comments_allowed."' )");
}
add_action('comment_post', 'remove_comments_left');
Sorry, I posted this in the parent forum and didn’t realize until now that it was supposed to be here. I have created a function that I want to execute every time someone submits a comment. I want to add the author email to a specific table. Unfortunately it is pulling in $comment_author_email in the database as “2010”, “2011”, “2012” and with every comment submitted increasing the number. Any idea why or how to accomplish what I am trying to do would be very helpful! Thanks!
]]>function remove_comments_left($comment_author_email) {
global $wpdb;
global $default_comments_allowed;
$table_name = $wpdb->prefix . "gatornet";
$wpdb->query("INSERT INTO ".$table_name." (email, comments_left) VALUES ('".$comment_author_email."', '".$default_comments_allowed."' )");
}
add_action('comment_post', 'remove_comments_left');
I was trying to do some testing but this has me stumped. I am trying to add an email address to a database table when a comment is submitted. $comment_author_email is submitting “2010”, “2011”, “2012” in the database and so on. Any help to resolve this would definitely be helpful!
]]>a, the ideal solution:
– Get the email address of all OpenID users and add it into the comment_author_email field of the database.
b, the less-than-ideal, but still okay solution:
– Any user that has a WordPress account at that certain website will have their email address added to any comment made with the openid they have associated with their wordpress account.
Just a suggestion that would help sustain many commenting plugins such as Subscribe to Comments, Gravatar, Retaggr, and many many more.
]]>Here is the error message:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select comment_author_email from wp_comments where comment_ID =]
select count(*) as comments from wp_comments where comment_author_email = (select comment_author_email from wp_comments where comment_ID = 508)
I am using a theme I created but I am using the default comment template. My blog is hosted at 1and1.com which has PHP 4.4.7 and MySql 4.0.25. I am not sure why I get this error and or how to fix it so any help will be greatly appreciated.
]]>