Psycho
Member since 2005
+44|6993|Kansas, USA

Viper007Bond wrote:

Psycho wrote:

Viper007Bond wrote:

Note that I hadn't coded the rank progress code yet before I abandoned the PHP sorting (see next paragraph), hence why they're all at 50%.
I noticed that your progress bars are "overstated" for the lower percentages. For example, one states 4.08%, but the actual progress bar is around 25%. You chould use layers so that the progress bar is acurately displayed for the percentage.
I see you're using the shittiest browser in the world, IE.

I'll try to get it looking right in retarded IE.

Edit: Seems the bar is going to at least the end of the text no matter what in IE. Chuy has the same problem here on BF2S even. Oh well, fuck IE. You shouldn't be using it anyway.
Well, I don't have any option of the browser I use at work. Plus, seeing as IE still has the lion's share of the internet I would think that anything you develop should work in at least the most common browser. It IS possible because I already did it. And it works in both Firefox and IE.

http://repeat-offenders.org/modules.php … eaderboard
AD_Kensan
Member
+7|7002

Viper007Bond wrote:

Hmm, for fun, I threw together one based on your API rather than MySQL. It doesn't seem to be too much faster:
[snip]
You will notice that once you get decent hits on that site. When your machine is idle it does not matter all that much but it will save your server lots of ressources when it has to fetch the data from a DB everytime. Even worse would be if you didn't use persistent connections or prepared statements.

I thought I just might add that...

Now a question for Chuy: I just skimmed through your php-Code today. Thanks for all the work. I was wondering if anybody was interested in a Ruby-Port. If there's enough people I might cook something up.

-AD
Viper007Bond
Moderator Emeritus
+236|7022|Portland, OR, USA

Hmm, alright, I may just ditch MySQL then. It sounded like a good idea at the time, but after remembering about the JS sorting script as well as being corrected about speeds/loads...

https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
Viper007Bond
Moderator Emeritus
+236|7022|Portland, OR, USA

Psycho wrote:

It IS possible because I already did it. And it works in both Firefox and IE.

http://repeat-offenders.org/modules.php … eaderboard
Man, that's some crazy (and invalid) CSS. I get what you did though, so thanks.
https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
Psycho
Member since 2005
+44|6993|Kansas, USA

Viper007Bond wrote:

Psycho wrote:

It IS possible because I already did it. And it works in both Firefox and IE.

http://repeat-offenders.org/modules.php … eaderboard
Man, that's some crazy (and invalid) CSS. I get what you did though, so thanks.
Well, according to W3C that page does have some invalid code, but none of it is due to the CSS. Most is just some missing ALT tags and such.
Viper007Bond
Moderator Emeritus
+236|7022|Portland, OR, USA

Well, your inline CSS isn't valid either.

http://jigsaw.w3.org/css-validator/vali … eaderboard

Mostly due to a lack of using a units like "px".

But regardless, your leaderboard looks good and I appreciate the help.

Last edited by Viper007Bond (2006-01-20 21:44:21)

https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
TC><Injecter
Member
+4|7045|Berlin, Germany
OOOOH The pics on the profiles with the UBAR info is new... NICE (donno if thats the right place...!?)
Waltersson
Member
+0|6938|Linköping, Sweden
First of all, thank you for a great site!

I've implemented a PostNuke module that pulls PID's from registered members profiles and fetches your stats XML to be displayed on [url]http://www.rabarbersquad.se/index.php?name=BF2S[/url]. Everything works fine but we have now hit the 64 PID limit and I have a few questions before I try to solve this.
1. Your readme states that "You may only pull up to 3 xml feeds every 6 hours". Does this mean I can pull a feed every 2 hours as long as the PID's are not the same as 2/4 hours ago?
2. The proposed solution for my problem is to split the list of members so that I only fetch 64 every 2 hours. To support an arbitrary number of members it will probably be necessary to use the database to cache the stats. Has someone already implemented a solution like this?

Regards
Joakim Waltersson, Php-newbie
chuyskywalker
Admin
+2,439|7064|"Frisco"

Waltersson wrote:

1. Your readme states that "You may only pull up to 3 xml feeds every 6 hours". Does this mean I can pull a feed every 2 hours as long as the PID's are not the same as 2/4 hours ago?
You could, theoretically, pull 3 seperate feeds (64 a piece = 192 players) every 6 hours. All I keep track of is the number of times your IP has shown up at my XML feed door. ex:

Code:

XML Query recieved from IPADDR. If IPADDR (within last 6 hours) > 3 instances, return nothing.
persnickadee
Member
+0|6877
u da man fuk the rip offs you knew whts up when u started
great job handling shit keep it up
Viper007Bond
Moderator Emeritus
+236|7022|Portland, OR, USA

Waltersson: add a field to the users table that says when their stats were last updated. Then, every 2 hours, grab the 64 people with the oldest stats, query their stats, and then save them to your stats table.
https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
tecnomuzik
Member
+1|6876|Chicago
I've just downloaded these files to get the stats working on my clan site.  I have no idea what I'm doing here so to begin, all I did was replace the PID's in the examples.php file.  I have that file along with the bf2s-mlb.php file on my webserver and when I try to access the php file to get the stats, I receive the following error:

Notice: Undefined variable: non_numeric in C:\GTO CLAN\bf2s-mlb.php on line 259

Fatal error: Call to undefined function: is_executable() in C:\GTO CLAN\bf2s-mlb.php on line 60

Am I suppose to modify the bf2s-mlb.php file at all?

Thanks!
NM156
The H4xor Mod
+161|7064|North Texas
You very well may have to modify it. (the 'is_executable' function isn't available on your host's server)

Try adding this to the top of the bf2s-mlb.php:

Code:

    if ( !function_exists('is_executable') ) :
        function is_executable(){return true;}
    endif
tecnomuzik
Member
+1|6876|Chicago
What does the 'is_executable' function do?  I am hosting the the site on my personal server - Windows 2003 w/IIS 6.0
tecnomuzik
Member
+1|6876|Chicago
I made added that code and now I get this error:

Parse error: parse error, unexpected T_CLASS, expecting ';' in C:\GTO CLAN\bf2s-mlb.php on line 16
NM156
The H4xor Mod
+161|7064|North Texas
Did you add it after the <?php and before the class BF2S_MLB { ?
tecnomuzik
Member
+1|6876|Chicago
Yes, I did.  Here is what I have:

<?php
if ( !function_exists('is_executable') ) :
        function is_executable(){return true;}
    endif

/*
* BF2S XML Leader Board API
* You can use this class to download and output a leader board of players on your own site using any formatting you so choose.
*
*         Version: 1.5
*         Author: Jeff Minard
*         URL: http://jrm.cc/extras/mlb/ & http://bf2s.com/
*
*/

class BF2S_MLB {

    var $cachedir;
    var $has_cache;
   
    var $debug;
   
    var $myleaderboard;

    function BF2S_MLB() {
        $this->cachedir = dirname(__FILE__) . '/cache';
    }
NM156
The H4xor Mod
+161|7064|North Texas
Try this instead:

Code:

    if ( !function_exists('is_executable') ) {
        function is_executable() {
            return true;
        }
    }
tecnomuzik
Member
+1|6876|Chicago
Hey that worked! Thanks!  Now I can see stats for the PID's that I set. 

I saw the leaderboard at your site and downloaded the files you posted.  Does a setup like yours require anything sqecial... like mysql? Anything else?

Thanks again for the help!
NM156
The H4xor Mod
+161|7064|North Texas
Ahh good. If you want to use my version, look here: http://forums.bf2s.com/viewtopic.php?id=9672

Just edit the config, it's all commented. Enjoy!
tecnomuzik
Member
+1|6876|Chicago
Thanks a lot.  I really appreciate it!
NM156
The H4xor Mod
+161|7064|North Texas
No prob man... the real thanks should goes to Chuy though, for allowing us to use his resources!
tecnomuzik
Member
+1|6876|Chicago
Thanks Chuy for making this available!
cagy
Member
+0|6880
Just want to show what I did with Chuy's API:

http://www.xyzhq.com/bb/

I save all stats in a Mysql DB so you can compare players' historical graphs.

Thx for the API!
chuyskywalker
Admin
+2,439|7064|"Frisco"

cagy wrote:

Just want to show what I did with Chuy's API:

http://www.xyzhq.com/bb/

I save all stats in a Mysql DB so you can compare players' historical graphs.

Thx for the API!
Lookin pretty sweet

Board footer

Privacy Policy - © 2024 Jeff Minard