Giving anonymous comments an author

Inspired by Morbus’s easy hack to give anonymous commenters a “[No Author]” name in the “Recent comments” box on the blog editing page, I decided to just name them “Anonymous” (which also gets rid of the rather strange “Posted by: on June 22, 2002” in the comment byline). In your mt directory, in lib/MT/App/, look for the line in sub post that reads “$comment->author($q->param(‘author’));” and change it to “$comment->author($q->param(‘author’) || ‘Anonymous’);”. Simple as that.


Comment by Phil Ringnalda #
2002-06-26 21:38:13

Updated for 2.2 : look for

$comment->author(remove_html(scalar $q->param('author')));

and change it to

$comment->author(remove_html(scalar $q->param('author')) || 'Anonymous');

Comment by Phil Ringnalda #
2002-10-08 22:00:37

Updated for 2.5 : same fix as 2.2.

Comment by Phil Ringnalda #
2003-02-13 23:33:26

Updated for 2.6: same fix as 2.2 and 2.5

Name (required)
E-mail (required - never shown publicly)
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.