Skip to content

Commit

Permalink
[297] Second part of [296] commit`s update
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadez committed Jul 7, 2010
1 parent 753566e commit 956cf33
Show file tree
Hide file tree
Showing 10 changed files with 281 additions and 78 deletions.
28 changes: 23 additions & 5 deletions character-achievements.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 296
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -265,11 +265,29 @@
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
}
$xml->XMLWriter()->writeRaw('>');
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->startElement('achievements');
$xml->XMLWriter()->startElement('summary');
Expand Down
92 changes: 66 additions & 26 deletions character-arenateams.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 257
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -84,38 +84,78 @@
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$character_arenateams = $arenateams->GetCharacterArenaTeamInfo();
if(is_array($character_arenateams)) {
$xml->XMLWriter()->startElement('arenaTeams');
foreach($character_arenateams as $arenateam) {
$xml->XMLWriter()->startElement('arenaTeam');
foreach($arenateam['data'] as $team_key => $team_value) {
$xml->XMLWriter()->writeAttribute($team_key, $team_value);
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
$xml->XMLWriter()->startElement('emblem');
foreach($arenateam['emblem'] as $emblem_key => $emblem_value) {
$xml->XMLWriter()->writeAttribute($emblem_key, $emblem_value);
}
if($character_arenateams && is_array($character_arenateams)) {
$xml->XMLWriter()->writeRaw('><arenaTeams>'); // close <character> tag before open new
foreach($character_arenateams as $arenateam) {
$xml->XMLWriter()->writeRaw('<arenaTeam');
foreach($arenateam['data'] as $team_key => $team_value) {
$xml->XMLWriter()->writeRaw(' ' . $team_key.'="' . htmlspecialchars($team_value).'"');
}
$xml->XMLWriter()->writeRaw('><emblem');
foreach($arenateam['emblem'] as $emblem_key => $emblem_value) {
$xml->XMLWriter()->writeRaw(' ' . $emblem_key.'="' . $emblem_value.'"');
}
$xml->XMLWriter()->writeRaw('><members>');
foreach($arenateam['members'] as $member) {
$xml->XMLWriter()->writeRaw('<member');
foreach($member as $member_key => $member_value) {
$xml->XMLWriter()->writeRaw(' ' . $member_key .'="' . htmlspecialchars($member_value) . '"');
}
$xml->XMLWriter()->writeRaw('/>'); //member
}
$xml->XMLWriter()->writeRaw('</members></emblem></arenaTeam>');
}
$xml->XMLWriter()->endElement(); //emblem
$xml->XMLWriter()->startElement('members');
foreach($arenateam['members'] as $member) {
$xml->XMLWriter()->startElement('character');
foreach($member as $member_key => $member_value) {
$xml->XMLWriter()->writeAttribute($member_key, $member_value);
$xml->XMLWriter()->writeRaw('</arenaTeams>');
}
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
if($character_arenateams && is_array($character_arenateams)) {
$xml->XMLWriter()->startElement('arenaTeams');
foreach($character_arenateams as $arenateam) {
$xml->XMLWriter()->startElement('arenaTeam');
foreach($arenateam['data'] as $team_key => $team_value) {
$xml->XMLWriter()->writeAttribute($team_key, $team_value);
}
$xml->XMLWriter()->startElement('emblem');
foreach($arenateam['emblem'] as $emblem_key => $emblem_value) {
$xml->XMLWriter()->writeAttribute($emblem_key, $emblem_value);
}
$xml->XMLWriter()->endElement(); //emblem
$xml->XMLWriter()->startElement('members');
foreach($arenateam['members'] as $member) {
$xml->XMLWriter()->startElement('character');
foreach($member as $member_key => $member_value) {
$xml->XMLWriter()->writeAttribute($member_key, $member_value);
}
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //members
$xml->XMLWriter()->endElement(); //arenaTeam
}
$xml->XMLWriter()->endElement(); //members
$xml->XMLWriter()->endElement(); //arenaTeam
$xml->XMLWriter()->endElement(); //arenaTeams
}
$xml->XMLWriter()->endElement(); //arenaTeams
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->endElement(); //page
$xml_cache_data = $xml->StopXML();
Expand Down
28 changes: 23 additions & 5 deletions character-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 257
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -83,11 +83,29 @@
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
}
$xml->XMLWriter()->writeRaw('>');
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->endElement(); //page
$xml_cache_data = $xml->StopXML();
Expand Down
28 changes: 23 additions & 5 deletions character-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 257
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -73,11 +73,29 @@
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
}
$xml->XMLWriter()->writeRaw('>');
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->endElement(); //page
$xml_cache_data = $xml->StopXML();
Expand Down
28 changes: 23 additions & 5 deletions character-model-embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 257
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -83,11 +83,29 @@
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
}
$xml->XMLWriter()->writeRaw('>');
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->endElement(); //page
$xml_cache_data = $xml->StopXML();
Expand Down
28 changes: 23 additions & 5 deletions character-reputation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 296
* @revision 297
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -83,11 +83,29 @@
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$xml->XMLWriter()->startElement('characterInfo');
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
foreach($character_element as $c_elem_name => $c_elem_value) {
if($c_elem_name == 'charUrl') {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .htmlspecialchars($c_elem_value).'"');
}
else {
$xml->XMLWriter()->writeRaw(' ' . $c_elem_name .'="' .$c_elem_value.'"');
}
}
$xml->XMLWriter()->writeRaw('>');
$xml->XMLWriter()->writeRaw('<modelBasePath value="http://eu.media.battle.net.edgesuite.net/"/></character>');
}
else {
$xml->XMLWriter()->startElement('character');
foreach($character_element as $c_elem_name => $c_elem_value) {
$xml->XMLWriter()->writeAttribute($c_elem_name, $c_elem_value);
}
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->startElement('reputationTab');
$character_reputation = $characters->GetCharacterReputation();
if($character_reputation) {
Expand Down
Loading

0 comments on commit 956cf33

Please sign in to comment.