Brians Latest Comments 1.5.5
Like my plugins? Try my game!
If you like my plugins, maybe you'll like the popular game I made for PC and Mac (yes, shameless plug).
Try Deep Blue Sea - it's free (Download: PC | Mac)

This release should fix the Time Since bug that has been reported numerous times.
I also added a new feature:
Comment temperature
(thanks to Michael for that term).
The comments now fade between two colors depending on their age. It gives an impression of the relative ages of the messages.
This makes it easier to see if it's a single new comment on an old post that has floated the comment to the top or if there's general activity.
You can set the colors to fade between and the max number of days in which to fade from newest to oldest.
The default settings fade from a dark grey (newest) to a light grey (oldest) in 10 days.
Get it here: Brians Latest Comments.
Read the original release announcement for instructions.
Update 2005-11-13:
Fixed a few bugs and upgraded version number to 1.5.7.
Quick question:
Can you / How do you customize the colour of the darkest (newest), and possibly the lightest (oldest) comment?
Check the arguments for the function that displays the comments.
How very embarrassing of me. Still, you could write that somewhere other than inside the plugin… I usually don't look there (which is, I see now, a mistake).
As they used to say at my old job: RTFS!
Looks really good, can't wait to come home, install it, and play around with the settings… Thanks for the update.
Looks good. I just installed the old version 3 days ago, and was pretty impressed with it.
Keep up the good work.
I can't get it to fade the other way. Lovin it though.
Fixed.
Hmm, very nive, but I think that it would be even greater if it was posible to make the plugin fade the author's names from a light to a dark colour, instead of only from a dark to a light colour…
When I try to define a light colour before a dark one, all the author's names are coloured light… :(
Fixed. Thanks for reporting.
Great!
Thanks for fixing this lovely plugin :)
Just a little bug (maybe). On line 87 you use the variable
$titlein the a tag. However, that variable isn't defined until line 89. Seems like a simple oversight.Also,
$titleis never initialized in case$usetimesinceis false. Doesn't matter much if php always initializes a string to the empty string, but I just thought I'd point it out.Great plugin.
Thank you.
The first bug was a real bug, the second just an example of lazy php programming.
Both are now fixed and deployed (1.5.6) with a credit to you.
Been there done that (on both counts). Oh well, back to coding (or writing, whichever tickles my fancy).
Very nice, just one remark, you forgot to pad with zero's:
$r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT);$g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT);
$b_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT);
Thank you – inluded and credited.
on line 104 it should be
time_since($commenters[0]->unixdate)
instead of $comment->unixdate, as $comment wasn't defined.
I don't see the fade here..
Also, is it possible to paginate?
Not with my plugin. No idea with others.
Also, is it possible to paginate?
Hi Brian,
I am using your plugin and think that its wonderful. Now I am trying to put captcha into my comments field, like bot-check, http://www.blueeye.us/wordpress/index.php?p=5, but I don't seem to know where I should be inserting the php codes because your comments php replacement is different from the default comments. Any advise on this?
Hi Brian,
Your plugin doesn't work well with the new Wordpress 2.0. Is there anything you can do to fix it?
Great plugin.
During heavy load on site, this query appears as the slowest in mysql slow log.
when I
explain SELECT comment_post_ID, post_title
FROM (wp_comments LEFT JOIN wp_posts ON (comment_post_ID = ID))
WHERE comment_approved = '1'
AND wp_posts.post_status='publish'
AND comment_type'pingback'
AND comment_type'trackback'
ORDER BY comment_date DESC;
i get
+——————-+———+———————-+———+————-+——————————————-+———+————————+
| table | type | possible_keys | key | key_len | ref | rows | Extra |
+——————-+———+———————-+———+————-+——————————————-+———+————————+
| wp_comments | ALL | NULL | NULL | NULL | NULL | 9335 | Using filesort |
| wp_posts | ref | PRIMARY,ID | ID | 8 | wp_comments.comment_post_ID | 1 | |
+——————-+———+———————-+———+————-+——————————————-+———+————————+
anything i can do from an indexing perspective?
Hey, iice plug-in, but for some reason, I get this earror message saying:
Warning: Invalid argument supplied for foreach() in /homepages/37/d133040211/htdocs/wp-content/plugins/brianslatestcomments.php on line 83
So, what am I doing wrong or it is the plug-in?
It only appears when there are no comments. After a comment is posted it goes away. Most people just post a test comment and move on. However, i am using this on a corporate blog site and don't really want to post a dummy comment. Any advise on how to fix this?
Using this plugin with rolling archives k2. I have heard rumors that previous versions work better than the latest is it possible to get some archive code?
I wish it was, but I have been a complete ninny about version control on my wordpress plugins – so I don't have any old versions.
If anyone else reading this has an old version, please let me know.
Brian – I have a possible solution for the incorrect time_since information on some folks installation. Here's the scoop at http://getk2.com/forum/showthread.php?t=449
Thank you, this is included in the next release together with cavemonkeys fix.
Hey Brian, I'm not sure if this was brought to your attention yet about comments on pages, but I wanted them so I did it myself.
I modified line 74 from:
AND $tableposts.post_status='publish'to:
AND ($tableposts.post_status='publish' OR $tableposts.post_status='static')and that worked just fine. You might want to consider that for your next release, because I'm sure there are other people who want page's comments to display.
Heya, got to say, love your comments plugin. Though with the new widget support from Wordpress. Are you going to widgetize your latest comments plugin anytime soon?
In all honesty, the chance of me getting that done within the next couple of months is very small.
For your interest: I added full support for your great plugin into the Binary Blue theme suite as well as a theme-specific customizable Sidebar Widget for your plugin.
just activated the plugin in the back-office. what is the next step to see the comments in the blog?
trying it in 2.02
nothing shows up.
Amd I supposed to hack some file or something?
ric
Hi, I have a problem with this plugin and i think is because of the new version. It seems that my wordpress theme is tested with version 1.5.9 of "Brians Latest Comments" and I cant find it here… Can anybody help me, please ? Here is my email ionut.ro AT gmail.com
I have the same problem… HELP !
Love the plugin, works great.
Is there a way to EXCLUDE author names on password-protected posts? I know people without the password can't read the actual comments, but I'd like to find a way to hide the names of people commenting on those posts (other than making them comment anonymously).
Would the name be displayed correctly?
Test again
hi brian, firstly i would like to thank you for the great plugin. and i would also like to report a 'bug': when i name myself 'Anonymous', the name would not be displayed by the plugin. i don't know whether this concerns the plugin or wordpress itself, just to let you know. and by the way, the link you had written in line4(brianslatestcomments.php) was wrong.
It's a greate plug-in and I used it for a long time. But recently I update my wordpress to 2.1alpha2, it doesn't work. Can you help me?
I have modified the plug-in to work with Wordpress 2.1. How can I get in touch with you in order to get you the modifications?
scott
send me a copy please, thank you very much
my mail is linghuazh (at) gmail.com
Heads up. Not compatible with the next version of WP, 2.1:
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 'LEFT JOIN ON (comment_post_ID = ID)) WHERE comment_approved = '1' AND (.' at line 3]
SELECT comment_post_ID, post_title FROM ( LEFT JOIN ON (comment_post_ID = ID)) WHERE comment_approved = '1' AND (.post_status='publish' OR .post_status='static') AND comment_type'pingback' AND comment_type'trackback' ORDER BY comment_date DESC;
Looks like it's not getting the table prefix. I'll have a look to see if I can fix it on my end.
You have to globalize only $wpdb and replace all instances of $tableposts and $tablecomments with $wpdb->posts and $wpdb->comments.
the $table***** variables are deprecated and nuked in the new version of WP… there is going to be a lot of heartburn for plugin authors not aware of this, methinks. At least it's an easy fix.
I get a wordpress database error as well:
WordPress database error: [Access denied for user 'yscr_bb8KyN'@'localhost' to database 'blog74']
ALTER TABLE wp_comments ADD COLUMN comment_reply_ID INT NOT NULL DEFAULT 0;
is it ajax?
Hi this plugin is great, but it doesn't work if I'm using comments on a normal page (works great on posts though)
Thanks for your help,
Hi.
Wordpress 2.0.4
BTC 1.5.7
When I activate de pluging, all site turns blank, except admin site.
Please help :) Is very important for me this pluging
http://www.elcantabroperplejo.com
Have you considered making a Brian's Latest Posts
:)
testing…
I tried your plugin on my WP 2.0.4 site, and something was not working, I got SQL errors all over the place. After a little digging I figured out that it's the $tablecomments and $tableposts variables that are screwing everything up. When I added these two lines:
$tablecomments = $wpdb->comments;
$tableposts = $wpdb->posts;
everything worked like a charm. I haven't worked with earlier versions of Wordpress, so I don't know if this is a change in how to access the database or not, but it seems like it. Just thought I should mention it. Thanks for a great plugin otherwise =)
latina-anal
%
When I activate de pluging, all site turns blank, except admin site.
Please help :) Is very important for me this pluging
Also, is it possible to paginate?
some problems after installing under WP 2.0.3 ,... permalinks in latest news are not working fine. Anybody has solved it?
Abazza
Hey Brian, Awesome plugin, thanks :)
Hi this plugin is great, but it doesn’t work if I’m using comments on a normal page (works great on posts though)
Thanks for your help
some problems after installing under WP 2.0.3 ,... permalinks in latest news are not working fine. Anybody has solved it?
Abazza
[...] Brian has released a new version of his great Latest Comments Plugin, solving the issue with Time Since and adding a cool new [...]
Quick question:
Can you / How do you customize the colour of the darkest (newest), and possibly the lightest (oldest) comment?
Looks good. I just installed the old version 3 days ago, and was pretty impressed with it.
Keep up the good work.
[...] lugin, Positive Polarity, web design, wordpress. Brian released his latest installment of Brian’s Latest Comments. He ad [...]
How very embarrassing of me. Still, you could write that somewhere other than inside the plugin… I usually don’t look there (which is, I see now, a mistake).