Fixes for Version 253

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

Moderators: Ulminia, poetter

Fixes for Version 253

Postby nightfighter » Sat Sep 08, 2007 3:16 am

I found an easy way to fix the timeout issue. Like most of you, I have no control of how long a script can run so I changed the script to stop when it got too long a run.

I added this to the bottom of my config.php file:
Code: Select all
$addon_conf['ArmorySync']['Timeout'] = 45; //This is the maximum number of seconds we will try to get stuff from the armory.


In functions.synch.php I changed the code in synchPlayers to this:
Code: Select all
function synchPlayers($realm, $players) {
   global $wowdb, $roster_conf, $addon_conf;
   
   print $wowdb->getMessages();
   $wowdb->resetMessages();
   
   if (empty($realm)) {
      $realm = $roster_conf['server_name'];
   }
   
   if (empty($players) || !is_array($players)) {
      //Throw Error
      print "CRITICAL ERROR: No Player Given or Empty Array.<br>\n";
      return;
   }
   
   $startTime = time();
   foreach($players as $player) {
      if ((time() - $startTime) <= $addon_conf['ArmorySync']['Timeout'])
      {
         $playerStartTime = time();
         
         synchPlayer(null, $player, false);
         
         print $player . " synched: " . (time() - $playerStartTime) . " seconds.  Total runtime: " . (time() - $startTime) . " seconds.<br>\n";
         flush();
      }
   }
   
   displayMessages($wowdb->getMessages());
   displayErrors($wowdb->getErrors());
}


Basically just check to see if I have gone over the timeout limit and stop. Might be a better way to code it, but this works.
User avatar
nightfighter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 169
Joined: Wed Jul 05, 2006 11:25 pm
Location: Boise, Idaho, USA

Re: Fixes for Version 253

Postby poetter » Sat Sep 08, 2007 5:42 am

@avatar_bc : What language are you using? Did you edit localization.php? Did you comment in your locale in talents.php?
Last edited by poetter on Sat Sep 08, 2007 6:10 am, edited 1 time in total.
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Fixes for Version 253

Postby poetter » Sat Sep 08, 2007 6:14 am

@nightfighter: This function isn't used by the fixed version anymore, so your changes would do nothing to armorysync_253_fixes_3.
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Fixes for Version 253

Postby delirium » Sun Sep 09, 2007 8:15 pm

avatar_bc wrote:
benzo wrote:Dossent update Talents ad all


Yeah I am getting the same problem too. No images-just how many points have been spent and blank tab w/ blac background. Is there an update or fix for this that I've missed?


Just remove the /* */ around the talent list of the language you are using in talents.php (and remove the unused language's if you like)
Made the same mistake :)
delirium
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Sat Jul 08, 2006 9:58 pm

Fixes for Version 253

Postby r3plica » Tue Sep 11, 2007 11:15 pm

ok really strange things happening here.
At first there were no Skills or Reputations, until I found this thread and now that is sorted, but the talents are not showing.
I have followed your steps, but I still get a blank pane.

Another thing that is not working is when I sync with wow armory, it just does one char and then goes back to the index page, without going through all the members.
I have to physically press the button for each member in my guild (which is alot).
Has anyone found a fix for this.
r3plica
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Jul 21, 2006 7:49 pm

Re: Fixes for Version 253

Postby poetter » Tue Sep 11, 2007 11:22 pm

That has to do with the option IsWoWRosterDF.

If you are using DragonFly and WoWRosterDF you have to set this option to 1, otherwise choose 0.

The result is a diffrent url that is called from the javascript.
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Fixes for Version 253

Postby r3plica » Tue Sep 11, 2007 11:46 pm

yeah i found it in this topic, i must have just missed it.
Last edited by r3plica on Tue Sep 11, 2007 11:51 pm, edited 1 time in total.
r3plica
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Jul 21, 2006 7:49 pm

Re: Fixes for Version 253

Postby Aesthier » Wed Sep 12, 2007 6:04 am

Downloaded the "newest" 253_3.zip and for some reason I am still not able to see the skills or Rep.

Looked through the posts above and didn't see where the fix is.

I am feeling really stupid.
Aesthier
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Thu Dec 14, 2006 2:27 am

Fixes for Version 253

Postby robobeat » Wed Sep 12, 2007 7:28 am

hey everyone,

I am using the last fix, and when I click on the armorysync link I get the following msg:

Code: Select all
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4980736 bytes) in /home/succession-gunet/HTML/forums/dd/roster/addons/ArmorySynch/talents.php on line 7131


anyone an idea?

I didnt had this error using the original armorysync one, it then just took a long while before it came up and then got a whole list of errors saying invalid argument. When I then run debug 2 it does show me that he picks up the data, but he just doesnt parse it.

the roster: www.dominatiodraconis.co.nr/roster


//edit:

hmm, I now see that he did update something, like gear, talents, stats, but not skills, rep, pvp. he probably got this from the old armorysync I used.
Last edited by robobeat on Wed Sep 12, 2007 7:35 am, edited 1 time in total.
robobeat
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Fri Jul 07, 2006 7:59 am

Re: Fixes for Version 253

Postby poetter » Wed Sep 12, 2007 3:36 pm

@robobeat: Did you comment out the languages you don't need? If so, that might be an option in php.ini. Don't know it yet, but will look for if you need it.
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Fixes for Version 253

Postby emorr339 » Thu Sep 13, 2007 1:12 am

Hi all,
Great addon.

But I have been having a problem updating. I am using Roster 1.7.3 and updated all the fixes. When I try to update it says :


Non-Critical Error: Incomplete Data for Outtogetya. Player has probably not updated in awhile.
Scanned Player: Outtogetya
Prog. BAR
Next Player : Spellbreaker

then it goes back to the roster index page automatically without updating anyone and without any error messeges.

I also don't see a php.ini file anywhere :(

My conf.php :

Code: Select all
<?php

if (!defined('ROSTER_INSTALLED')) {
   exit('Detected invalid access to this file!');
}

//Configuration
$addon_conf['ArmorySync']['Host'] = "www.wowarmory.com"; //Americans use "www.wowarmory.com", European players use: "eu.wowarmory.com"
$addon_conf['ArmorySync']['MinLevel'] = 1; //The minimum level to be updated
$addon_conf['ArmorySync']['SynchCutoffTime'] = 15600; //Time, in minutes.  All players who have not updated in the last (24) hours will be updated.
$addon_conf['ArmorySync']['UseCurl'] = false; //Set this to false if you want to use the original FileSocket function.
$addon_conf['ArmorySync']['DebugLevel'] = 0; //0 = no debug messages, 1 = some debug messages, 2 = verbose debug messages
$addon_conf['ArmorySync']['UpdateRoster'] = true; //Wether or not to update Roster.  Useful if you're just debugging.
$addon_conf['ArmorySync']['Locale'] = $roster_conf['roster_lang']; //The language used, but default it is the language that roster is configured to.
$addon_conf['ArmorySync']['ArmoryLocale'] = strtolower(substr($addon_conf['ArmorySync']['Locale'], 0, 2)) . "_" . strtolower(substr($addon_conf['ArmorySync']['Locale'], 2, 2)); //The Locale that armory is expecting, in the format of lowercase_lowercase (ie en_us or de_de).
$addon_conf['ArmorySync']['MemberSorting'] = "members.last_online DESC"; //alternatives are "members.update_time DESC" to use the last time the member was updated
$addon_conf['ArmorySync']['ServerMonth'] = array("January","February","March","April","May","June","July","August","September","October","November","December"); //just a list of the month names for the server.  Change this to whatever language necessary.
$addon_conf['ArmorySync']['DateUpdatedFormat'] = "%m/%d/%y %H:%i:%s"; //Don't touch this!!! As i can see the time format is always set as it is set here
$addon_conf['ArmorySync']['IsWoWRosterDF'] = 0; //WoWRosterDF Users want this to be 1
$addon_conf['ArmorySync']['IsMySQLLower411'] = 0; //Users of MySQL Version lower than 4.1.1 want thi sto be 1

?>


My Roster Link

Thanks a million
Last edited by emorr339 on Thu Sep 13, 2007 1:14 am, edited 1 time in total.
emorr339
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Sat Sep 02, 2006 7:49 am

Fixes for Version 253

Postby emorr339 » Thu Sep 13, 2007 1:19 am

EDIT : Looks like I am timing out too fast. it's updating one member at a time. But I don't see a php.ini file anywhere so I can change the update time.

Thanks
emorr339
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Sat Sep 02, 2006 7:49 am

Fixes for Version 253

Postby poetter » Thu Sep 13, 2007 1:59 am

Allright,

as noone reads this thread i posted a new archive with the latest problems fixed ( See first post in this thread ).

This fix is only updating one character after an other. So it updates one char, waits 5 secs an reloads the page to update the next on as long as there is no one left to update.

If you are using a small web presents, where you cant access the webservers config files you wont see a php.ini file anywhere.
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Fixes for Version 253

Postby robobeat » Thu Sep 13, 2007 2:55 am

poetter wrote:@robobeat: Did you comment out the languages you don't need? If so, that might be an option in php.ini. Don't know it yet, but will look for if you need it.


after opening the talents.php file I see what you mean. it was loading the german ones, changed it to enUS, set the rest as a comment, now it works like a charm :)
Last edited by robobeat on Thu Sep 13, 2007 3:04 am, edited 1 time in total.
robobeat
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Fri Jul 07, 2006 7:59 am

Re: Fixes for Version 253

Postby poetter » Thu Sep 13, 2007 2:59 am

So you commented out the unneeded languages?
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

PreviousNext

Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 0 guests