Steam Authentication & Integration

Steam Authentication & Integration 1.6.3

No permission to download
It's because the steam profile uses the extra message user info hook to place it into the template. You'd have to edit your template with TMS or hard edit the sidebar with something like:

<xen:if is="{$user.steam_auth_id} > 0"><dd><div class="steamprofile" title="{$user.steam_auth_id}"></div></dd></xen:if>

And put that under your banner/avatar.

From what I understand, 1.2 will be more versatile in that regard. I'm going to try updating this addon for that upcoming version when I get some free time.
 
Checked the error logs for the past few days and found the following..

Code:
ErrorException: file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?steamids=76561113090627817,76561198041188414&amp;key=6AEF116D76072654654A2E14991A6CD3): failed to open stream: HTTP request failed! - /home/user1/public_html/js/steam/jsonproxy.php:86
Code:
ErrorException: file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?steamids=76561113090627817&amp;key=6AEF116D76072654654A2E14991A6CD3): failed to open stream: Connection timed out - /home/user1/public_html/js/steam/jsonproxy.php:86
Code:
ErrorException: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known - /home/user1/public_html/js/steam/jsonproxy.php:86
Code:
ErrorException: file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?steamids=76561113090627817&amp;key=6AEF116D76072654654A2E14991A6CD3): failed to open stream: Connection timed out - /home/user1/public_html/js/steam/jsonproxy.php:86

Any idea when/why this error is occurring and is there a possible fix for it?

Thanks!
 
file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known

This might be a DNS resolution issue on your webserver to api.steamcommunity.com.

As for the others, you had timeouts. This could also be connected to a possible DNS issue or your webserver had problems reaching the steam community api (which could have been on valve's end or yours). You're also not using cURL, so it is a bit more unreliable and slow.
 
Hmm just installed it and tried to associate my name with it and getting this error on the part where you enter your forum password

Code:
Server Error

file_get_contents(http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=&steamids=76561197965998190) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized
XenForo_Application::handlePhpError()
file_get_contents() in Steam/ControllerPublic/Register.php at line 389
Steam_ControllerPublic_Register->actionSteamRegister() in XenForo/FrontController.php at line 313
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/theiamcl/public_html/filthysavages.com/index.php at line 13
 
This addon is outdated. Only half it's features work atm. Hoping the author updates soon.

Well I personally can't get the badges to show up in posts but I'm running RC1. If you're running 1.1.5 then it may work.

I haven't officially released a version for the beta/RC yet. The only feature that I know for a fact doesn't work on 1.2.0 are SteamProfile badges. The functionality of the mod in terms of authentication, stat gathering, trophies, and notices should still function normally as far as I have seen on my dev forum.

The reason why SteamProfile badges break is the jump to a new version of jQuery. It's going to take some tinkering to fix because it's essentially a third party addon to this mod.

But as far as I know, the core functionality of this mod works in 1.2.

EDIT: Well I guess things are bit more broken then I thought. Notices don't seem to be acting with the steam criteria. Bleh. But no matter. I'll try to get it sorted for release. It's odd, I know for a fact the stat collection worked, but it all just seemed to vanish now.

False Alarm. It was because I was messing with disassociation. Whoops. Anyways, confirmed that core functionality works in 1.2. The only thing that doesn't is the shiny bit that is non-essential to the addon's functionality.

EDIT 2: Fixed. Oh man, and it was so simple too. :censored:

So it's just a matter of adding a trailing slash to the basepath of the script.
 
Last edited:
I haven't officially released a version for the beta/RC yet. The only feature that I know for a fact doesn't work on 1.2.0 are SteamProfile badges. The functionality of the mod in terms of authentication, stat gathering, trophies, and notices should still function normally as far as I have seen on my dev forum.

The reason why SteamProfile badges break is the jump to a new version of jQuery. It's going to take some tinkering to fix because it's essentially a third party addon to this mod.

But as far as I know, the core functionality of this mod works in 1.2.

EDIT: Well I guess things are bit more broken then I thought. Notices don't seem to be acting with the steam criteria. Bleh. But no matter. I'll try to get it sorted for release. It's odd, I know for a fact the stat collection worked, but it all just seemed to vanish now.

False Alarm. It was because I was messing with disassociation. Whoops. Anyways, confirmed that core functionality works in 1.2. The only thing that doesn't is the shiny bit that is non-essential to the addon's functionality.

EDIT 2: Fixed. Oh man, and it was so simple too. :censored:

So it's just a matter of adding a trailing slash to the basepath of the script.
Thats great. Well i hope you release it soon. Thanks for the update.
 
Thats great. Well i hope you release it soon. Thanks for the update.

The fix has been rolled into the develop branch on github.

The only problems with the develop branch currently is that I don't have caching enabled on backgrounds for SteamProfile In-Game Badges (some some extra API request will happen) and that IE is terrible at rendering game backgrounds properly.
 
Sweet I'll give it a go. FYI you have 2 dev branches. I don't know if you wanted that. They look same. Just different names.

Edit: The game pictures and profile pictures are showing up on the Steam Page which is great. The Steam Badges are still not functional on my end.
 
Last edited:
Develop is the one you want. Develop12 was just a temp branch. Thought I deleted it, must have been local not remote.

Do you have any sort of caching enabled like cloudflare? If so you may want to clear it. If you could PM me a link to your forums as well, that'd be great.

EDIT: I see SteamBadges on posts under your avatar and in the top right of the message box.
 
Last edited:
Hey baby.
So we need https support. I made a really awful solution (there are some errors, check JS console but nothing on the frontend)

Replace this line in steamprofile.js or whatever it's called:
PHP:
profile.find('.sp-avatar img').attr('src', profileData.avatar);
With this:
PHP:
profile.find('.sp-avatar img').attr('src', 'https://website.com/js/steam/avatar.php?img=' + profileData.avatar);
And for avatar.php, use this ungodly mess that I scrapped together 6 months ago:
PHP:
<?php

function curlHeaderCallback($query, $header){
    global $mime;
    if(stripos($header, "content-type")!==false){
        header(trim($header));
    }
    return strlen($header);
}
$image = $_GET['img'];
$query = curl_init($image);
curl_setopt($query, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9");
curl_setopt($query, CURLOPT_CONNECTTIMEOUT ,10);
curl_setopt($query, CURLOPT_TIMEOUT, 10);
curl_setopt($query, CURLOPT_HEADERFUNCTION, 'curlHeaderCallback');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($query);
echo $ret;
exit;

Could we please see support for HTTPS in a near-future release since I would very much appreciate it :)
 
Code:
ErrorException: Trying to get property of non-object - /home/srf3rdd3/public_html/js/steam/jsonproxy.php:103
Generated By: Unknown Account,

Code:
ErrorException: Invalid argument supplied for foreach() - /home/srf3rdd3/public_html/js/steam/jsonproxy.php:103
Generated By: Unknown Account,

What's happening? :[
 
Code:
ErrorException: Trying to get property of non-object - /home/srf3rdd3/public_html/js/steam/jsonproxy.php:103
Generated By: Unknown Account,

Code:
ErrorException: Invalid argument supplied for foreach() - /home/srf3rdd3/public_html/js/steam/jsonproxy.php:103
Generated By: Unknown Account,

What's happening? :[

Chances are it had problems grabbing json data for the foreach statement (for game backgrounds). It's a bug with the development code that's not thoroughly tested yet.

EDIT: I made a change to the development code that should resolve this issue. I have synced it to GitHub.
 
Top Bottom