Steam Authentication & Integration

Steam Authentication & Integration 1.6.3

No permission to download
Another thing to add to the requirements, PHP needs to be compiled with openssl support.

Most PHP repo packages have this in their binaries but if you run your stack from source you need to have PHP compiled with --with-openssl. I had to recompile PHP.
 
Any luck on this error?

file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=&steamids=76561197961354324): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized

  1. XenForo_Application::handlePhpError()
  2. file_get_contents() in Steam/ControllerPublic/Register.php at line 389
  3. Steam_ControllerPublic_Register->actionSteamRegister() in XenForo/FrontController.php at line 337
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in /home/revenantgaming/public_html/forum/index.php at line 13
 
Any luck on this error?

file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=&steamids=76561197961354324): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized

  1. XenForo_Application::handlePhpError()
  2. file_get_contents() in Steam/ControllerPublic/Register.php at line 389
  3. Steam_ControllerPublic_Register->actionSteamRegister() in XenForo/FrontController.php at line 337
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in /home/revenantgaming/public_html/forum/index.php at line 13

Did you put your SteamAPI key in the options?
 
Sorry, new to Xenforo, was looking around for options for steam int , but could never find it. Now works! Thanks!
 
Sorry, new to Xenforo, was looking around for options for steam int , but could never find it. Now works! Thanks!
Don't worry, I made the same mistake when I first started using this addon. Although, I think that's because Morgan's didn't had a field for it, iirc.
 
Just got this.

ErrorException: Undefined variable: content_decoded - /home/harpoong/public_html/forum/js/steam/jsonproxy.php:171
Generated By: Unknown Account, Today at 3:11 AM
Stack Trace
#0 /home/harpoong/public_html/forum/js/steam/jsonproxy.php(171): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/harpoong/...', 171, Array)
#1 {main}
Request State
array(3) {
["url"] => string(53) "http://forum.harpoongaming.com/js/steam/jsonproxy.php"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Help
I have no knowledge of databases apart from setting them up on cpanel I get this message and I would appreciate any help to get it fixed.
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY u.user_id ORDER BY hours DESC, u.user_id ASC LIMIT 25' at line 1

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
  5. Zend_Db_Adapter_Abstract->fetchAll() in Steam/Helper/Steam.php at line 281
  6. Steam_Helper_Steam->getGameOwnersHoursStats() in Steam/ControllerPublic/Steam.php at line 16
  7. Steam_ControllerPublic_Steam->actionIndex() in XenForo/FrontController.php at line 337
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/reignofc/public_html/index.php at line 13
Using MySQL 5.1

Thanks
 
Do you have any big forums running this addon? I'm concerned that it might affect our performance. We have 330,000 members and 1.6 million threads and 19 million posts.
 
Just got this.

I'll check it out. I'm shooting for a new release today, if not tomorrow.

Help
I have no knowledge of databases apart from setting them up on cpanel I get this message and I would appreciate any help to get it fixed.
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY u.user_id ORDER BY hours DESC, u.user_id ASC LIMIT 25' at line 1

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
  5. Zend_Db_Adapter_Abstract->fetchAll() in Steam/Helper/Steam.php at line 281
  6. Steam_Helper_Steam->getGameOwnersHoursStats() in Steam/ControllerPublic/Steam.php at line 16
  7. Steam_ControllerPublic_Steam->actionIndex() in XenForo/FrontController.php at line 337
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/reignofc/public_html/index.php at line 13
Using MySQL 5.1

Thanks

Could you give me a bit more context when this error occurs? This looked like it triggers on game stats collection for game owner hours. Were you using an older version of this addon previously? I haven't changed MySQL queries in it for awhile.

Oh and what version of PHP are you using? It looks like the query breaks at a particular PHP variable in the query.

Do you have any big forums running this addon? I'm concerned that it might affect our performance. We have 330,000 members and 1.6 million threads and 19 million posts.

I'm unfortunately just running a small community so I don't have that sort of test bed. I have seen it installed at other places such as http://www.valvetime.net/forum/ (13k members and 3.2 million messages).
 
I'm thinking about digging into the PHP for the Steam tabs and trying to reverse engineer a XenPorta block for this. One that will cross-reference the logged in user's games with the games on the Top Recently Played Games tab and return which game a user has that other users on the forum have been playing recently.

Before I start, has anyone done something like this already? Any tips? I'm not much of a PHP developer but I can usually hit it with a hammer until it works.
 
I'll check it out. I'm shooting for a new release today, if not tomorrow.



Could you give me a bit more context when this error occurs? This looked like it triggers on game stats collection for game owner hours. Were you using an older version of this addon previously? I haven't changed MySQL queries in it for awhile.

Oh and what version of PHP are you using? It looks like the query breaks at a particular PHP variable in the query.



I'm unfortunately just running a small community so I don't have that sort of test bed. I have seen it installed at other places such as http://www.valvetime.net/forum/ (13k members and 3.2 million messages).
Hi
Thanks for replying, it happens when you click on the "Steam statistics navbar tab", and Iam using version 1.3.4 and php is 5.3.
thanks
 
I have just discovered the problem goes away if there are no games listed in "included games".
It also shows me as offline even when I am and it is not logging the hours played.
 
Last edited:
Thanks. Can I ask where you might be adding to query loads? Forum List? Thread List?

The addon uses template hooks to place the SteamProfile. The addon itself has a javascript file (which I will minify in this next version) and a small style sheet. These should only be loaded on pages that require them.

As far as query loads, that depends on what options you configure it with it. Database queries will only run if you actively gather steam statistics or have the steam statistics tab operational. You can choose to disable the cron and turn of stat collecting entirely. Stats collection queries the Steam API with your API key on all users in your database that are integrated with the addon. It's one Steam API query per user on stats collection. Unfortunately it has to grab each user game's info one at a time because that's the only method available through the Steam API. Multiple profiles, however, can be grabbed with one query for SteamProfile (online/offline state, etc.).

SteamProfiles are loaded with JSON data and happen asynchronously to the page load, so it shouldn't hinder loading your forum data if a SteamProfile badge is on the page. It's also pulling the SteamID64 from XenForo's profile data, so there's no extra query being run on threads.

I have just discovered the problem goes away if there are no games listed in "included games".
It also shows me as offline even when I am and it is not logging the hours played.

What did you have included games set to previously? Perhaps I'm not sanitizing the input data well enough.

I'm thinking about digging into the PHP for the Steam tabs and trying to reverse engineer a XenPorta block for this. One that will cross-reference the logged in user's games with the games on the Top Recently Played Games tab and return which game a user has that other users on the forum have been playing recently.

Before I start, has anyone done something like this already? Any tips? I'm not much of a PHP developer but I can usually hit it with a hammer until it works.

I can't say for certain exactly because it's been a long while since I messed with XenPorta blocks. But you're going to have to build a query to pull that out of your database. Perhaps I would look at the "most recent" blocks and go from there.

The SQL query for Top Recently Played Games are located in \library\Steam\Helper\Steam.php and the function is getGamePlayedRecentStatisticsStats
 
Last edited:
@HowIChrgeLazer: Any progress on the activity bug? :)

As far as I can tell it's a quirk specific to Firefox, could even be a bug with how it handles ajax and jquery. Still looking, but it may not be possible to prevent it unless there's something that could be changed in XenForo or Firefox.

But that's speculation. I'm just running out of ideas at the moment.
 
Last edited:
What did you have included games set to previously? Perhaps I'm not sanitizing the input data well enough.


[/quote
Farming simulator 2013, cod4,
the only problem is if the above is put in the "Include Games" otherwise apart from it not shower us as online all is well.
 
It needs to the be APP ID of those apps, not the name.

Only display steam statistics from appids in this list. Comma delimited. Example: 440,550,4000 would only show stats from Team Fortress 2, Left 4 Dead 2, and Garry's Mod.

So for Farming simulator 2013 and cod4 you would input "220260,7940" (without the quotes). Also private profiles will not show online or collect stats.
 
The addon uses template hooks to place the SteamProfile. The addon itself has a javascript file (which I will minify in this next version) and a small style sheet. These should only be loaded on pages that require them.

As far as query loads, that depends on what options you configure it with it. Database queries will only run if you actively gather steam statistics or have the steam statistics tab operational. You can choose to disable the cron and turn of stat collecting entirely. Stats collection queries the Steam API with your API key on all users in your database that are integrated with the addon. It's one Steam API query per user on stats collection. Unfortunately it has to grab each user game's info one at a time because that's the only method available through the Steam API. Multiple profiles, however, can be grabbed with one query for SteamProfile (online/offline state, etc.).

SteamProfiles are loaded with JSON data and happen asynchronously to the page load, so it shouldn't hinder loading your forum data if a SteamProfile badge is on the page. It's also pulling the SteamID64 from XenForo's profile data, so there's no extra query being run on threads.
Thank you.
I wrote an addon for vBulletin which stored peoples' xbox gamercard information locally.
For those people who entered their gamer tags in a custom field of their profile, it displayed their card instead of their avatar in the xbox gaming forums.
It cached their data for 24 hours and then if one of their messages was displayed in the forums, the data was asynchronously read in. I added a small 'refresh' button which displayed the last updated datetime as a tooltip and refreshed the gamercard in place when clicked.
Have you considered replacing a users' avatar in specific forums in this way?
 
Back
Top Bottom