Shania
Member
+-2|6718
Hello!

I am in agreemement with
Is it possible to make a detailed, step-by-step description of how to add a leaderboard to your clan-website. I am a noob on the PC and i am not familiar with XML, HTML and all that stuff
What I actually would like to be able to do is have the leader board show some stats but in the Invison Power Board forums Portal I use in one of the boxes. Is that possible ? Can someone guide me please in how I coul ddo this please ? I dont completely understand what to do even though the info did seem easy to follow and the steps but its the beginning part I'm confused about as I dont have knowledge on xml, php etc. My site does support php and alot of the other website functions one can use and add.
|B4v|-Jack
Member
+0|6734|France
Hi all, i have a problem with the aTi|Sanders stats script !!
I would like to add a player status (offline/online) in your script, but I cannot make it !
I would like to find the code for add this, exemple with the nick :

$nick = $stats['NICK'];

and the player status :

$playerstatus = $stats['PLAYERSTATUS'];  <= Is not that, but what is it ????

Can you help me please ?
Thank you very much !!!
midgetspy
Member
+3|6820
Online/offline status isn't included in the feed.

Nic
aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6759
thanks midget
|B4v|-Jack
Member
+0|6734|France
Ok  thank you !
Jenspm
penis
+1,716|6724|St. Andrews / Oslo

Hi,
My site doesn't support php or xml... Is it possible to make a leaderboard for html? Also, Chuyskywalker wrote:

chuyskywalker wrote:

Make sure when you upgrade to go with a larger company since you're new. They provider better support. I use ASmallOrange.com for my other shared hosting.
Just out of curiosity: What is the adress to this site?
https://static.bf2s.com/files/user/26774/flickricon.png https://twitter.com/phoenix/favicon.ico
chuyskywalker
Admin
+2,439|6840|"Frisco"

A Small Orange Note! Referal link. If you use it and sign up for an account, I get one month of hosting from them for free.
Jenspm
penis
+1,716|6724|St. Andrews / Oslo

No,
I meant the adress to YOUR site...
https://static.bf2s.com/files/user/26774/flickricon.png https://twitter.com/phoenix/favicon.ico
NoGain
Member
+0|6716
Many of the sites utilizing your XML feed or PHP API also show a percentage towards next rank. I haven't seen anything either in the XML and/or PHP API docs that provide this. So, my question is, are each of the various developers storing the various Ranks required scores locally, comparing the existing player score and determining the GAP in order to calculate percentage?

Or, is there some slick method?

Tks....

[img]http://bf2s.com/player/43665693/sig.png[/img]
[img]http://bf2s.com/player/43665693/sig5.png[/img]
[img]http://bf2s.com/player/43665693/sig3.png[/img]
[img]http://bf2s.com/player/43665693/awards.jpg[/img]

Last edited by NoGain (2005-11-30 20:33:55)

chuyskywalker
Admin
+2,439|6840|"Frisco"

Jenspm wrote:

No,
I meant the adress to YOUR site...
See: Footer of page.
{DsM}SongofWar[BoC]
Member
+19|6832|Toronto, Canada
I don't know if this is the right place to put this, but the "UNKNOWN" weapon in my stats profile appears to be the zipline, since the stats for zipline and unknown match up exactly, or perhaps zip line and grappling hook, since the hook says I haven't used it at all.
chuyskywalker
Admin
+2,439|6840|"Frisco"

I think you win a cookie. I just got some info from EA and points to it, indeed, being the zipline.
joeytmann
Member
+0|6713
Thanks Chuy and NM for the great stuff. Quick question though, LastUpdate and NextUpdate are blank...I just put the files up on my site, http://www.gsog.net/modules.php?name=bf2leaderboard, any suggestions?
NM156
The H4xor Mod
+161|6839|North Texas
I don't have a quick answer for you, but since the XML feed seems to be working again, I'll be releasing the Nuke module I created. Keep an eye on this thread for it!

(I'm going to convert this module to XOOPS too, for those using that.)
joeytmann
Member
+0|6713
cool, all I did was use <iframe> to wrap it up....
SStrox
Member
+0|6741
HIP HIP HOORAY!

My stats are updating again!!!!

From 11/26 ~ 12/2  NOTHING!!

12/3 all of the SF badges appear!

Thank the BF2 GODS!!!!!
dedart
Member
+5|6740
How do you order the results into acesding and descending order?
chuyskywalker
Admin
+2,439|6840|"Frisco"

dedart wrote:

How do you order the results into acesding and descending order?
If you talking about with MY api, I suggest you read the documentation which I painstakingly put together to answer such questions.
Scorpion0x17
can detect anyone's visible post count...
+691|6758|Cambridge (UK)

chuyskywalker wrote:

dedart wrote:

How do you order the results into acesding and descending order?
If you talking about with MY api, I suggest you read the documentation which I painstakingly put together to answer such questions.
do you seriously expect people to RTFM?!
Domon
Member
+0|6712
NM156... Have you had any luck fixing the SPM problem in your php code, or has anyone else fixed it already. NM156 your script is by far the nicest! We love the fact that you can sort the table give one an beter idea of your caln members.

cheers
Domon
[url=http://bf2s.com/player/46551914/][img]http://bf2s.com/player/46551914/sig.png[/img][/url]
[url=http://bf2s.com/player/46551914/][img]http://bf2s.com/player/46551914/sig5.png[/img][/url]
[url=http://bf2s.com/player/46551914/][img]http://bf2s.com/player/46551914/sig3.png[/img][/url]
[url=http://bf2s.com/player/46551914/][img]http://bf2s.com/player/46551914/awards.jpg[/img][/url]
SodaBob
Member
+-1|6835|Indiana, US

NoGain wrote:

Many of the sites utilizing your XML feed or PHP API also show a percentage towards next rank. I haven't seen anything either in the XML and/or PHP API docs that provide this. So, my question is, are each of the various developers storing the various Ranks required scores locally, comparing the existing player score and determining the GAP in order to calculate percentage?

Or, is there some slick method?
I didn't seen an answer to your question (maybe I missed it?), but yes, at least that's how I did it.  Now I can't speak to PHP, as I'm an ASP developer, but I stored all the ranks and their score requirements in a database table.  I then simply compare the player's score and the next rank's score requirement (the next rank is determined by using the player's current rank number and adding one, of course, i.e. RankID + 1).

For anyone who needs help with this, here's the math:

CurrentRankScore = the score requirement of the player's current rank
NextRankScore = the score requirement of the next rank
PlayerScore = the player's current score

Range = NextRankScore - CurrentRankScore (i.e. the difference between the two rank's requirements
Needed = NextRankScore - PlayerScore (i.e. the difference between the player's score, and the score they need to make rank)

So then the final formula is:

Percentage = ((Range-Needed)/Range) * 100
PercentageNeeded = 100 - Percentage

Example:  the player has a score of 400 (meaning he's a Private First Class).  Given this scenario, the values of the above would be:

CurrentRankScore = 150
NextRankScore = 500
PlayerScore = 400

Range = 500 - 150 = 350
Needed = 500 - 400 = 100

Percentage = ((350-100)/350) * 100 = (250/350) * 100 = 0.7142... * 100 = 71.42...%

Then just round to the nearest one, using whatever method your programming language (php, asp, or whatever) provides.  So in this case, the player has made it about 71% toward his next rank.

PercentageNeeded = 100 - 71 = 29


Then, to create a little progress bar for each player, I just used a simple HTML table, something like this...

Code:

<table width="100">
<tr>
  <td width="[Percentage]%" bgcolor="blue">
  </td>
  </td width="[PercentageNeeded]%" bgcolor="white">
  </td>
</tr>
</table>
... where [Percentage] and [PercentageNeeded] are supplied by variables containing the percentages calculated by the formulas above (in other words, those are replaced by the computed percentages).  Thus, using the example player stats above, your final HTML for that player would look like this:

Code:

<table width="100" height="12" border="1">
<tr>
  <td width="71%" bgcolor="blue">
  </td>
  </td width="29%" bgcolor="white">
  </td>
</tr>
</table>
This will produce a 100 pixel wide box that is 12 pixels high, with a 1 pixel wide border.  In the box will be a blue bar that will go 71% of the way across from the left;  a white "background" will show in the remaining 29% of the box.

You could of course use style sheets, instead of the bgcolor= declarations, to better tweak the format of your table's background colors, border style and colors, etc.

For an example, see my gaming group's leaderboard here, written using ASP and SQL database (where you'll see I'm a better web developer than I am a BF2 player, heh heh heh):

http://www.sodabob.com/3DGames/Group/HO … ?MenuID=24

Bob.
chuyskywalker
Admin
+2,439|6840|"Frisco"

^^ leet.
[SWAM]Sander
Member
+0|6694
Hey first of all tnx for the stats and the feed to let them show up on my site....
What i want and know is not possible (in the feed from bf2s) is the possibility to show online/offline status on my website and the server-map where our members are playing.
I can see that people use Gamemonitor to get this working. Does anyone have a useful explanation url or code so i can realise this?

tnx in advance..... [SWAM] CreW tnx all BF2 enthousiasts out there
Domon
Member
+0|6712
Sodabob

I'm using NM156's code for my leader board.... BUT yes there is always a buttttttttt....
My SPM does not work can you help to resolve this or at least point me in the right direction.

Thanks
Domon
Domon
Member
+0|6712
Sodabob

I'm using NM156's code for my leader board.... BUT yes there is always a buttttttttt....
My SPM does not work can you help to resolve this or at least point me in the right direction.

Thanks
Domon

Board footer

Privacy Policy - © 2024 Jeff Minard