Search the Community
Showing results for tags 'roster'.
-
Hello everyone! I am here to ask for some help with a certain script I have concocted. I run a moderately sized gaming community (using vBulletin 4.2.2) that supports multiple games, and as such we needed an automated roster to keep track of who plays what games. The code displays a list of games on the left, and the actual roster to the right. The default page is a "leadership roster" listing all the leaders. Game Roster pages include several things. Username, User Rank, IGN/Game Account Name, Join Date, and Last Active Date. You can sort by Join and Last Active Dates. There are also two types of members on the roster. Those who play the game as their "main game" and those who play it occasionally as an "other game". It is easy to get the main game members, since you can only have one, vBulletin saves it as text, so you can match it. The other games selector is saved bitwise, so we have to run a check for the game's location in the list against the user's saved bitwise in their profile to see if they play it. To do this, instead of manually coding the bit number, since everything is alphabetical, we simply assign each game a number, and do a a bitshift (1<<x) to get the proper bit (I've been told bitshift is much faster than using pow(2,x)). However, because it's specific too us, I have hard coded a lot of stuff, including mixing presentation code with functional code. The code works just fine for us, but I want to make it much easier so that other staff members besides me can update it easily and so the code is easier to manage. I hope I have given a good explanation of what the code does! To see the code in action, click http://www.zealotgaming.com/forum/pages.php?pageid=15 To see the code with syntax highlighted, here is the pastebin: http://pastebin.com/Nuanj4Ci I thank you all in advance for any help and advice you can give me. I am a novice and have been learning as I go to do this for my community.