Simple Alt Config Explanation

Combining the powers of AltMonitor and SortMembers in a sortable, alt collapsible, searchable members list
Includes an extensive API for use with other addons

Simple Alt Config Explanation

Postby skenagle » Tue Sep 23, 2008 11:00 pm

Can anyone post to me a simple Alt configuration for the memberlist setup.
After reading the Wikki and trying a bunch of stuff im more confused then when i started.

I want the member list to show the toons such as:

Main Toon (named Joe)
--alt toon (named fred)
--alt toon (named steve)
--alt toon
Main Toon
Main Toon
Main Toon

So assuming these are the names and heierarchy of main-alt. how do i configure my Alt section ..?

1. What does my regex look like?
2. what do my officer notes look like (assuming im pulling from officer notes)

Anyone who has got this to work i would appreciate it.

Thank you
Chris
Last edited by skenagle on Tue Sep 23, 2008 11:02 pm, edited 2 times in total.
User avatar
skenagle
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Fri Sep 19, 2008 2:24 am

Simple Alt Config Explanation

Postby PleegWat » Wed Sep 24, 2008 2:43 am

In the default configuration:

Officer note, on fred and steve:
ALT-Joe

Regex (default)

ALT-([\w]+)
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

Simple Alt Config Explanation

Postby skenagle » Wed Sep 24, 2008 6:24 am

Got it !!!

you are awesome

thank you
User avatar
skenagle
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Fri Sep 19, 2008 2:24 am

Simple Alt Config Explanation

Postby ScratchMonkey » Wed Nov 26, 2008 9:33 am

I think I have my config set up right but I'm not seeing my alts grouped to my main. (I've only set the note up for a few of my own alts and my main, for testing.) You can see the list here:

http://matureasskickers.net/wowroster/M ... list&a=g:2

I've temporarily got the officer note set public so you can see the text I have configured. Susicivus is my main, and alts include Sonata, Diminuendo, Concerto, Camillus. My regex:

/ALT-([\pL]+)/i

Other settings:

Use match no: 1
Main identifier: Main
No result: Main
Invalid result: Mainless Alt
Alt of Alt: Try to resolve
Update type: Guild

I'm using trunk@1921.
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Re: Simple Alt Config Explanation

Postby Calystos » Wed Nov 26, 2008 7:29 pm

Here are the alt/main settings I use and it works great (I'm using the very latest svn release)

In the Display settings:
[quote=Display]
Group Alts
---- "Open"
[/quote]

And in Main/Alt Relations:
[quote=Main/Alt Relations]
Regex
---- "/ALT-([\w]+)/i"
Apply on field
---- "Officer Note"
Use match no
---- "1"
Main identifier
---- "Main"
No result
---- "Main"
Invalid result
---- "Main"
Alt of Alt
---- "Set As Main"
Update type
---- "Guild"
[/quote]

Then in-game for any known alt chars I set their Officer Note to have "ALT-maincharname" (the officer note can have other text in if wished long as its ALT-name somewhere)
EG: Say I had an alt that was called Fred, and my main was Calystos, then for Fred's Officer Note I'd have "ALT-Calystos" in it. And optionally in Calystos' Officer Note I'd simply have "Main". Then next time I updated the roster (or one of the officers if its set to allow them to) it'd then show up Fred under Calystos.

Hope this helps ya, :)
Last edited by Calystos on Wed Nov 26, 2008 7:31 pm, edited 2 times in total.
User avatar
Calystos
UA/UU Developer
UA/UU Developer
 
Posts: 140
Joined: Tue Mar 04, 2008 10:57 am
Location: Earth

Simple Alt Config Explanation

Postby ScratchMonkey » Thu Nov 27, 2008 3:53 pm

I tried your settings (except for \pL instead of \w for Unicode letters) with no change. How can I "printf" from the code, so I can see what's really going on? Ideally to the syslog.
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Simple Alt Config Explanation

Postby ScratchMonkey » Thu Nov 27, 2008 4:00 pm

Ah, found the PHP error_log system:

http://us.php.net/errorfunc

(I'm more familiar with bash and Perl.)
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Simple Alt Config Explanation

Postby PleegWat » Thu Nov 27, 2008 4:31 pm

You can also use 'p=guild-memberslist-debug' for a list with mouseovers of the parsed regex.

It seems yours isn't matching anywhere.
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

Simple Alt Config Explanation

Postby ScratchMonkey » Thu Nov 27, 2008 5:36 pm

If the same Main's name is used for toons in two guilds, the addon may pick the wrong guild. Looks like this happens in the query at inc/update_hook.php line 251. There should be an extra WHERE subclause to match guild_id of the main and alt.
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Simple Alt Config Explanation

Postby ScratchMonkey » Thu Nov 27, 2008 5:54 pm

Patch:

Code: Select all
Index: update_hook.php
===================================================================
--- update_hook.php     (revision 1922)
+++ update_hook.php     (working copy)
@@ -40,6 +40,10 @@

        // Officer note check. Default true, because manual update bypasses the check.
        var $passedCheck=true;
+
+       // Guild ID to match mains to alts
+       var $guildId = 0;
+
        /**
         * Constructor
         *
@@ -88,9 +92,11 @@
                // Fetch guild-specific rules
                $this->data['rules'] = array();

+               $this->guildId = isset($guild['guild_id']) ? $guild['guild_id'] : '0';
+
                $query = "SELECT `config_name`, `config_value` "
                        . "FROM `" . $roster->db->table('config_guild',$this->data['basename']) . "` "
-                       . "WHERE `guild_id` = " . ( isset($guild['guild_id']) ? $guild['guild_id'] : '0' ) . ";";
+                       . "WHERE `guild_id` = " . $guildId . ";";

                $result = $roster->db->query($query);

@@ -251,7 +257,8 @@
                        $query =
                                "SELECT `members`.`member_id`, `members`.`name`".
                                " FROM `".$roster->db->table('members')."` as `members`".
-                               " WHERE `members`.`name`='" . addslashes($main_name) . "'";
+                               " WHERE `members`.`name`='" . addslashes($main_name) . "'".
+                               " AND `members`.`guild_id`=" . $this->guildId;

                        $result = $roster->db->query( $query );
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Simple Alt Config Explanation

Postby PleegWat » Thu Nov 27, 2008 8:17 pm

This is intentional. Within one server, there is no possible actual collision. There may be a cross-realm issue, but then there should be a realm filter instead.
Having your main in a different guild on the same server is valid for this addon, and will render correctly in the realm memberslist display.
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

Simple Alt Config Explanation

Postby ScratchMonkey » Fri Nov 28, 2008 2:25 pm

Ah, you're right, I need to match on realm, not guild. (I have the same toon name on two realms, managed by the same copy of WoWRoster.) Is the realm identifier available in the addon guild() hook, or how can I get access to that? (Off to look at the code....)
Image
User avatar
ScratchMonkey
WR.net Expert
WR.net Expert
 
Posts: 212
Joined: Wed Jul 05, 2006 4:32 pm
Location: San Pablo, CA

Re: Simple Alt Config Explanation

Postby silverscout » Sat Jun 27, 2009 1:07 am

HI,
I am posting under this one as I believe it is the best fit.

I have set my ALT relationships fine and the roster is doing it correctly except for the top.

•80: 54 (+3 Alts)
•70 - 79: 25 (+0 Alts)


that should be +12 Alts and less 80's.

I have taken all relationships out and tried it again. Yet even without the relationships it shows +3.

any ideas to what I am doing?

http://www.guildklopfen.com/roster/index.php
silverscout
WR.net Apprentice
WR.net Apprentice
 
Posts: 47
Joined: Tue Jul 04, 2006 2:47 pm

Re: Simple Alt Config Explanation

Postby zanix » Sat Jun 27, 2009 5:18 am

That counter in the menu doesn't use the alt config in memberslist
By default it detects a string in the player note
It is configurable from RosterCP->Main Settings->Defaults config
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to MembersList

Who is online

Users browsing this forum: No registered users and 0 guests

cron