• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Steam Identity Service

Status
Not open for further replies.

Luke F

Well-known member
This simple addon allows your members to add their Steam ID under their profile contact details (using XenForo's Identity Service system Now using Custom User Fields in XF 1.1) in all the common formats (plain steam id, community id, /profiles/ or /id/ URL) with automatic conversion to a plain STEAM_0 ID. Additionally, the Steam ID is displayed as a link to the relevant Steam profile.

-s7v.png

uqif.png


Installation:

  1. Upload the contents of 'upload' folder within Steam.zip (XF 1.1 version if using XenForo 1.1.x) to your forum root.
  2. Install addon_Steam.xml (the install code will automatically add the actual identity service/custom user field)
See also: Steam Community OpenID Login

Donations go here. :)
 

Attachments

thanks for the steam IS :)
i looked over the code and have one question; why are these identity services so complex?
in the end, arent they little more than a custom profile field? i was hoping to open yours and and more or less copy it so that people could enter an off-site user name and have it link to that off-site profile, but looking at the code it appears that wont work.
 
Installed it. Entered my Steam ID, went to my profile page and recieved this error:

Code:
Fatal error: Call to undefined function bcmul() in /var/www/vhosts/ducksoupgaming.com/httpdocs/library/Dark/Steam/Model/User.php on line 43
 
Installed it. Entered my Steam ID, went to my profile page and recieved this error:

Code:
Fatal error: Call to undefined function bcmul() in /var/www/vhosts/ducksoupgaming.com/httpdocs/library/Dark/Steam/Model/User.php on line 43

Enable the bcmath extension
 
you have seen this?
while not exactly what you want, it is a step in the right direction.
he says he cant do a profile hack 'yet' because there arent custom profile fields in xf yet.
I was hoping to display a steam profile on the forum page.

It seems I've come to a wall :(

http://xenforo.com/community/threads/identity-services.10327/
I'm wanting to put badges on the "post bit"
http://dev.terminaladdict.co.nz/steamprofile/

as seen at http://www.unusualhatclub.com
 
ok I've done this:
Install the Steam Identity Service:
http://xenforo.com/community/threads/steam-identity-service.9819/#post-140629

open up XenForo_ControllerPublic_Thread (library/XenForo/ControllerPublic/Thread.php) and after line ~69..
Code:
$posts = $postModel->getAndMergeAttachmentsIntoPosts($posts);

add...
Code:
/* PAUL WAS HERE */
foreach ($posts as $key => $post)
{
    $posts[$key]['identities'] = unserialize($post['identities']);
}
/* END PAUL WAS HERE */

in message_user_info add:
Code:
	<xen:hook name="message_user_identities" params="{xen:array 'user={$user}'}">
<xen:foreach loop="{$user.identities}" key="$service1" value="$account1">
<xen:if is="{$service1} == 'Steam'">
<div class="steamprofile" title="{$account1}"></div>
</xen:if>
</xen:foreach>
</xen:hook>

in PAGE_CONTAINER just before </head>
add:
Code:
<script type="text/javascript" src="/steamprofile/steamprofile/steamprofile.js"></script>


results will be going live on my site in a few days. I'll post a link then
 
ok I've done this:
Install the Steam Identity Service:
http://xenforo.com/community/threads/steam-identity-service.9819/#post-140629

open up XenForo_ControllerPublic_Thread (library/XenForo/ControllerPublic/Thread.php) and after line ~69..
Code:
$posts = $postModel->getAndMergeAttachmentsIntoPosts($posts);

add...
Code:
/* PAUL WAS HERE */
foreach ($posts as $key => $post)
{
    $posts[$key]['identities'] = unserialize($post['identities']);
}
/* END PAUL WAS HERE */

in message_user_info add:
Code:
	<xen:hook name="message_user_identities" params="{xen:array 'user={$user}'}">
<xen:foreach loop="{$user.identities}" key="$service1" value="$account1">
<xen:if is="{$service1} == 'Steam'">
<div class="steamprofile" title="{$account1}"></div>
</xen:if>
</xen:foreach>
</xen:hook>

in PAGE_CONTAINER just before </head>
add:
Code:
<script type="text/javascript" src="/steamprofile/steamprofile/steamprofile.js"></script>


results will be going live on my site in a few days. I'll post a link then
never edit the original xenforo files!
use the event system and overwrite the original methods
 
never edit the original xenforo files!
use the event system and overwrite the original methods
how? .. I need lessons in xf coding :)


edit: The below doesn't work
Code:
<?php

class Dark_Steam_EventListener_LoadClassModel
{
    public static function listen($class, array &$extend)
    {
        if ($class == 'XenForo_Model_User'){
            $extend[] = 'Dark_Steam_Model_User';
        }
        if ($class == 'XenForo_ControllerPublic_Thread '){
        foreach ($posts as $key => $post) {
            $posts[$key]['identities'] = unserialize($post['identities']);
        }
        }
    }
}

I presume you mean put something in the EventListener?
 
how? .. I need lessons in xf coding :)


edit: The below doesn't work
Code:
<?php

class Dark_Steam_EventListener_LoadClassModel
{
    public static function listen($class, array &$extend)
    {
        if ($class == 'XenForo_Model_User'){
            $extend[] = 'Dark_Steam_Model_User';
        }
        if ($class == 'XenForo_ControllerPublic_Thread '){
        foreach ($posts as $key => $post) {
            $posts[$key]['identities'] = unserialize($post['identities']);
        }
        }
    }
}

I presume you mean put something in the EventListener?
Maybe this http://xenforo.com/community/threads/creating-an-addon.5416/ or this http://xenforo.com/community/threads/creating-a-simple-modification.3532/ helps
 
ok I've done this:
Install the Steam Identity Service:
http://xenforo.com/community/threads/steam-identity-service.9819/#post-140629

open up XenForo_ControllerPublic_Thread (library/XenForo/ControllerPublic/Thread.php) and after line ~69..
Code:
$posts = $postModel->getAndMergeAttachmentsIntoPosts($posts);

add...
Code:
/* PAUL WAS HERE */
foreach ($posts as $key => $post)
{
    $posts[$key]['identities'] = unserialize($post['identities']);
}
/* END PAUL WAS HERE */

in message_user_info add:
Code:
	<xen:hook name="message_user_identities" params="{xen:array 'user={$user}'}">
<xen:foreach loop="{$user.identities}" key="$service1" value="$account1">
<xen:if is="{$service1} == 'Steam'">
<div class="steamprofile" title="{$account1}"></div>
</xen:if>
</xen:foreach>
</xen:hook>

in PAGE_CONTAINER just before </head>
add:
Code:
<script type="text/javascript" src="/steamprofile/steamprofile/steamprofile.js"></script>


results will be going live on my site in a few days. I'll post a link then

Had a look at your site so thought I'd give it a try but I can't get the steam profile to appear no matter where I try it in the message_user_info template. Checked my profile and the steam ID is there so I'm unsure what I may have done wrong, any possible ideas?
 
give me a link to take a gander at it.

if you view the source code can you see <div class="steamprofile" title="TerminalAddict"></adiv> (or what ever your steamid is?

my guess is (if this is the case) you're not including the javascript in the header portion of PAGE_CONTAINER
 
Sorry to add a suggestion to this, but a great setting would be to force the Steam Identity Service to use a particular format. For instance, with my gaming community I only want users to implement "X:X:XXXXXX" because I am using this identity service to integrate with SourceBans. Any chance of this happening?

Also: Would be great if it checked to see if someone already has that ID implemented. Because no two users should ever have the same Steam ID.
 
Sorry to add a suggestion to this, but a great setting would be to force the Steam Identity Service to use a particular format. For instance, with my gaming community I only want users to implement "X:X:XXXXXX" because I am using this identity service to integrate with SourceBans. Any chance of this happening?

It already converts whatever users enter to the STEAM_x:x:xxxxx format :)

Also: Would be great if it checked to see if someone already has that ID implemented. Because no two users should ever have the same Steam ID.

Will add that sometime in the future
 
It already converts whatever users enter to the STEAM_x:x:xxxxx format :)

Will add that sometime in the future

Hey Dark,

Just wanted to let you know that people can still put in incorrect formatted STEAM ID's and it will save. For instance I saw somone with:

STEAM_X:X:XXXXX 01:18

Not sure why. But, they had it. Also, any news on checking for users with the same STEAM ID?
 
Status
Not open for further replies.
Top Bottom