Resource icon

Steam Authentication & Integration 1.0.7

No permission to download

Binari0

Member
Its works! Thank you very much now a edit the css to put righ the tings

 

Attachments

  • style.zip
    990 bytes · Views: 5

HowIChrgeLazer

Well-known member
Glad to hear it!

Unofficial Version 1.0.7b

In the original developers absence, I wanted to get this working again for the XenForo community. I can't guarentee the performance on larger websites, but testing the changes made for 1.0.7b, I haven't noticed any more errors and things are running smoothly. Of course though, I do ask that you try this update at your own risk.

This development fork is also available on GitHub.

How To Install:
  1. Install Prerequisites
    1. cURL and BCMath (php extension, usually installed already)
  2. Upload files in the upload directory to your forum
  3. Make the folder "js/steam/cache" world writable (chmod 0777)
  4. Install using the provided "addon-Steam.xml"
  5. Change options for "Steam Integration" as necessary
How To Upgrade to 1.0.7b:
  1. Backup root/js/steam somewhere safe
  2. Delete root/js/steam directory
  3. Upload the upload directory to your forum (overwrite any files)
  4. chmod 777 root/js/steam/cache
  5. Upgrade the addon to 1.0.7b using the provided "addon-Steam.xml" file
Had this add-on previously, but uninstalled and are having a database error like this?
Code:
Mysqli prepare error: Unknown column 'game_hours_recent' in 'field list'
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in Steam/Cron.php at line 38
Steam_Cron::update() in Steam/Manufacture.php at line 95
Steam_Manufacture->_installVersion4() in Steam/Manufacture.php at line 59
Steam_Manufacture::build() in XenForo/Model/AddOn.php at line 214
XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 178
XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/pfps/public_html/comunidade/admin.php at line 13
Drop xf_steam_games and xf_user_steam_games tables from your database.

Change log:

Version 1.0.7b
  • Fixed "Unknown Steam Account" in the User CP
  • Fixed errors with Game Statistic updates
  • Added a PHP check to use cURL if CURLOPT_FOLLOWLOCATION can be used
    • If so, xml data is loaded via simplexml_load_string
    • If not, xml data is loaded via simplexml_load_file (less efficient, but it works)
  • Fixed an installation bug where database operations were being preformed before a necessarily column was created
  • Changed to a newer version of steamprofile
  • Steam profile CSS fix (thanks Binari0!)
Known Issue(s):
  • Parsing errors on Game Statistics still, thinking of a better solution.
  • Having open_basedir set other than none or safe_mode on can cause 302 errors on the Steam Profile badge. This has to do with the that project using CURLOPT_FOLLOWLOCATION.
    • The steam login integration still works fine, this only affects the steam badge on messages and the profile.
    • This issue is external to this particular project (not Morgan's code). I can look around for a possible work around, but that is something a bit outside the scope of this add-on at this moment.
New download available here.
 

HowIChrgeLazer

Well-known member
I think you may have some other issues outside of the plugin. It seems like your website is broken. The drop-down box doesn't even work. Is your style not up to par?

I just had somebody register on my website alright. Maybe try running the default style and try to disable other login addons you may have.

Alternatively, you can try re-installing the add-on.

EDIT:

Moulijin, for some reason your have some weird redirects going on with your URLs, so when Open ID returns, it's saying it's not matching.

It has something to do with your webserver setup. If you're hosted somewhere, you may need to open a support ticket about it.
 

HowIChrgeLazer

Well-known member
I'm working with somebody else who's having a similar issue. In your phpinfo(); could you message me the values of the following:
PHP Version
open_basedir
safe_mode
 

Cats777

Member
Hrmmmm. That's odd, I haven't seen it on my forum. I'll try to replicate the issue.

What browser are you using?
I'm using Nightly, but it also occurs in Chrome and IE.

It's probably not a cache issue, since the problem occurs whether the cache is purged or not, and the cache is only created when the Steam block loads successfully.
 

MagnusB

Well-known member
Does anyone know why the Steam block disappears most of the time when the page it's on is refreshed?

Here's what it looks like when it's gone:
http://i.imgur.com/dir9j.png

Now here's it looks like when it's actually there:
http://i.imgur.com/eL9eS.png

The disappeared one has a title attribute somehow.
My initial thought is that there is no data in the first screenshot, but you have closed the div on the second, so I can't really see the difference. Did you check the CSS rules as well?

Hrmmmm. That's odd, I haven't seen it on my forum. I'll try to replicate the issue.

What browser are you using?
That is Firefox, 99.9% sure, it is their new developer tools.
 

HowIChrgeLazer

Well-known member
Okay, I did some looking around, the reason why the title is there when the data doesn't load has to deal with the steamprofile javascript. If you look at his example ajax code here you'll see that it's required to resolve the profile badge.

PHP:
 <!--
Each <div> with the class "steamprofile" will automatically be extended
with the profile for the ID set in "title".
The ID can be a generic Steam-ID (STEAM_x:x:xxxxxx), a Steam Community ID (Steam-ID 64) or the
Steam Community profile alias.
-->
<div class="steamprofile" title="76561197965018417"></div>
<div class="steamprofile" title="robinwalker"></div>
<div class="steamprofile" title="STEAM_0:0:148902"></div>

I'm wondering if you're having some conflict somewhere with other javascript on your website. Do you have any ideas of what other scripts may be running along side steam profile on your website? Something definitely causing steamprofile.js to break.

Switch your admin account to the default theme and see if it still happens. Also see if any add-ons are conflicting.
 

Cats777

Member
Hm, it's the same thing even after disabling every add-on and switching to the default style. All of my template mods were done using the Template Mod System, and even that was disabled. Could it have something to do with my webhost's server?

I also noticed that the CSS for the steamprofile class also disappears with the block.
 

HowIChrgeLazer

Well-known member
I wonder... Try putting this right before the </head> of your theme

Code:
<script type="text/javascript">
spBasePath = 'steamprofile/ajax/';
</script>

Change spBasePath to the location your ajax folder is located (ex. js/steam/ajax/). You may even need to use a full path like this example: /home/<username>/<site>/js/steam/ajax/
 

Cats777

Member
I wonder... Try putting this right before the </head> of your theme

Code:
<script type="text/javascript">
spBasePath = 'steamprofile/ajax/';
</script>

Change spBasePath to the location your ajax folder is located (ex. js/steam/ajax/). You may even need to use a full path like this example: /home/<username>/<site>/js/steam/ajax/
You broke my forums!

Just kidding, that worked PERFECTLY! :eek: That's some great wizardry, thanks a ton!
 

HowIChrgeLazer

Well-known member
You're welcome. I'm glad it worked for you. I'll probably include it in the release I'm about to post to prevent that issue from happening to other people as well (as long as it tests okay on my site).
 

HowIChrgeLazer

Well-known member
Unofficial Version 1.0.7c

Alright, time to squash some more bugs. I think I'm completely fixed the issue with Game Statistics giving parsing errors. I've also fixed a small bug with the possibility of the steam profile badge not loading, thanks to a report by Cats777. If you're on 1.0.7b, I recommend upgrading to 1.0.7c.

This development fork is also available on GitHub.

If you'd like to see a working example of 1.0.7c, please visit http://ragecagegaming.com/

How To Install:
  1. Install Prerequisites
    1. cURL and BCMath (php extension, usually installed already)
  2. Upload files in the upload directory to your forum
  3. Make the folder "js/steam/cache" world writable (chmod 777)
  4. Install using the provided "addon-Steam.xml"
  5. Change options for "Steam Integration" as necessary
Upgrade Steps From 1.0.7b to 1.0.7c:
  1. Upload the upload directory to your forum (overwrite any files)
  2. Upgrade the addon to using the provided "addon-Steam.xml" file
Upgrade Steps From 1.0.x To 1.0.7c:
  1. Backup root/js/steam somewhere safe
  2. Delete root/js/steam directory
  3. Upload the upload directory to your forum (overwrite any files)
  4. chmod 777 root/js/steam/cache
  5. Upgrade the addon using the provided "addon-Steam.xml" file
Had this add-on previously, but uninstalled and are having a database error like this?
Code:
Mysqli prepare error: Unknown column 'game_hours_recent' in 'field list'
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in Steam/Cron.php at line 38
Steam_Cron::update() in Steam/Manufacture.php at line 95
Steam_Manufacture->_installVersion4() in Steam/Manufacture.php at line 59
Steam_Manufacture::build() in XenForo/Model/AddOn.php at line 214
XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 178
XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/pfps/public_html/comunidade/admin.php at line 13
Drop xf_steam_games and xf_user_steam_games tables from your database prior to the install.

Change log:

Version 1.0.7c
  • Fixed XML parsing errors for Cron.php by adding a ?> at the end of the file
  • Disabled trimming of the XML games feed to help with parsing errors
  • Fixed a rare bug with steam profiles not always displaying on a page
Version 1.0.7b
  • Fixed "Unknown Steam Account" in the User CP
  • Fixed errors with Game Statistic updates
  • Added a PHP check to use cURL if CURLOPT_FOLLOWLOCATION can be used
    • If so, xml data is loaded via simplexml_load_string
    • If not, xml data is loaded via simplexml_load_file (less efficient, but it works)
  • Fixed an installation bug where database operations were being preformed before a necessarily column was created
  • Changed to a newer version of steamprofile
  • Steam profile CSS fix (thanks Binari0!)
Known Issue(s):
  • It is possible for Cron.php to time out if you have open_basedir set other than none or safe_mode on. This is because it has to load XML data as a file instead of a string.
  • Having open_basedir set other than none or safe_mode on can cause 302 errors on the Steam Profile badge. This has to do with the that project using CURLOPT_FOLLOWLOCATION.
    • The steam login integration still works fine, this only affects the steam badge on messages and the profile.
    • This issue is external to this particular project (not Morgan's code). I cannot find a work around as of right now. I'll see if I can notify the developer, but no promises of a fix for this as this is outside the scope of this add-on.
New download here.
 

Chris D

XenForo developer
Staff member
I am already using the Steam Identity Service for this which was released by DarkImmortal.

This works a lot better for us than this add on simply because as we migrated from vBulletin we already had 10,000 members with Steam IDs configured in their profile and we pull the info from their profile for their badge that way.

What I'm wondering, is whether you could release a version that only includes authentication?

Also, the Add On ID of this add-on and the Steam Identity Service are both "Steam". I renamed the add-on ID of the Steam Identity Service and now, while I try to install SteamAuth-1.0.7c I simply get an XML error:

Server Error

simplexml_load_string(): Entity: line 2: parser error : XML declaration allowed only at the start of the document
  1. XenForo_Application::handlePhpError()
  2. simplexml_load_string() in Steam/Helper/Steam.php at line 77
  3. Steam_Helper_Steam->getUserGames() in Steam/Cron.php at line 29
  4. Steam_Cron::update() in Steam/Manufacture.php at line 104
  5. Steam_Manufacture->_installVersion8() in Steam/Manufacture.php at line 59
  6. Steam_Manufacture::build()
  7. call_user_func() in XenForo/Model/AddOn.php at line 214
  8. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  9. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 178
  10. XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 310
  11. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  12. XenForo_FrontController->run() in /home/valvetime/public_html/admin.php at line 13
 

HowIChrgeLazer

Well-known member
Going to investigate the issue with "XML declaration allowed only at the start of the document." Something in the game's XML data is causing some wonky stuff. Have to figure out why it's spitting out this error on occasion. It was working when I did cron testing, but now it's creeping up again.

As for setting up an alternative version that has just authentication, I can look into that. No guarantee though.

I'll keep you all updated on the XML issue. Hopefully I'll find a solution tomorrow evening when I get a chance to bug test again.
 
Top