I'm sure there's a way integrate this with the CP like the stars hack, but thats something that I don't think I'd really need since this works fine for me and I'll probably never change rank images anyway. But if someone wants to make a more advanced version, go for it!
BTW, if anyone wants to give mods, admins and supermods the highest rank or a special rank no matter what their post count is, you could just add something like this:
Code:
if (($post[usergroupid] ==5) || ($post[usergroupid] ==6) || ($post[usergroupid] ==7)) {
$rank = "<img src=\"http://www.yoursite.com/forums/images/specialrank.gif\">";
}