View Single Post
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 08-28-2014 , 18:50   Re: Fix SteamIDs for the new update
Reply With Quote #26

Quote:
Originally Posted by Phaiz View Post
I'm assuming that these "cosmetic" issues would include a players stats page not showing their avatar?
I didn't notice it was broken but to fix it just edit playerinfo_general.php and find the Player profile table and replace it with this.

PHP Code:
                                <tr class="data-table-head">
                                        <td style="vertical-align:top;">Player Profile<br /><br /></td>
                                        <td style="text-align:center; vertical-align:middle;" rowspan="7" id="player_avatar">
                                                <?php
                                                        $db
->query
                                                        
("
                                                                SELECT
                                                                        hlstats_PlayerUniqueIds.uniqueId,
                                                                        CONCAT('[U:1:',hlstats_PlayerUniqueIds.uniqueId,']') AS communityId
                                                                FROM
                                                                        hlstats_PlayerUniqueIds
                                                                WHERE
                                                                        hlstats_PlayerUniqueIds.playerId = '
$player'
                                                        "
);
                                                        list(
$uqid$coid) = $db->fetch_row();
                                                        
$pagedata file_get_contents("http://steamcommunity.com/profiles/$coid?xml=1");
                                                        
preg_match('/<onlineState>(.*?)<\/onlineState>/'$pagedata$results);
                                                        
preg_match('/<avatarFull><!\[CDATA\[(.*?)\]\]><\/avatarFull>/'$pagedata$results2);
                                                        
$status ucwords($results[1]);
                                                        
$avatar_full $results2[1];
                                                        
$avimg getImage("/avatars/$player");
                                                        if (
$avimg)
                                                        {
                                                                
$avatar_full $avimg['url'];
                                                        }
                                                        else if (
$avatar_full == '' || $playerdata['blockavatar'] == '1')
                                                        {
                                                                
$avatar_full IMAGE_PATH."/unknown.jpg";
                                                        }
                                                        if (
$status == '')
                                                                
$status '(Unknown)';
                                                        echo(
"<img src=\"$avatar_full\" style=\"height:158px;width:158px;\" alt=\"Steam Community Avatar\" />");
                                                
?>
                                        </td>
                                </tr>
__________________
bottiger is offline