Topic: rank image problem

I have edited this method http://punbb.informer.com/forums/post/137898/#p137898
to work with my punbb 1.4. It's working perfectly but it shows stars based on postcount only.

I want to show 10 stars for admin group and 9 for moderator. How can i do this?