diff --git a/index.html b/index.html index 99dc962..07da39d 100644 --- a/index.html +++ b/index.html @@ -86,7 +86,8 @@ function process_steam_profile(xml) { var prof = $(xml).find('profile'); - if (prof.find('steamid').text() == '0') + var steamid = prof.find('steamid').text(); + if (steamid == '0') { $('img.avatar').hide(); popover('#loginpopover'); @@ -94,7 +95,13 @@ } // if if (prof.find('valid').text() != '1') + { + $('img.avatar').hide(); + var url = 'http://steamcommunity.com/profiles/' + steamid + '/edit/settings'; + $('a#privpage').attr('href', url); + popover('#privateprofilepopover'); return null; + } // if var retval = { nickname: prof.find('nickname').text(), @@ -443,6 +450,21 @@ Click here to log in through steamcommunity.com

+ +
+
+

Your Steam Community profile appears to be set to private.

+
+

You need to change your Steam Community settings to access this page.

+

The "profile status" must be set to "public."

+

Please note that this will let everyone see your information!

+

Unfortunately, it's the only way this site can see it, too.

+
+

+ Click here to go to your steamcommunity.com settings.

+
+
+
diff --git a/steamprofile.php b/steamprofile.php index d1735a5..af72f09 100644 --- a/steamprofile.php +++ b/steamprofile.php @@ -33,11 +33,12 @@ function dump_array_as_xml($name, $a) exit(0); } // if -$profile = load_steam_profile($_SESSION['steamid']); +$steamid = $_SESSION['steamid']; +$profile = load_steam_profile($steamid); if ($profile == NULL) { - print('0'); + print("$steamid0"); exit(0); } // if diff --git a/style.css b/style.css index 625251b..9d6ab9c 100644 --- a/style.css +++ b/style.css @@ -116,6 +116,19 @@ img.avatar { font-size:13px; } +#privateprofilepopover { + display:none; + position:fixed; + _position:absolute; /* hack for internet explorer 6*/ + width:408px; + background:#FF0000; + color:#FFFFFF; + border:2px solid #cecece; + z-index:2; + padding:12px; + font-size:13px; +} + div.taglist { display: inline; }