Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.218
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - bf2142 tracker, how for phpnuke ?
bf2142 tracker, how for phpnuke ?
Goto page 1, 2  Next

12 Replies / 5689 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » General PhpNuke

View previous topic :: View next topic


Hippie
Reputation: 461.7 Add RepSubtract Rep
Local time: 3:08 AM


Noob
Noob

0.01 posts per day
Medals: 0

Joined: May 18, 2007
Last Visit: 08 Jun 2007
Posts: 17
Points: 388 

Post bf2142 tracker, how for phpnuke ? Posted: Tue May 29, 2007 5:59 pm

Example this site:

http://www.tbcts.com/

on the middle right has a bf2 and bf2142 tracker.
I'd like the bf2142 tracker on my nuke site, but I am new to phpnuke overall and have noidea how to get the code to work yet alone where to put it and how, whether its a block or module or both.

Someone experienced here could help please step by step ?
I think it would be a block others would like as well..

code is this:

Code:
<php>$name,"attrs"=>$attrs);
 array_push($stack,$tag);
}

function BF2142cdata($parser, $BF2142cdata) {
 global $stack;

 $stack[count($stack)-1]['BF2142cdata'] .= $BF2142cdata;   
}

function BF2142endTag($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, "BF2142startTag", "BF2142endTag");
xml_set_character_data_handler($xml_parser, "BF2142cdata");

$xmllink="http://bf2142tracker.com/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][BF2142cdata];
 }

 // 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][BF2142cdata];
 }

 // Get Player Data
 for($i = 0; $i < sizeof($stack[0][children][2][children]); $i++) {
  for($x = 0; $x <sizeof> $value) {
 $playername=$playerstats[$key][PLAYERNAME];
 $playerurl=$playerstats[$key][PLAYERSTATSURL];
 
 if($playerstats[$key][PLAYERRANK]!="") $playerrank=$playerstats[$key][PLAYERRANK];
 else $playerrank=0;
 

 if($playerstats[$key][PLAYERSTATUS]=="1") $statuspic="ponline.gif";
 else $statuspic="poffline.gif";

 $content .="<img border="0\" src="./images/bf2142tracker/$statuspic\" width="42\" height="16\"><div><img border="0\" src="./images/bf2142tracker/ranksmall_$playerrank.gif\" width="16\" height="16\"><a>$playername</a><br></div>";
}
?>


Code is found on the official tracker site:

http://bf2142tracker.com/thread.php?threadid=727&sid=e0899745fe4272c19221deb22a257cc3&threadview=0&hilight=&hilightuser=&page=3
 

 
View user's profileSend private message Reply with quote

Scorpion
Reputation: 470.7 Add RepSubtract Rep
Local time: 8:08 AM
Location: 30 miles from Carentan
blank.gif



0.13 posts per day
Medals: 3 (View more...)
Site Supporter (Amount: 1)
VIP
VIP
Joined: Dec 09, 2006
Last Visit: 11 Apr 2010
Posts: 264
Points: 11084 

Post Posted: Wed May 30, 2007 4:09 pm

Ok, the trackers for bf2 and bf2142 work off xml links.

You would first have to register your clan at either site ( 2 or 2142 ) and then your clan will get an id number example in the block code = $clanid="791";

What this does is links to the tracker site of your choice and then displays your members stats in a block.

There are variations to what can be displayed in the block. Honor, rank, kills and so on...

I know this as the Ammerica's Army Ops Tracker that is available in the Clubs downloads works exactly the same way ( the 3 sites are run by the same people ...bf2, bf2142 and America's Army Ops trackers )


So to conclude.... get over to bf2142 or bf2 tracker and register your clan.... once you get an id number, replace it in the example code and add the block file to your sites block folder, then activate.

If you get any problems with the display of the block or it's content, then give me a shout and i'll help you out the best i can.

Note: If you try to display both the bf2 and the bf2142 tracker block, they conflict and neither will display.

You can get around this by making one of the blocks an iframe display, so they would then both show on ya site.

Hope this answers ya question.

Scorps
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

OzButcher
Reputation: 464.1 Add RepSubtract Rep
Local time: 4:08 PM

australia.gif

OMG
OMG

0.07 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Jan 16, 2007
Last Visit: 26 Feb 2008
Posts: 135
Points: 100 

Post Posted: Thu May 31, 2007 5:59 am

Shop Purchases:
Battlefield 2142 PhpNuke Theme (Aviator) · Clan Roster v1.7 Php Nuke Module · Battlefield 2142 X-Theme (Ultimate)

Wow that is really cool!! I don't have much room for blocks on my site... its kinda full so I was wondering can this be turned into a module without too much trouble?
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote


OzButcher
Reputation: 464.1 Add RepSubtract Rep
Local time: 4:08 PM

australia.gif

OMG
OMG

0.07 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Jan 16, 2007
Last Visit: 26 Feb 2008
Posts: 135
Points: 100 

Post Posted: Thu May 31, 2007 7:01 am

Shop Purchases:
Battlefield 2142 PhpNuke Theme (Aviator) · Clan Roster v1.7 Php Nuke Module · Battlefield 2142 X-Theme (Ultimate)

Hippie:

I found a pre-made block for php nuke and also the proper image files for 2142 from this site! works a treat in a block! :)

http://clanfav.com/modules.php?name=Forums&file=viewtopic&t=1221
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 93.3 Add RepSubtract Rep
votes: 37
Local time: 9:08 AM
Location: Great British Empire
uk.gif

Site Founder
Site Founder

1.82 posts per day
Medals: 2 (View more...)
Super Dedicated User (Amount: 1)
Theme Guru
Theme Guru
Joined: Nov 13, 2006
Last Visit: 24 May 2012
Posts: 3669
Points: 191760 

Post Posted: Thu May 31, 2007 11:57 am

Shop Purchases:
Clan Roster 2.0 · Bad Company 2 Vietnam Xtreme Theme

Nice find Lads

I have added it to the downloads, his instructions were okay but i cleaned it up and put ALL the images in to a better place and a few other bits n bobs

you can grab it HERE

Embarrased
 

 
View user's profileSend private messageSend e-mail Reply with quote

Scorpion
Reputation: 470.7 Add RepSubtract Rep
Local time: 8:08 AM
Location: 30 miles from Carentan
blank.gif



0.13 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
VIP
VIP
Joined: Dec 09, 2006
Last Visit: 11 Apr 2010
Posts: 264
Points: 11084 

Post Posted: Fri Jun 01, 2007 10:23 am

Oz, as you can see from this site The Artists Clan, I've been working on the tracker system for a couple of weeks now and pritty much anything is posible with nuke as you know Wink

Once I'm finally finished with converting the America's Army Ops Tracker over to sql, then I'll have a go at the BF2142 module.

Scorps
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote


OzButcher
Reputation: 464.1 Add RepSubtract Rep
Local time: 4:08 PM

australia.gif

OMG
OMG

0.07 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Jan 16, 2007
Last Visit: 26 Feb 2008
Posts: 135
Points: 100 

Post Posted: Fri Jun 01, 2007 2:57 pm

Shop Purchases:
Battlefield 2142 PhpNuke Theme (Aviator) · Clan Roster v1.7 Php Nuke Module · Battlefield 2142 X-Theme (Ultimate)

Wow thats awesome Scorpion! If you could port over that 2142 feed that would be a much sought after module for nuke I'm sure!! :)
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote

Scorpion
Reputation: 470.7 Add RepSubtract Rep
Local time: 8:08 AM
Location: 30 miles from Carentan
blank.gif



0.13 posts per day
Medals: 3 (View more...)
Site Supporter (Amount: 1)
VIP
VIP
Joined: Dec 09, 2006
Last Visit: 11 Apr 2010
Posts: 264
Points: 11084 

Post Posted: Sat Jun 02, 2007 12:12 pm

Unfortunately there isn't that much info to post from the BF2142 stats live feed - http://bf2142tracker.com/livefeed/xml_clanprofile.php?clanid=2028

As you can see Oz it's pritty limited atm so not realy worth making a module BUT this is what can be produced from what is available so far -



The warning error comes from the fact that your globaltime and your playertime are zero :--(

I'll keep you posted tho bud Wink
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

OzButcher
Reputation: 464.1 Add RepSubtract Rep
Local time: 4:08 PM

australia.gif

OMG
OMG

0.07 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Jan 16, 2007
Last Visit: 26 Feb 2008
Posts: 135
Points: 100 

Post Posted: Sun Jun 03, 2007 1:44 am

Shop Purchases:
Battlefield 2142 PhpNuke Theme (Aviator) · Clan Roster v1.7 Php Nuke Module · Battlefield 2142 X-Theme (Ultimate)

Hmmm... I think the stat feed isn't updated from the tracker unless the person has been clicked on once, (maybe it activates the feed then) it does this for the old bf2 stat feed also and the other 2142 mod . Try clicking on me and then refreshing the page :)

Edit: This link shows our clan info strange Dont Know
http://www.bf2142tracker.com/bf2142_clanprofile.php?clanid=2028
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote


TB_DFW
Reputation: 503.3 Add RepSubtract Rep
Local time: 6:08 PM

australia.gif

Spawn Killer
Spawn Killer

0.02 posts per day
Medals: 0

Joined: Apr 09, 2007
Last Visit: 22 Apr 2011
Posts: 30
Points: 1843 

Post Posted: Sun Jun 03, 2007 1:38 pm

Shop Purchases:
Multi Gaming (Warrior) Theme

If you're talking about the player stats updating Oz... Unlike AATracker where they automatically update, the 2142 stats need to be updated by the player every time they play through their personal stats link... This has got something to do with reducing the amount of queries to EA & therefore hopefully stopping EA from blocking the site.

So I'd assume it's the same as the BF2 stats tracker where it has to querie the EA Db and then shows the updated info. Would it be possible to add a script to get it to automatically send the querie so that they stay up-to-date?
 

 
View user's profileSend private message Reply with quote

OzButcher
Reputation: 464.1 Add RepSubtract Rep
Local time: 4:08 PM

australia.gif

OMG
OMG

0.07 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Jan 16, 2007
Last Visit: 26 Feb 2008
Posts: 135
Points: 100 

Post Posted: Sun Jun 03, 2007 1:54 pm

Shop Purchases:
Battlefield 2142 PhpNuke Theme (Aviator) · Clan Roster v1.7 Php Nuke Module · Battlefield 2142 X-Theme (Ultimate)

ah crap that sucks Sad

and I remember EA was telling the communities before 2142 was released they would be making the xml feeds more available so other sites can use them. so much for that!
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote

mia_undertaker
Reputation: 461.4 Add RepSubtract Rep
Local time: 3:08 AM

blank.gif

Tree Hugger
Tree Hugger

0.04 posts per day
Medals: 0

Joined: Jun 03, 2007
Last Visit: 28 Feb 2011
Posts: 72
Points: 9879 

Post Posted: Sun Jun 03, 2007 6:50 pm

Shop Purchases:
Clan Roster v1.7 Php Nuke Module · Clan Roster 2.0 · Modern Gamer Multi Theme · Gamer Cards Module

Thanks for the info. Very handy
 

 
View user's profileSend private message Reply with quote

Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » General PhpNuke


 
12 Replies / 5689 Views
Page 1 of 2
All times are GMT
Goto page 1, 2  Next
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum