Support » How-To and Troubleshooting » commenter’s uri

commenter’s uri

  • When people leave comments their uri is comprised of my blog uri and the one they enter if they don’t include “http://”. Is there a way to prevent this from happening?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Simplest solution: In wp-comments-post.php, right after you see the comment variables being assigned ($comment_author, $comment_author_email, etc), insert this:
    if (!preg_match('%^http://%', $comment_author_url)) {
    $comment_author_url = 'http://' . $comment_author_url;

    That doesn’t seem to work. Maybe I should mention that I’m using 1.3 with the Manji theme?

    That should make no difference. I just now set it up on my test system, which uses the most recent nightly, and it works.
    Did you make sure to insert it after the script assigns $comment_author_url from $_POST['url']?

    I did. All is well. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘commenter’s uri’ is closed to new replies.
Skip to toolbar