I created the 4 files with 'tracker' as the common name and uploaded them. I'm quite certain I didn't do it right since nothing is showing in the ACP or anywhere else.
Below is what I would like to add to a block and make it editable through the ACP, if needed. The data required to create the display is coming from an external source so I don't think much editing would be necessary.
This is the original file as found, unedited, except for the clan ID number which I changed to 1242.
- Code: Select all
<?phpif (eregi("block-AAO_Stats.php", $_SERVER['PHP_SELF'])) { Header("Location]['cdata'] .= $cdata; } function endTag($parser, $name) { global $stack; $stack[count($stack)-2]['children'][] = $stack[count($stack)-1]; array_pop($stack);} // Parse XML $stack = array();$claninfo = array();$clanstats = array();$playerstats = array(); $xml_parser = xml_parser_create();xml_set_element_handler($xml_parser, "startTag", "endTag");xml_set_character_data_handler($xml_parser, "cdata"); $xmllink="http://aaotracker.4players.de/livefeed/xml_clanprofile.php?clanid=$clanid";$data = xml_parse($xml_parser,file_get_contents($xmllink));if(!$data) die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); xml_parser_free($xml_parser); // Get Data // Get Clan Profile Data for($i = 0; $i < sizeof($stack[0][children][0][children]); $i++) { $valname=$stack[0][children][0][children][$i][name]; $claninfo[$valname]=$stack[0][children][0][children][$i][cdata]; } // Get Clan Stats Data for($i = 0; $i < sizeof($stack[0][children][1][children]); $i++) { $valname=$stack[0][children][1][children][$i][name]; $clanstats[$valname]=$stack[0][children][1][children][$i][cdata]; } // Get Player Data for($i = 0; $i < sizeof($stack[0][children][2][children]); $i++) { for($x = 0; $x < sizeof($stack[0][children][2][children][$i][children]); $x++) { $valname=$stack[0][children][2][children][$i][children][$x][name]; $value=$stack[0][children][2][children][$i][children][$x][cdata]; if($valname=="PLAYERID") $pid=$value; $playerstats[$pid][$valname]=$value; } } // Now we have 3 arrays with all stats and infos. Prints all data the XML receives.// print_r($claninfo);//print_r($clanstats);// print_r($playerstats); // CODE ADDED BY TRU (www.orcclan.us) or Contact VIA MSN at [url=mailto:KenDog123@hotmail.com]KenDog123@hotmail.com[/url] $playerkills=$playerstats[$key][PLAYERKILLS]; $playerkia=$playerstats[$key][PLAYERDEATHS]; // Player's Fragrate is determined by PLAYERKILLS divided by PLAYERDEATHS. if($playerstats[$key][PLAYERSTATUS]=="1") $statuspic="ponline.gif"; else $statuspic="poffline.gif"; if (round(($playerkills/$playerkia),2) <1> 2) { $font = "#009900"; } else { $font = "#FFCC00"; } // $frpercent = (round(($playerkills/$playerkia),2) * 100) - 100; // Displays the Parsed XML Data. You can edit if you know what you are doing. $content .= "<tr><td><font>$playerhonor</font></td><td><font><a>$playername</a></font></td><td><font>" . round(($playerkills/$playerkia),2) . "</font></td><td><img></td></tr>";$content .= ""; } // Closes the table.$content .= "</table>";// CODE ADDITION ENDED?>
It should be really easy for anyone that knows what they're doing (unlike me) to make the necessary files. I've read everything here and in the manual. Big learning curve for our websites new webmaster (me).
I'm trying though - honestly.
Of course, I'll check this topic... but you can also use my email for any file changes you have made. http://mos-squad.com/portal.php
Btw, heres what it does:
http://img134.imageshack.us/img134/2003/minitracker4eq.jpg