New Request

Discussion in 'BF2Statistics discussion' started by frankking, Aug 11, 2007.

  1. frankking

    frankking New Member

    Okay, I have my Purple Heart Memorial page that displays only those players who have received a purple heart... now, is there a way in the leaderboard, instead of displaying the score of the person, to display the number of purple hearts that player has? (ie. x1, x15, etc.)
     
  2. lumo

    lumo New Member

    sure, just make a new sql query...
     
  3. frankking

    frankking New Member

    Figured it out!! See here... http://gttc.servegame.com/stats/ph.php
     
  4. redilS

    redilS Member

    Congratulations, well done! :)
     
  5. frankking

    frankking New Member

    Okay, one more request that I can not figure out for the life of me.... Maybe I need to move the code to the aspx file, but I can not SORT the records by the number of Awards they have received.

    Any ideas on what to do from here?
     
  6. redilS

    redilS Member

    Would you mind posting the the code so we can have a look at it? ;)
     
  7. lumo

    lumo New Member

    "select statement ORDER BY poperty DESC"
    .oO(or was it asc...)

    btw, some ppl gain 7 purple hearts?!?!
    i did not get ANY purple hearts in playing more than a year on public servers...
     
  8. Thinner

    Thinner New Member

    Hi frankking,

    get this file: (download link removed by author)

    In this archive you will find an updated BF2Stats.php and getleaderboard.aspx and a sample file gs.php.

    In your index.php call loadLeaderboard("&type=score&id=overall").

    In your award leaderboard use getURLLeaderboard(parameters) with following parameters (see also sample file)

    &type=award (necessary)
    &awd=xxxxxx (necessary, specify award number here, e.g. 2051907 for Gold Star, only players who earned this award will show up)
    &lvl=x (optional, specify award-level, 1 for Basic, 2 for Veteran, 3 for Expert, not really usefull for Gold Star)
    &order=xxx!xxx (optional, specify sorting order, e.g. "&order=level!DESC,score!DESC" to sort first on level in descending order, second on totalscore descending order, use !ASC for ascending order)

    sample: getURLLeaderboard("&type=award&awd=2051907&order=level!DESC,score!DESC")

    Thinner
     
  9. frankking

    frankking New Member

    Workd AWSOME!! just one small issue... it seems to ignore the maximum number of players to appear on the leaderboard... ie. "Leaderboard top 50 Players"... it shows ALL players with the selected Award.
     
  10. Thinner

    Thinner New Member

    Sorry, get the archive again, I updated getleaderboard.aspx
     
  11. frankking

    frankking New Member

    Okay, I applied the new getleaderboard.aspx... my result is the same.. check it out. I am getting 109 records returned, even though my leaderboard is set to show 50.
     
  12. frankking

    frankking New Member

    YOU ARE THE MAN!!!!!!!! It works perfect!
     
  13. Anders

    Anders New Member

    who is the man??
     
  14. frankking

    frankking New Member

    Thinner is the man, he helped me get my Purple Heart Memorial Page up and running the way I wated it.
     
  15. Anders

    Anders New Member

    did think that ur leader board look awsome i want that 2....
    do have same prob like u got just 32 players to show
     
  16. Anders

    Anders New Member

    please thinner can u help me? 2 if u have msn can u pm me
     
  17. Thinner

    Thinner New Member

    Hi, I don't have MSN. Check your config.php, setting $topnum= , this will specify how many players will show up in normal leaderboard. If you use an award-leaderboard based on my updated files then only players will show up that earned the award you specified by parameter &awd= (and optional &lvl=). This can be less than the setting in $topnum=
     
  18. Anders

    Anders New Member

    did not help need to move down to au lol
     
  19. Thinner

    Thinner New Member

    I saw your site is working properly. But please don't remove the credits... That's not fair...
     
  20. Anders

    Anders New Member

    that was not my intention to set footer of but its bak....sorry..
    and i did get all fixed thinner long nite lol and got purple heart to work 2 hehe now iam happy agin

    oppd did get my swedish flag bak...hehe did set my ip all over the place in ASP config
     

Share This Page