Tracker Block Mod

Support for the IM Portal Project

Moderator: Integra Moderator

Tracker Block Mod

PostAuthor: mos-firefox » Sat Jul 08, 2006 12:25 pm

Ok, I tried my best to follow the tutorial on creating a new block. http://integramod.com/forum/kb.php?mode=article&k=6

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
Last edited by mos-firefox on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

mos-firefox
Newbie
Newbie
 
Posts: 3
Likes: 0 post
Liked in: 0 post
Joined: Sat Jul 08, 2006 11:13 am
Cash on hand: 0.00

PostAuthor: mos-firefox » Tue Jul 11, 2006 5:56 pm

No takers?
Last edited by mos-firefox on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

mos-firefox
Newbie
Newbie
 
Posts: 3
Likes: 0 post
Liked in: 0 post
Joined: Sat Jul 08, 2006 11:13 am
Cash on hand: 0.00

Re: Tracker Block Mod

PostAuthor: Teelk » Tue Jul 11, 2006 8:33 pm

Sorry for not replying sooner mos-firefox. I did read this post a few days ago and copied the code to try and help you out. Unfortunately, I've been busy with the IM 1.4.1 beta that I haven't had time to look at it.

The good news is that I've already done an AAO tracker block in the past, I just have to find it again... I'll take a look and see if I can find it.
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada

Re: Tracker Block Mod

PostAuthor: Teelk » Tue Jul 11, 2006 8:42 pm

Ok, found it.

Just copy it to your site following the directory structure in the file.

There is a bit of editing on your part, however. You'll need to open /blocks/blocks_imp_tracker.php and edit the following...
Code: Select all
/***********************************//*         Edit Below              *//***********************************/$aa = "1"; //Do you have a game server? 1-yes 2-no 3-hide$aaip = "69.28.242.81"; //Game Server IP$aaport = "1716"; //Game Server Port  $aao = "2"; //AAO Tracker? 1-yes 2-no 3-hide$aaotracker = "xxxx"; //This is the number at the end of the URL for your clan stats  $ts = "1"; //Do you have a TeamSpeak server? 1-yes 2-no 3-hide$tsip = "69.28.242.80"; //Your TS IP$tsport = "8771"; //Port number  $irc = "1"; //Do you have an IRC server/channel? 1-yes 2-no 3-hide$ircserver = "irc.americasarmy.com"; //This is the IRC Server$ircchannel = "cdw"; //This is your IRC Channel (no "#")  $twl = "2"; //Do you have a TWL account? 1-yes 2-no 3-hide$teamwarfare = "your_team"; //The end of your URL after "?team="
...with the info of your clan.

Hope this is what you're lookin' for.
Attachments
clan_info_im.zip
(24.01 KiB) Downloaded 195 times
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada

PostAuthor: mos-firefox » Fri Jul 14, 2006 11:58 am

I sincerely appreciate you taking the time to find and upload those blocks Teelk.

Not quite was I was looking to do...
On the right of this website, approx 1/2 down is the list of players and their online/offline game status.
http://10thclan.us/ <-- see Clan AA Tracker block

That's what the coding up above is supposed to be doing but I can't get it to work...
hence, the post asking for help.
Last edited by mos-firefox on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

mos-firefox
Newbie
Newbie
 
Posts: 3
Likes: 0 post
Liked in: 0 post
Joined: Sat Jul 08, 2006 11:13 am
Cash on hand: 0.00

Re: Tracker Block Mod

PostAuthor: Drop-Forged » Fri Jul 14, 2006 5:36 pm

I couldnt get that to work either.

For my stats blocks I inserted a .html file, that had a frame including the .php file.

[url=http]Click Here for the example[/url]

I put mine in the Center so that it was wide enough to fit the longer usernames.
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

Re: Tracker Block Mod

PostAuthor: a_lunatic » Sat Jul 15, 2006 5:58 am

I just tryed to get this 1 to work properly but couldn't & it needs all users names & ID's in the target & there ID in the img src intemplatesfisubiceblockstracker_block.tpl
& u shouldn't have to do now they have got a new way for clans to show there status here's the link for it [url=http]aaotracker.com[/url]

I got it to work this way here is the link [url=http]IM Archive Site[/url]
also got ts work the same way [url=http]IM Archive Site[/url]

any Q's just ask here's a pic of it

[flash=,:33vvnndh]http://img90.imageshack.us/img90/2692/aaastatusqr1.jpg[/flash:33vvnndh]
Last edited by a_lunatic on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
a_lunatic
Members
Members
 
Posts: 56
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 8:05 am
Cash on hand: 0.00


Return to IM Portal Support Forum

Who is online

Registered users: Bing [Bot], Vendethiel