Using Memberslist in other addon

Adds complete user authorization to Roster

Moderator: mdeshane

Using Memberslist in other addon

Postby mdeshane » Sun Dec 16, 2007 11:17 am

I'm currently working on building the various user pages. I plan on having the guilds/realms/characters pages display all the user's guilds/realms/characters like when you view all guilds for a realm.
The problem I'm having with this is passing the array of guild_ids, realms, and member_ids to the memberslist preparedata function.

Should I just make a seperate set of functions like memberslist to display the data, or is there a way to pass the array data to memberslist and have it display the info?

So far I can only get it to display a single row. I'll keep playing with it but any help would be great.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Using Memberslist in other addon

Postby PleegWat » Sun Dec 16, 2007 5:31 pm

You can't really pass it an array of data. You need to build one query that returns all of the data you want in the table. Most likely this means joining roster-standard table with your account table.
I assume you store the account - character relation in a DB table?
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

Using Memberslist in other addon

Postby mdeshane » Mon Dec 17, 2007 12:43 am

Yes, the user_link table stores the user_id, guild_id, member_id, group_id, and server_name. I believe that is all the info I should need to make the query.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Using Memberslist in other addon

Postby mdeshane » Mon Dec 17, 2007 1:09 am

Woot! Using a series of left joins and using the memberslist, I successfully queried all characters for a given uid. I never really knew how to do all that LEFT/RIGHT JOIN stuff. But it's pretty handy to know... Thanks for sending me in the right direction Pleeg!
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Using Memberslist in other addon

Postby PleegWat » Mon Dec 17, 2007 5:23 am

You're welcome.

Nice to hear the memberslist library will be used by other addons as well. Let me know if you run into further trouble.
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 Accounts

Who is online

Users browsing this forum: No registered users and 0 guests

cron