ArmorySync 2.6 beta svn[234] for Roster 2.0 Beta

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 2:25 am

cool, thank you
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby tuigii » Mon Sep 17, 2007 3:04 am

This is an extract from a normal CP.lua upload :
Code: Select all
 array(
   'Nowwhatpt' =>  array(
      'Guild' =>  array(
         'Title' => 'Actif',
         'Name' => 'les potes âgés',
         'Rank' => 6
         ),
      'Mana' => 100,
      'Locale' => 'frFR',
...

The ['guild]['Rank'] info is visible here, as is the Rank Title info.

Or, the Armory extract gives :
Code: Select all
  array(
   'Nowwhat' =>  array(
      'Name' => 'Nowwhat',
      'Level' => 70,
      'Server' => 'Khaz Modan',
      'Guild' =>  array(
         'Name' => 'Papy team'
         ),
      'CPprovider' => 'rpgo',
...

There is NO ['guild]['Rank'] info - although on the Guilde page of a char, the info is there....
Of course, the ['guild]['Title'] isn't known neither in the Armory as I know of.

[edit] I think I mixing up things here : ['misc']['Rank'] is being used in the Talents tree : it has nothing to do with the Rank in a Guild :shock:

So, for the French frFR.php, ['misc']['Rank'] should be "Rang" :roll:

Code: Select all
$lang['misc']['Rank'] = "Rang";


I edit the post frFR.php above.

This part in /addons/memberslist/inc/update_hook.php, startingt from line 520 can't be executed - it pretends that ['Guild']['Rank'] is present and valid. When ripping the Armory, it isn't.
{Or, for each character, the Guild page should be consulted - where Rank info is shown on a multiple page : like Papy team Guild Rank Info

Code: Select all
// Decide upon a main: Highest leveled among those with highest guild rank
$maxrank = 11;
$maxlevel = 0;

foreach($this->chars as $char)
{
   if( $char['Guild']['Rank'] < $maxrank )
   {
      $maxrank = $char['Guild']['Rank'];
   }
}
foreach($this->chars as $member_id => $char)
{
   aprint($char);
   if( $char['Guild']['Rank'] == $maxrank && $char['Level'] > $maxlevel )
   {
      $maxlevel = $char['Level'];
      $mainid = $member_id;
   }
}


What about an isset( $char['Guild']['Rank']) arround it ?
Does this hurt roster handling ?
Last edited by tuigii on Mon Sep 17, 2007 3:20 am, edited 3 times in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby Equisetum » Mon Sep 17, 2007 3:12 am

I must be doing something wrong... I get:

No Guild given


but can't find anything in any settings.

public.rage-and-mana.com

?

I'm gonna love this addon btw!!
Last edited by Equisetum on Mon Sep 17, 2007 3:12 am, edited 1 time in total.
Image
User avatar
Equisetum
WR.net Apprentice
WR.net Apprentice
 
Posts: 65
Joined: Mon Jul 24, 2006 6:44 am

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 3:17 am

@tuigii
Yes your right, there is noch Rank Title Info in the guild xml file. I shipped around that an read the Rank and Rank Titles from the DB and put them in the array. This will not work if you haven't uploaded a cp.lua.

But.. Once you have synced all your chars with the armory they are all there. Cause the character-info xml file contains both. Rank and Rank Titel.
[edit]
bullshit ! nothing of that is in the character-info.xml. forget the last sentence
[/edit]


If have synced a frensh guild here right now but don't get any problems with guild ranks(even though there are others). What exactly ist the problem?
Last edited by poetter on Mon Sep 17, 2007 6:54 am, edited 1 time in total.
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 3:24 am

@Equisetum

The only way i know this message will apear is if you go directly from RosterCP to ArmorySync. If you do so the guild parameter is not set. If you choose another guildmenu button they all jump to the default guild. To prevent syncing the default guild exedently i prevented that case.

if you get that error when you browsed your memberlist an clicked on ArmorySync we have a problem.
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby Equisetum » Mon Sep 17, 2007 3:40 am

When starting at the main page (http://public.rage-and-mana.com) and clicking the Armory Sync button from the Realm Panel, it takes me to a page with no memberlist and no messages.

When starting at the main page (http://public.rage-and-mana.com) and clicking the Armory Sync button or the Armory Memberlist Sync button from the Guild Panel, I get the "No Guild given" message.

:(

Maybe I'm doing something wrong... where exactly does armory.class.php go? Maybe I have that in the wrong spot...

Thanks Poetter! You rock.

EDIT: Ok.. I figured something out. I had "Alternative urls" set to "On" in the rostercp, and after setting it to "Off" it gives me this:

Fatal error: Cannot instantiate non-existent class: datetime in /home/httpd/vhosts/rage-and-mana.com/subdomains/public/httpdocs/addons/armorysync/inc/armorysyncjob.class.php on line 411


So now I get to see if I can get my webhost to upgrade my php :P

Either way I wanted to let you know about this, Poetter. :)
Last edited by Equisetum on Mon Sep 17, 2007 3:59 am, edited 1 time in total.
Image
User avatar
Equisetum
WR.net Apprentice
WR.net Apprentice
 
Posts: 65
Joined: Mon Jul 24, 2006 6:44 am

Re: ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby tuigii » Mon Sep 17, 2007 3:53 am

poetter wrote:... What exactly ist the problem?


Well, this :
Image

When doing a char update, the ['Guild']['Rank'] info isn't present - update_hook.php, on line 529 start to yell !

I propose a
Code: Select all
      foreach($this->chars as $char)
      {
//         if ( isset($char['Guild']['Rank'])) // When using the Armory update, "$char['Guild']['Rank']" isn't defined !!
//         {
            if( $char['Guild']['Rank'] < $maxrank)
            {
               $maxrank = $char['Guild']['Rank'];
            }
//         }
      }

      foreach($this->chars as $member_id => $char)
      {
//         if (isset($char['Guild']['Rank'])) // When using the Armory update, "$char['Guild']['Rank']" isn't defined !!
//         {
            if( $char['Guild']['Rank'] == $maxrank && $char['Level'] > $maxlevel )
            {
               $maxlevel = $char['Level'];
               $mainid = $member_id;
            }
//         }
//         else
//         {
//            if ($char['Level'] > $maxlevel)
//            {
//               $maxlevel = $char['Level'];
//               $mainid = $member_id;
//         }
//         }   
      }



Just remove the starting // and the PHP error are gone (logic).

I saw that a Guild Armory update DOES take all the rank info for every character.
So, it is possible to obtain it (the Rank info) from the Armory :D
Last edited by tuigii on Mon Sep 17, 2007 3:56 am, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Re: ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 3:59 am

Equisetum wrote:... where exactly does armory.class.php go? Maybe I have that in the wrong spot...


This file belongs to the lib directory. Just overwrite the existing one. I looked at your page, but to test i would need your passwords.
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby Subxero » Mon Sep 17, 2007 4:09 am

Please use urldecode(trim(stripslashes( )))
on all $_POST['server']

Because the servers with apostrophe will not exist ever.

Like Zul'jin

For the php4 problem with timedate

Try

function newDate($format, $timestamp, $tz) {
if (!empty($timestamp)) {
$offset = (60 * 60) * ($tz / 100); // Seconds from GMT
$timestamp = $timestamp + $offset;
} else {
$timestamp = 0;
}
return gmdate($format, $timestamp);
}


Thanx and good job!
Last edited by Subxero on Mon Sep 17, 2007 4:20 am, edited 1 time in total.
Subxero - Priest 70 Holy - Asphelt Knight Officer - Zul'jin Horde.
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 4:31 am

@ tuigii

Ah now i know what your talking about. Was wondering why i dont get this errors.

The problem is
Code: Select all
$this->data['config']['update_type'


Where can i enable this type? The code is not processed with my setting, but can't find the switch for it.

And yes. There are only two ways to get around this. First one is to set rank to standard text as in the armory like "rank1" "rank2", ... I think this would be better than nothing.

The other one is to ask pleegwat to implement your changes. I think a combination of both will be nice, so that we have stadard text for non cp.lua uploaders and orignal text for cp.lua uploaders.
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby tuigii » Mon Sep 17, 2007 5:07 am

I'll give you a hint :
Code: Select all
$lang['admin']['update_type']   = 'Update type|Specify on which trigger types to update main/alt relations.'


Found in the /addons/memberlist/locale/usUS.php, last line :wink:
It the Alt/Main relation update type.
I have this thing set on 'both' (might be the value '3' = %0011).
%0001 = Char update
%0010 = Guild update
%0011 = Both update

When set to Guild only, no more errors :D
Last edited by tuigii on Mon Sep 17, 2007 5:15 am, edited 2 times in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby poetter » Mon Sep 17, 2007 5:11 am

@Subxero
Good hint thx. I will change that
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby tuigii » Mon Sep 17, 2007 5:24 am

Just so everybody knows where we talk about :

Image

It rocks
:D
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby Adric » Mon Sep 17, 2007 5:41 am

ok, i have a question... I would imagine that since using this requires a password, i am guessing that only an admin would be able to use this... would it be easier to just have this be a utility scope addon?
User avatar
Adric
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 61
Joined: Wed Jul 05, 2006 7:52 am

ArmorySync 2.6 beta svn[221] for Roster 2.0 Beta

Postby vblars » Mon Sep 17, 2007 5:45 am

date_create and other DateTime related functions are included by default only in PHP versions equal and greater than 5.2.

In PHP 5.1.2 this functionality is marked to be experimental and has to be enabled at compile time.

Found this on php website
Maybe it's why some people has problems whit it because I'm using php ver. 5.1.2 and it doesn't like DateTime line. :?
User avatar
vblars
WR.net Apprentice
WR.net Apprentice
 
Posts: 50
Joined: Tue Jul 04, 2006 1:52 pm

PreviousNext

Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 1 guest

cron