ImportBot Posted August 1, 2012 Author Share Posted August 1, 2012 Originally Posted by dakeeper*: i have exactly the same problem, any solution for that?same problem here.Offline Serverstats. hm * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 25, 2012 Author Share Posted September 25, 2012 Originally Posted by johnny5*: I say use the stat pages at your own risk. Just a hint. This comment was made with no bad intentions to anyone. Just to be clear. http://forums.sparkteam.com.au/ * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted October 18, 2012 Author Share Posted October 18, 2012 Originally Posted by dakeeper*: Hmmm... seems like this need an update for armored kill. Maps aren`t displayed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 24, 2012 Author Share Posted November 24, 2012 Originally Posted by utopiate*: Hey all, any chance of some nooby help? lol. I have this installed but as a bit of a web noob don't know how to add my servers. I'm guessing they need to be defined in bf3conn.php but don't know how to do this. Looking to add 3 BF3 servers. cheers * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 10, 2012 Author Share Posted December 10, 2012 Originally Posted by Pegasus829*: Hi guys, Does this still work with ver 1.5? Can't get it to connect and show stats, also can't see where you now add the game server detail. If you have to insert it directly into the bf3conn file, where? Stats aren't displaying either even though DB info is 100% and IP's are allowed. Any help/documentation would be great. Used to be dead easy to set up with first version... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 17, 2013 Author Share Posted January 17, 2013 Originally Posted by supermillhouse*: Is there anybody who can update this to use the new DB live stats as my host doesn't allow connection to the game server? Im afraid my php skills are not up to it * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 17, 2013 Author Share Posted January 17, 2013 Originally Posted by ty_ger07*:I have a stats page with db live scoreboard here:www.phogue.net/forumvb/showth...apstats-Logger*Here is my scoreboard function:Code: // make an array of game modes $mode_array = array('Team Deathmatch'=>'TeamDeathMatchC0','Conquest Assault Large'=>'ConquestAssaultLarge0','Conquest Assault Small'=>'ConquestAssaultSmall1','Conquest Assault Small'=>'ConquestAssaultSmall0','Gun Master'=>'GunMaster0','Conquest Domination'=>'Domination0','Scavenger'=>'Scavenger0','Tank Superiority'=>'TankSuperiority0','Rush'=>'RushLarge0','Conquest Large'=>'ConquestLarge0','Conquest Small'=>'ConquestSmall0','Team Deathmatch'=>'TeamDeathMatch0','Squad Rush'=>'SquadRush0','Squad Deathmatch'=>'SquadDeathMatch0'); // make an array of map names $map_array = array('Talah Market'=>'XP4_RUBBLE','Azadi Palace'=>'XP4_PARL','Markaz Monolith'=>'XP4_FD','Epicenter'=>'XP4_QUAKE','Bandar Desert'=>'XP3_DESERT','Alborz Mountains'=>'XP3_ALBORZ','Armored Shield'=>'XP3_SHIELD','Death Valley'=>'XP3_VALLEY','Scrapmetal'=>'XP2_FACTORY','Operation 925'=>'XP2_OFFICE','Donya Fortress'=>'XP2_PALACE','Ziba Tower'=>'XP2_SKYBAR','Grand Bazaar'=>'MP_001','Tehran Highway'=>'MP_003','Caspian Border'=>'MP_007','Seine Crossing'=>'MP_011','Operation Firestorm'=>'MP_012','Damavand Peak'=>'MP_013','Noshahar Canals'=>'MP_017','Kharg Island'=>'MP_018','Operation Metro'=>'MP_SUBWAY','Strike at Karkand'=>'XP1_001','Gulf of Oman'=>'XP1_002','Sharqi Peninsula'=>'XP1_003','Wake Island'=>'XP1_004'); // make an array of squad names $squad_array = array('None'=>'0','Alpha'=>'1','Bravo'=>'2','Charlie'=>'3','Delta'=>'4','Echo'=>'5','Foxtrot'=>'6','Golf'=>'7','Hotel'=>'8','India'=>'9','Juliet'=>'10','Kilo'=>'11','Lima'=>'12','Mike'=>'13','November'=>'14','Oscar'=>'15','Papa'=>'16','Quebec'=>'17','Romeo'=>'18','Sierra'=>'19','Tango'=>'20','Uniform'=>'21','Victor'=>'22','Whiskey'=>'23','X-Ray'=>'24','Yankee'=>'25','Zulu'=>'26'); // make an array of country names $country_array = array('Null'=>'','Unknown'=>'--','Afghanistan'=>'AF','Albania'=>'AL','Algeria'=>'DZ','American Samoa'=>'AS','Andorra'=>'AD','Angola'=>'AO','Anguilla'=>'AI','Antarctica'=>'AQ','Antigua'=>'AG','Argentina'=>'AR','Armenia'=>'AM','Aruba'=>'AW','Australia'=>'AU','Austria'=>'AT','Azerbaijan'=>'AZ','Bahamas'=>'BS','Bahrain'=>'BH','Bangladesh'=>'BD','Barbados'=>'BB','Belarus'=>'BY','Belgium'=>'BE','Belize'=>'BZ','Benin'=>'BJ','Bermuda'=>'BM','Bhutan'=>'BT','Bolivia'=>'BO','Bosnia'=>'BA','Botswana'=>'BW','Bouvet Island'=>'BV','Brazil'=>'BR','Indian Ocean'=>'IO','Brunei Darussalum'=>'BN','Bulgaria'=>'BG','Burkina Faso'=>'BF','Burundi'=>'BI','Cambodia'=>'KH','Cameroon'=>'CM','Canada'=>'CA','Cape Verde'=>'CV','Cayman Islands'=>'KY','Central Africa'=>'CF','Chad'=>'TD','Chile'=>'CL','China'=>'CN','Christmas Island'=>'CX','Cocos Islands'=>'CC','Columbia'=>'CO','Comoros'=>'KM','Congo'=>'CG','Republic of Congo'=>'CD','Cook Islands'=>'CK','Costa Rica'=>'CR','Ivory Coast'=>'CI','Croatia'=>'HR','Cuba'=>'CU','Cyprus'=>'CY','Czech Repuplic'=>'CZ','Denmark'=>'DK','Djibouti'=>'DJ','Dominica'=>'DM','Dominican Republic'=>'DO','East Timor'=>'TP','Ecuador'=>'EC','Egypt'=>'EG','El Salvador'=>'SV','Equatorial Guinea'=>'GQ','Eritrea'=>'ER','Estonia'=>'EE','Ethiopia'=>'ET','Falkland Islands'=>'FK','Faroe Islands'=>'FO','Fiji'=>'FJ','Finland'=>'FI','France'=>'FR','Metropolitan France'=>'FX','French Guiana'=>'GF','French Polynesia'=>'PF','French Territories'=>'TF','Gabon'=>'GA','Gambia'=>'GM','Georgia'=>'GE','Germany'=>'DE','Ghana'=>'GH','Gibraltar'=>'GI','Greece'=>'GR','Greenland'=>'GL','Grenada'=>'GD','Guadeloupe'=>'GP','Guam'=>'GU','Guatemala'=>'GT','Guinea'=>'GN','Guinea-Bissau'=>'GW','Guyana'=>'GY','Haiti'=>'HT','McDonald Islands'=>'HM','Vatican City'=>'VA','Honduras'=>'HN','Hong Kong'=>'HK','Hungary'=>'HU','Iceland'=>'IS','India'=>'IN','Indonesia'=>'ID','Iran'=>'IR','Iraq'=>'IQ','Ireland'=>'IE','Israel'=>'IL','Italy'=>'IT','Jamaica'=>'JM','Japan'=>'JP','Jordan'=>'JO','Kazakstan'=>'KZ','Kenya'=>'KE','Kiribati'=>'KI','North Korea'=>'KP','South Korea'=>'KR','Kuwait'=>'KW','Kyrgyzstan'=>'KG','Lao'=>'LA','Latvia'=>'LV','Lebanon'=>'LB','Lesotho'=>'LS','Liberia'=>'LR','Libya'=>'LY','Liechtenstein'=>'LI','Lithuania'=>'LT','Luxembourg'=>'LU','Macau'=>'MO','Macedonia'=>'MK','Madagascar'=>'MG','Malawi'=>'MW','Malaysia'=>'MY','Maldives'=>'MV','Mali'=>'ML','Malta'=>'MT','Marshall Islands'=>'MH','Martinique'=>'MQ','Mauritania'=>'MR','Mauritius'=>'MU','Mayotte'=>'YT','Mexico'=>'MX','Micronesia'=>'FM','Moldova'=>'MD','Monaco'=>'MC','Mongolia'=>'MN','Montserrat'=>'MS','Morocco'=>'MA','Mozambique'=>'MZ','Myanmar'=>'MM','Namibia'=>'NA','Nauru'=>'NR','Nepal'=>'NP','Netherlands'=>'NL','Netherlands Antilles'=>'AN','New Caledonia'=>'NC','New Zealand'=>'NZ','Nicaragua'=>'NI','Niger'=>'NE','Nigeria'=>'NG','Niue'=>'NU','Norfolk Island'=>'NF','Mariana Islands'=>'MP','Norway'=>'NO','Oman'=>'OM','Pakistan'=>'PK','Palau'=>'PW','Palestine'=>'PS','Panama'=>'PA','Papua New Guinea'=>'PG','Paraguay'=>'PY','Peru'=>'PE','Philippines'=>'PH','Pitcairn'=>'PN','Poland'=>'PL','Portugal'=>'PT','Puerto Rico'=>'PR','Qatar'=>'QA','Reunion'=>'RE','Romania'=>'RO','Russia'=>'RU','Rwanda'=>'RW','Saint Helena'=>'SH','Saint Kitts'=>'KN','Saint Lucia'=>'LC','Saint Pierre'=>'PM','Saint Vincent'=>'VC','Samoa'=>'WS','San Marino'=>'SM','Sao Tome'=>'ST','Saudi Arabia'=>'SA','Senegal'=>'SN','Seychelles'=>'SC','Sierra Leone'=>'SL','Singapore'=>'SG','Slovakia'=>'SK','Slovenia'=>'SI','Solomon Islands'=>'SB','Somalia'=>'SO','South Africa'=>'ZA','Sandwich Islands'=>'GS','Spain'=>'ES','Sri Lanka'=>'LK','Sudan'=>'SD','Suriname'=>'SR','Svalbard'=>'SJ','Swaziland'=>'SZ','Sweden'=>'SE','Switzerland'=>'CH','Syria'=>'SY','Taiwan'=>'TW','Tajikistan'=>'TJ','Tanzania'=>'TZ','Thailand'=>'TH','Togo'=>'TG','Tokelau'=>'TK','Tonga'=>'TO','Trinidad'=>'TT','Tunisia'=>'TN','Turkey'=>'TR','Turkmenistan'=>'TM','Turks Islands'=>'TC','Tuvalu'=>'TV','Uganda'=>'UG','Ukraine'=>'UA','United Arab Emirates'=>'AE','United Kingdom'=>'GB','United States'=>'US','US Minor Outlying Islands'=>'UM','Uruguay'=>'UY','Uzbekistan'=>'UZ','Vanuatu'=>'VU','Venezuela'=>'VE','Vietnam'=>'VN','Virgin Islands (British)'=>'VG','Virgin Islands (US)'=>'VI','Wallis and Futuna'=>'WF','Western Sahara'=>'EH','Yemen'=>'YE','Yugoslavia'=>'YU','Zambia'=>'ZM','Zimbabwe'=>'ZW'); // function to create and display scoreboard function scoreboard() { global $table_suffix, $server_ID, $server_name, $mode_array, $map_array, $squad_array, $country_array; echo' <div class="middlecontent"> <table width="100%" border="0"> <tr> <th>' . $server_name . ' Scoreboard</th> </tr> <tr> <td> '; // query for player in server and order them by team $scoreboard_players = @mysql_query("SELECT `TeamID` FROM tbl_currentplayers{$table_suffix} WHERE `ServerID` = '$server_ID' ORDER BY `TeamID` ASC"); if(@mysql_num_rows($scoreboard_players)==0) { // initialize values $mode_name = 'Unknown'; $map_name = 'Unknown'; $mode = 'Unknown'; // figure out current game mode and map name $mode_query = @mysql_query("SELECT `mapName`, `Gamemode` FROM tbl_server{$table_suffix} WHERE `ServerID` = '$server_ID'"); if(@mysql_num_rows($mode_query)!=0) { $mode_row = @mysql_fetch_assoc($mode_query); // convert mode to friendly name $mode = $mode_row['Gamemode']; $mode_name = array_search($mode,$mode_array); // convert map to friendly name $map_name = strtoupper($mode_row['mapName']); $map_name = array_search($map_name,$map_array); } echo ' <div class="innercontent"> <table width="65%" align="center" border="0" class="prettytable"> <tr> <td width="25%" style="text-align:left"> <font class="information">Current Game Mode:</font></td> <td width="25%" style="text-align:left"> ' . $mode_name . '</td> <td width="25%" style="text-align:left"> <font class="information">Current Map:</font></td> <td width="25%" style="text-align:left"> ' . $map_name . '</td> </tr> <tr> <td colspan="4"> </td> </tr> <tr> <td colspan="4"><center><font class="information">No players currently in ' . $server_name . ' server.</font></center></td> </tr> </table> </div> '; } else { echo ' <div class="innercontent"> <table width="95%" align="center" border="0"> <tr> <td> '; // initialize values $mode_name = 'Unknown'; $map_name = 'Unknown'; $mode = 'Unknown'; // figure out current game mode and map name $mode_query = @mysql_query("SELECT `mapName`, `Gamemode` FROM tbl_server{$table_suffix} WHERE `ServerID` = '$server_ID'"); if(@mysql_num_rows($mode_query)!=0) { $mode_row = @mysql_fetch_assoc($mode_query); // convert mode to friendly name $mode = $mode_row['Gamemode']; $mode_name = array_search($mode,$mode_array); // convert map to friendly name $map_name = strtoupper($mode_row['mapName']); $map_name = array_search($map_name,$map_array); } // initialize values $mode_shown = 0; $last_team = -1; while($team_row = @mysql_fetch_assoc($scoreboard_players)) { $this_team = $team_row['TeamID']; if($this_team != $last_team) { // only show the header information once if($mode_shown == 0) { echo ' <table width="75%" align="center" border="0" class="prettytable"> <tr> <td width="25%" style="text-align:left"> <font class="information">Current Game Mode:</font></td> <td width="25%" style="text-align:left"> ' . $mode_name . '</td> <td width="25%" style="text-align:left"> <font class="information">Current Map:</font></td> <td width="25%" style="text-align:left"> ' . $map_name . '</td> </tr> </table> '; $mode_shown = 1; } // change team name shown depending on team number if($this_team == 0) { $team_name = 'Loading In'; } else { if(($mode == 'RushLarge0') OR ($mode == 'SquadRush0')) { if($this_team == 1) { $team_name = 'Attackers'; } elseif($this_team == 2) { $team_name = 'Defenders'; } else { $team_name = 'Team ' . $this_team; } } elseif(($mode == 'TeamDeathMatchC0') OR ($mode == 'ConquestAssaultLarge0') OR ($mode == 'ConquestAssaultSmall1') OR ($mode == 'ConquestAssaultSmall0') OR ($mode == 'GunMaster0') OR ($mode == 'Domination0') OR ($mode == 'Scavenger0') OR ($mode == 'TankSuperiority0') OR ($mode == 'ConquestLarge0') OR ($mode == 'ConquestSmall0') OR ($mode == 'TeamDeathMatch0')) { if($this_team == 1) { $team_name = 'US Army'; } elseif($this_team == 2) { $team_name = 'Russian Army'; } else { $team_name = 'Team ' . $this_team; } } elseif(($mode == 'SquadDeathMatch0')) { if($this_team == 1) { $team_name = 'Alpha'; } elseif($this_team == 2) { $team_name = 'Bravo'; } elseif($this_team == 3) { $team_name = 'Charlie'; } elseif($this_team == 4) { $team_name = 'Delta'; } else { $team_name = 'Team ' . $this_team; } } else { $team_name = 'Team ' . $this_team; } } echo ' <table width="75%" align="center" border="0" class="prettytable"> <tr> '; // change team color depending... if($this_team == 0) { echo '<th width="15%" class="prettyheader">' . $team_name . '</th>'; } else { echo '<th width="15%" class="prettyheader"><font class="teamname">' . $team_name . '</font></th>'; } echo '<th width="30%" class="prettyheader" colspan="2" style="text-align:left">Player</th>'; // if player is loading in, don't show the score, kills, deaths, or squad name headers if($this_team == 0) { echo '<th width="55%" class="prettyheader" colspan="4"> </th>'; } else { echo' <th width="14%" class="prettyheader" style="text-align:left">Score</th> <th width="13%" class="prettyheader" style="text-align:left">Kills</th> <th width="14%" class="prettyheader" style="text-align:left">Deaths</th> <th width="14%" class="prettyheader" style="text-align:left">Squad</th> '; } echo'</tr>'; // query all players on this team $scoreboard_query = @mysql_query("SELECT `ServerID`, `Soldiername`, `Score`, `Kills`, `Deaths`, `TeamID`, `SquadID`, `CountryCode` FROM tbl_currentplayers{$table_suffix} WHERE ServerID = '$server_ID' AND `TeamID` = '$this_team' ORDER BY `Score` Desc"); if(@mysql_num_rows($scoreboard_query)!=0) { $count = 1; while($scoreboard_row = @mysql_fetch_assoc($scoreboard_query)) { $player = $scoreboard_row['Soldiername']; $score = $scoreboard_row['Score']; $kills = $scoreboard_row['Kills']; $deaths = $scoreboard_row['Deaths']; $team = $scoreboard_row['TeamID']; $squad = $scoreboard_row['SquadID']; // convert squad name and country name to friendly names $squad_name = array_search($squad,$squad_array); $country = strtoupper($scoreboard_row['CountryCode']); $country_name = array_search($country,$country_array); echo ' <tr> <td style="text-align:right" width="12%">' . $count . ': </td> <td style="text-align:left" width="15%"> <a href="' . $_SERVER['PHP_SELF'] . '_player_name=' . $player . '&search_player=Search"><font size="2">' . $player . '</font></a></td> <td style="text-align:left" width="15%"> ' . $country_name . '</td> '; // if player is loading in, don't show the score, kills, deaths, or squad name if($this_team == 0) { echo ' <td style="text-align:left" colspan="4"> </td> </tr> '; } else { echo ' <td style="text-align:left" width="12%"> ' . $score . '</td> <td style="text-align:left" width="12%"> ' . $kills . '</td> <td style="text-align:left" width="15%"> ' . $deaths . '</td> <td style="text-align:left" width="12%"> ' . $squad_name . '</td> </tr> '; } $count++; } } echo ' </table> '; } $last_team = $this_team; } echo ' </td> </tr> </table> </div> '; } echo ' </td></tr> </table> </div> '; }It can be called up in the code by scoreboard();. It requires global variables $table_suffix, $server_ID, $server_name, $mode_array, $map_array, $squad_array, and $country_array to be set ahead of time. I have included $mode_array, $map_array, $squad_array, and $country_array in the code above already. $table_suffix should be set to null if no table suffix is used.This will create a scoreboard like this:score_board.pngIt will work, but you will need to format the HTML and CSS to use RMG-Dr4k3's format otherwise it will look funny. Also, the player name links will need to be modified to properly link to RMG-Dr4k3's player pages.Hope that gives someone a head start. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2013 Author Share Posted January 18, 2013 Originally Posted by supermillhouse*: Cool. I might be able to do something with this. Let's see how I get on. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by supermillhouse*: Code: // query all players on this team $scoreboard_query = mysqli_query($dbconn,"SELECT ServerID, Soldiername, Score, Kills, Deaths, TeamID, SquadID, CountryCode FROM tbl_currentplayers WHERE ServerID = 1 AND TeamID = $this_team ORDER BY Score Desc"); if(mysqli_num_rows($scoreboard_query)!=0) { $count = 1; while($scoreboard_row = mysqli_fetch_assoc($scoreboard_query)) { $player = $scoreboard_row['Soldiername']; $score = $scoreboard_row['Score']; $kills = $scoreboard_row['Kills']; $deaths = $scoreboard_row['Deaths']; $team = $scoreboard_row['TeamID']; $squad = $scoreboard_row['SquadID']; // convert squad name and country name to friendly names $squad_name = array_search($squad,$squad_array); $country = strtoupper($scoreboard_row['CountryCode']); $country_name = array_search($country,$country_array); echo ' <tr> <td style="text-align:right" width="12%">' . $count. ': </td> <td style="text-align:left" width="15%"> <a href="' . $_SERVER['PHP_SELF'] . '_player_name=' . $player . '&search_player=Search"><font size="2">' . $player . '</font></a></td> <td style="text-align:left" width="15%"> ' . $country_name . '</td> '; // if player is loading in, don't show the score, kills, deaths, or squad name if($this_team == 0) { echo ' <td style="text-align:left" colspan="4"> </td> </tr> '; } else { echo ' <td style="text-align:left" width="12%"> ' . $score . '</td> <td style="text-align:left" width="12%"> ' . $kills . '</td> <td style="text-align:left" width="15%"> ' . $deaths . '</td> <td style="text-align:left" width="12%"> ' . $squad_name . '</td> </tr> '; } $count++; } }How do i go about using "$player" to look up the playerID that is in the tbl_playerdata table so i can use it to select a player in players.php I know too many uses of the word "player" Every way i have tried fails so far. I assume i have to do the mysqli_query within in the "while" Rergrds Ian so far http://test.slagsareus.com/index.php only just got it to connect * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by ty_ger07*: I am confused. What are you asking? What do you need the player for and what are you trying to do? The code already has the queries necessary to get and display the current players in the server on a scoreboard. Here is a brief summary of the code I pasted above: $mode_array = ...; $map_array = ...; $squad_array = ...; $country_array = ...; function scoreboard() { magic; } To make it work, all it needs is some stuff added. I will highlight the things which need to be added. $table_suffix = ''; $server_ID = '1'; $mode_array = ...; $map_array = ...; $squad_array = ...; $country_array = ...; function scoreboard() { magic; } ... scoreboard(); If you aren't using table suffixes, just set table suffix to null ( '' ). Default server ID is 1. Then, call up the scoreboard later on in the code wherever you want it to appear by calling function scoreboard();. How to incorporate it into RMG-Dr4k3's code? I have no idea. I haven't looked at his code. I assume he has a general place where functions are stored where the functions are available to all the different scoreboard pages. And I assume that he handled the connecting to the database part already. EDIT: Oh, I understand your question now... You need to know the player ID to link to the player's stats page since his code searches players based on player ID instead of player name. New post coming... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by ty_ger07*: You know that I have a "competing" stats page code, right? www.phogue.net/forumvb/showth...apstats-Logger* It's kind of funny that the original author isn't helping you with this instead of me... First of all, you have to realize that players on the scoreboard may not yet be in the stats database. The database updates player stats when the round is over. So, if a player joins for the first time, the first round they play, they will be on the scoreboard but not in the stats system (no player ID). So, you will need to expect this issue in the code. So, we will initialize $player_id as 'Unknown'. If it finds a player ID for that player, it will update the player ID to the correct player ID. Then, later, if $player_id is 'Unknown', we will not make it a link. Otherwise, we will make it a link. You are correct. The modification needs to be made within the while loop. Here is the modified while loop code: Code: while($scoreboard_row = @mysql_fetch_assoc($scoreboard_query)) { $player = $scoreboard_row['Soldiername']; // initialize value $player_id = 'Unknown'; // query for player id $query = @mysql_query("SELECT `PlayerID` FROM tbl_playerdata{$table_suffix} WHERE `SoldierName` = '$player'"); if(@mysql_num_rows($query)!=0) { $row = @mysql_fetch_assoc($query); $player_id = $row['PlayerID']; } $score = $scoreboard_row['Score']; $kills = $scoreboard_row['Kills']; $deaths = $scoreboard_row['Deaths']; $team = $scoreboard_row['TeamID']; $squad = $scoreboard_row['SquadID']; // convert squad name and country name to friendly names $squad_name = array_search($squad,$squad_array); $country = strtoupper($scoreboard_row['CountryCode']); $country_name = array_search($country,$country_array); echo ' <tr> <td style="text-align:right" width="12%">' . $count . ': </td> // if player ID is not 'Unknown', make it a link if($player_id != 'Unknown') { <td style="text-align:left" width="15%"> <a href="' . $_SERVER['PHP_SELF'] . '_pid=' . $player_id . '"><font size="2">' . $player . '</font></a></td> } else { <td style="text-align:left" width="15%"> <font size="2">' . $player . '</font></td> } <td style="text-align:left" width="15%"> ' . $country_name . '</td> '; // if player is loading in, don't show the score, kills, deaths, or squad name if($this_team == 0) { echo ' <td style="text-align:left" colspan="4"> </td> </tr> '; } else { echo ' <td style="text-align:left" width="12%"> ' . $score . '</td> <td style="text-align:left" width="12%"> ' . $kills . '</td> <td style="text-align:left" width="15%"> ' . $deaths . '</td> <td style="text-align:left" width="12%"> ' . $squad_name . '</td> </tr> '; } $count++; }I haven't tested it, but that should work. Then, you will just need to fix some of your integration errors where the DIVs or Tables are competing and throwing the page a bit out of whack. Primarily the "Select returned 0 rows." thing looks a bit odd. Don't know what it means or why it is there. http://validator.w3.org/check_uri=ht...alidator%2F1.2 EDIT: Really confused about his methodology of identifying players. I don't know if he is using player id or stats id and also don't know if he is taking server id into consideration. Good luck. Either it will work or will link to the wrong person's profile. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by supermillhouse*: You know that I have a "competing" stats page code, right? www.phogue.net/forumvb/showth...apstats-Logger* It's kind of funny that the original author isn't helping you with this instead of me... First of all, you have to realize that players on the scoreboard may not yet be in the stats database. The database updates player stats when the round is over. So, if a player joins for the first time, the first round they play, they will be on the scoreboard but not in the stats system (no player ID). So, you will need to expect this issue in the code. So, we will initialize $player_id as 'Unknown'. If it finds a player ID for that player, it will update the player ID to the correct player ID. Then, later, if $player_id is 'Unknown', we will not make it a link. Otherwise, we will make it a link. You are correct. The modification needs to be made within the while loop. Here is the modified while loop code: Code: while($scoreboard_row = @mysql_fetch_assoc($scoreboard_query)) { $player = $scoreboard_row['Soldiername']; // initialize value $player_id = 'Unknown'; // query for player id $query = @mysql_query("SELECT `PlayerID` FROM tbl_playerdata{$table_suffix} WHERE `SoldierName` = '$player'"); if(@mysql_num_rows($query)!=0) { $row = @mysql_fetch_assoc($query); $player_id = $row['PlayerID']; } $score = $scoreboard_row['Score']; $kills = $scoreboard_row['Kills']; $deaths = $scoreboard_row['Deaths']; $team = $scoreboard_row['TeamID']; $squad = $scoreboard_row['SquadID']; // convert squad name and country name to friendly names $squad_name = array_search($squad,$squad_array); $country = strtoupper($scoreboard_row['CountryCode']); $country_name = array_search($country,$country_array); echo ' <tr> <td style="text-align:right" width="12%">' . $count . ': </td> // if player ID is not 'Unknown', make it a link if($player_id != 'Unknown') { <td style="text-align:left" width="15%"> <a href="' . $_SERVER['PHP_SELF'] . '_pid=' . $player_id . '"><font size="2">' . $player . '</font></a></td> } else { <td style="text-align:left" width="15%"> <font size="2">' . $player . '</font></td> } <td style="text-align:left" width="15%"> ' . $country_name . '</td> '; // if player is loading in, don't show the score, kills, deaths, or squad name if($this_team == 0) { echo ' <td style="text-align:left" colspan="4"> </td> </tr> '; } else { echo ' <td style="text-align:left" width="12%"> ' . $score . '</td> <td style="text-align:left" width="12%"> ' . $kills . '</td> <td style="text-align:left" width="15%"> ' . $deaths . '</td> <td style="text-align:left" width="12%"> ' . $squad_name . '</td> </tr> '; } $count++; }I haven't tested it, but that should work. Then, you will just need to fix some of your integration errors where the DIVs or Tables are competing and throwing the page a bit out of whack. Primarily the "Select returned 0 rows." thing looks a bit odd. Don't know what it means or why it is there. http://validator.w3.org/check_uri=ht...alidator%2F1.2 EDIT: Really confused about his methodology of identifying players. I don't know if he is using player id or stats id and also don't know if he is taking server id into consideration. Good luck. Either it will work or will link to the wrong person's profile. Worked pretty well, just had to change a few things so it worked with mysqli Just had a look through the playerstats.php and your correct in saying he is using StatsID. At what point would they ever be different? I had a look through the database and the all, I think, look the same. I am very grateful for your help and I will an a link to your site on the bottom for your efforts if that's OK. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by XpKiller*: PlayerID and StatsID are not the same thing * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by supermillhouse*: PlayerID and StatsID are not the same thingcan you explain this please. What PlayerID is used for and StatsID is used for. Regards Supermillhouse * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by XpKiller*: The PlayerID is belong to the general Playerinfos like guid, name or ip. The StatsID is assign as to a combination of PlayerID and ServerID. In a result of that if you have one server StatID and PlayerID looks identically. If you have more than one server a PlayerID can have multiply StatsIDs. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by supermillhouse*: Take a look see now. Think I'm getting there, need to tidy up the code a bit yet but visually I am happy with it http://www.test.slagsareus.com/index.php * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by ty_ger07*: Take a look see now. Think I'm getting there, need to tidy up the code a bit yet but visually I am happy with it http://www.test.slagsareus.com/index.php Looks like you are almost there. I did notice that all three table widths are different. Might want to make the US Army and Russians have the same scoreboard width. table_width.jpg Also, might want to remove this from the bottom of the page "Real time server stat by: BF3_Conn |". * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2013 Author Share Posted January 19, 2013 Originally Posted by supermillhouse*:I see what you are saying, i take it that is in firefox or chrome is it. On IE9 it looks ok, i believe it is down to firefox not liking <div width = "100%"> ...stuff... </div>I could probably substitute the div for something else or do you know of a way of geting it to work?do you know if moving the width control to a style sheet works? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 20, 2013 Author Share Posted January 20, 2013 Originally Posted by ronald32*: Hey there does anyone know how to fix the game server is offline error but my server is already online and and all other things work fine on it i am very confused ? Pliz have a look and let me know thanks people!! http://playerstats.clanservers.com/Folder%201/ * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 20, 2013 Author Share Posted January 20, 2013 Originally Posted by ty_ger07*: Did you look at the previous half-dozen posts? I just got done helping supermillhouse with that issue. Also, I have stats page code here which does not have that issue: www.phogue.net/forumvb/showth...apstats-Logger* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 20, 2013 Author Share Posted January 20, 2013 Originally Posted by ronald32*: I had look at previous posts i nearly read all of them but some of them didnt make sense since i am a noob in php and if someone can help me in simple php terms i mite understand and sorry about being a pain in your ass my apologizes and i just want the page because it looks cool and i already got your page working like charm and your work is very nice was amazing !! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 20, 2013 Author Share Posted January 20, 2013 Originally Posted by supermillhouse*: I will get around to posting the mod when I get it completed. A formatting problem with Firefox and safari needs to be sorted and I need do remove irrelevant code. If you can get it to work from the posts previous them go for it but there is no point going through the same processes repeatedly. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 26, 2013 Author Share Posted January 26, 2013 Originally Posted by supermillhouse*: Getting there. Have updated the weapon images, just have maps to go. There is a bug with player rank and ie9. At the top were it lists 12 headings it doesn't create a row below with the rank. If any web page coders can figure it out let me know. It works ok in firefox and safari just not ie9. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 2, 2013 Author Share Posted February 2, 2013 Originally Posted by ronald32*: Any luck in getting it to work? Can't wait for it man so excited * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 2, 2013 Author Share Posted February 2, 2013 Originally Posted by supermillhouse*: Should be sorted now, take a look at http://www.test.slagsareus.com Download: http://www.downloads.supermillhouse....t_v1.5.0.3.zip 30 sec refresh plus fix stats link See if you can find any problems with it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 3, 2013 Author Share Posted February 3, 2013 Originally Posted by ty_ger07*: Should be sorted now, take a look at http://www.test.slagsareus.com Download: http://www.downloads.supermillhouse....t_v1.5.0.1.zip see if you can find any problems with it. website is a bit laggy at the mo, 500 internal server errors and such I am wondering why the content refreshes every ~8 seconds. That is quite excessive and might be contributing to your high server load if multiple users are viewing the page. The scoreboard information is usually only updated every 30 - 60 seconds, so it isn't necessary to refresh the content every 8 seconds. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 3, 2013 Author Share Posted February 3, 2013 Originally Posted by supermillhouse*: I am wondering why the content refreshes every ~8 seconds. That is quite excessive and might be contributing to your high server load if multiple users are viewing the page. The scoreboard information is usually only updated every 30 - 60 seconds, so it isn't necessary to refresh the content every 8 seconds.I just left it at what RMG-Dr4k3 set it at, but on your advice i have put a second one in at 30 secChange header('Refresh: 10'); in the index.php file to 30 or 60 to slow it down. I will check with XPKiller to se how often it is updated * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 3, 2013 Author Share Posted February 3, 2013 Originally Posted by ty_ger07*: XpKiller says: The table gets updated everytime procon gets new full playerlist update (around every 30 sec. its adjustable to less updates.)Source:www.phogue.net/forumvb/showth...er-1-1-0-0-BF3* (in changelog) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 3, 2013 Author Share Posted February 3, 2013 Originally Posted by supermillhouse*: XpKiller says: Source: www.phogue.net/forumvb/showth...er-1-1-0-0-BF3* (in changelog) Cool thank you very much. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 5, 2013 Author Share Posted February 5, 2013 Originally Posted by SuizideFF*: I doesent see thisMageses but i had aktivate it in the procon plugin Ich kann die NAchrichten nicht sehen habe sie aber Aktiviert benutze BF3 Chat, GUID, Stats and Map Logger - 1.0.1.0 die Version vom Plugin was mach ich Falsch * Restored post. It could be that the author is no longer active. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.