I have created a simple roster for my clan, showing the the member name, rank, and the awards the member has received. Now, since I have to edit the roster everytime some one gets a new rank, or changes the username, I'd appreciate it if some one could explain to me how to generate the username and the rank directly from the db, and then make it display in the roster. Also, it would be nice if some one could explain to me or point me to a documentation on how to make an admin interference for the roster, from which I can update the awards.
If you're talking about the rank associated with the user account, it is actually pretty easy.
The table ${prefix}_bbranks contains all the ranks, including IDs. The rank a specific user has is determined by 2 things:
1. Whether or not the user has a special rank assigned. Special ranks always go first. This field is in ${user_prefix}_users, named user_rank. The content of this field is a special rank in the ranks table.
2. The number of posts the user has. This users the ${user_prefix}_users table as well, but this time the field user_posts. If there is no special rank assigned, the user will be assigned the rank that most closely matches their post count.
I don't believe this information is cached, but you can't be too sure, so always double check!
Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
NetBSD 4.99.38 / Apache 2.2.6 / MySQL 5.0.45 / PHP 5.2.5 / DragonFly 9.1.2.1
HecklerOffline
Joined: Apr 22, 2007
Posts: 298
Location: California