Adding Columns To Roster List?

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

Adding Columns To Roster List?

Postby Feithar » Tue Feb 13, 2007 9:41 pm

I'm working on an addon that will keep track of alts based on which characters are uploaded together. Basically, if a bunch of characters are uploaded in a single CharacterProfiler.lua file, it flags them as alts of the highest level character in the file - I'll add capabilities to edit who's the main once everything else is working.

I have the code to store alt information in the database working, but would now like to add a column to the roster list to show who the main of any character is. I can do this with my addon by adding a FIELD[] variable, and respective display and divider functions, then including the memberslist.php file to do the actual work. This works, but when you click on the headers to change the sorting, it bombs out because it tried to reload the roster from addon.php rather than index.php. Then I thought perhaps I'm missing something, and there's some built in mechanism to allow addons to add additional columns to the main roster listing. My only other alternative at this point would be to modify WoWRoster's main index.php file, which is something I would rather like to avoid.

Anyway, if you want to see what I have so far to get a better idea of what I'm talking about, you can look at http://www.servantsofseagis.org/roster/addon.php?roster_addon_name=altmgr. Thanks!
User avatar
Feithar
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Sun Nov 26, 2006 7:58 am

Adding Columns To Roster List?

Postby PleegWat » Tue Feb 13, 2007 10:36 pm

There is no build in mechanism for this; the easiest way to solve it is to make a copy of memberslist.php into your addon's folder.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Adding Columns To Roster List?

Postby Feithar » Tue Feb 13, 2007 11:36 pm

Thanks. Are there any plans to add something like this in the next version? I think it would have the potential to add a lot of flexibility for future addons.
User avatar
Feithar
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Sun Nov 26, 2006 7:58 am

Adding Columns To Roster List?

Postby PleegWat » Wed Feb 14, 2007 9:08 am

Probably not in the 1x line. For R2 we'll have to see how things turn out.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm


Return to General Code Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron