diff --git a/plugins/steamprofile/class.steamprofile.plugin.php b/plugins/steamprofile/class.steamprofile.plugin.php index b1dfc85..d628e1e 100644 --- a/plugins/steamprofile/class.steamprofile.plugin.php +++ b/plugins/steamprofile/class.steamprofile.plugin.php @@ -87,9 +87,10 @@ private function CheckAuthentication($OpenIDRequest) { * * @param Gdn_Controller $Sender */ - public function ProfileController_SteamProfileOpenID_Create(&$Sender) { + public function ProfileController_SteamProfileOpenID_Create($Sender) { // Grabbing the $_GET array, processed by our framework $RequestGet = Gdn::Request()->Get(); + //die( '
' . print_r($RequestGet, true) . '' ); // Nabbing the mode of the OpenID request, if any $OpenIDMode = GetValue('openid_mode', $RequestGet); @@ -146,7 +147,8 @@ public function ProfileController_EditMyAccountAfter_Handler($Sender) { // Assisnging the retrieved data to the form field and loading up the form field view $Sender->SetData('SteamID64', $SteamID64); - $Sender->Render($this->GetView('steamcommunityid.php')); + //$Sender->Render($this->GetView('steamcommunityid.php')); + include($this->GetView('steamcommunityid.php')); } /** diff --git a/plugins/steamprofile/design/style.css b/plugins/steamprofile/design/style.css index 9813d22..6a19915 100644 --- a/plugins/steamprofile/design/style.css +++ b/plugins/steamprofile/design/style.css @@ -1,14 +1,14 @@ -dt.SteamMemberSince { } -dd.SteamMemberSince { } -dt.SteamPlayedGame { text-align: center; } -dd.SteamPlayedGame { } -dt.SteamPlayingTime { } -dd.SteamPlayingTime { } -dt.SteamRating { } -dd.SteamRating { } -dt.SteamUpdated { } -dd.SteamUpdated { } - -.SteamAvatar { text-align: center; } -.SteamBasicInfo { } +dt.SteamMemberSince { } +dd.SteamMemberSince { } +dt.SteamPlayedGame { text-align: center; } +dd.SteamPlayedGame { } +dt.SteamPlayingTime { } +dd.SteamPlayingTime { } +dt.SteamRating { } +dd.SteamRating { } +dt.SteamUpdated { } +dd.SteamUpdated { } + +.SteamAvatar { text-align: center; } +.SteamBasicInfo { } .SteamProfile { } \ No newline at end of file diff --git a/plugins/steamprofile/models/class.steamprofilemodel.php b/plugins/steamprofile/models/class.steamprofilemodel.php index 765b293..ae0bb30 100644 --- a/plugins/steamprofile/models/class.steamprofilemodel.php +++ b/plugins/steamprofile/models/class.steamprofilemodel.php @@ -1,59 +1,59 @@ -SQL - ->Select() - ->From('SteamProfileCache') - ->Where('SteamID64', $SteamID) - ->Where('DateRetrieved >', Gdn_Format::ToDateTime(strtotime('-5 minutes'))) - ->Get() - ->Firstrow(); - - // Any cached entries? - if ($CachedProfile) { - // ...if so, load up the profile XML into a SimpleXMLElement... - $CommunityProfile = simplexml_load_string($CachedProfile->ProfileXML, 'SimpleXMLElement', LIBXML_NOCDATA); - // set the DateRetrieved of the cached record and go - $CommunityProfile->DateRetrieved = $CachedProfile->DateRetrieved; - return $CommunityProfile; - } else { - // ...if not, attempt to grab the profile's XML - $CommunityProfile = simplexml_load_file('http://steamcommunity.com/profiles/'.$SteamID.'?xml=1', 'SimpleXMLElement', LIBXML_NOCDATA); - - // Were we able to successfully fetch the profile? - if ($CommunityProfile && !isset($CommunityProfile->error)) { - // ...if so, insert or update the profile XML into the cache table - $this->SQL->Replace( - 'SteamProfileCache', - array('SteamID64' => $SteamID, 'ProfileXML' => $CommunityProfile->asXML(), 'DateRetrieved' => Gdn_Format::ToDateTime()), - array('SteamID64' => $SteamID), - TRUE - ); - - // Set the DateRetrieved record to now and go - $CommunityProfile->DateRetrieved = Gdn_Format::ToDateTime(); - return $CommunityProfile; - } - } - } - - // If we hit this point, something bad has happened. - return FALSE; - } -} +SQL + ->Select() + ->From('SteamProfileCache') + ->Where('SteamID64', $SteamID) + ->Where('DateRetrieved >', Gdn_Format::ToDateTime(strtotime('-5 minutes'))) + ->Get() + ->Firstrow(); + + // Any cached entries? + if ($CachedProfile) { + // ...if so, load up the profile XML into a SimpleXMLElement... + $CommunityProfile = simplexml_load_string($CachedProfile->ProfileXML, 'SimpleXMLElement', LIBXML_NOCDATA); + // set the DateRetrieved of the cached record and go + $CommunityProfile->DateRetrieved = $CachedProfile->DateRetrieved; + return $CommunityProfile; + } else { + // ...if not, attempt to grab the profile's XML + $CommunityProfile = simplexml_load_file('http://steamcommunity.com/profiles/'.$SteamID.'?xml=1', 'SimpleXMLElement', LIBXML_NOCDATA); + + // Were we able to successfully fetch the profile? + if ($CommunityProfile && !isset($CommunityProfile->error)) { + // ...if so, insert or update the profile XML into the cache table + $this->SQL->Replace( + 'SteamProfileCache', + array('SteamID64' => $SteamID, 'ProfileXML' => $CommunityProfile->asXML(), 'DateRetrieved' => Gdn_Format::ToDateTime()), + array('SteamID64' => $SteamID), + TRUE + ); + + // Set the DateRetrieved record to now and go + $CommunityProfile->DateRetrieved = Gdn_Format::ToDateTime(); + return $CommunityProfile; + } + } + } + + // If we hit this point, something bad has happened. + return FALSE; + } +} diff --git a/plugins/steamprofile/views/panel.php b/plugins/steamprofile/views/panel.php index 8dfa91f..6542137 100644 --- a/plugins/steamprofile/views/panel.php +++ b/plugins/steamprofile/views/panel.php @@ -1,33 +1,33 @@ - -