• 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.
here are a mod for phpbb may be able to get ideas. I had in my old forum and it worked great.
http://ghostfacekillerclan.com/downloads/steam_mod.zip
after_login.png
ucp_profile_edit.png
online.png
offline.png
in_game.png
join_in_game.png

ucp_profile.png

viewprofile.png


viewtopic.png
 
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..
PHP:
$posts = $postModel->getAndMergeAttachmentsIntoPosts($posts);
add...
PHP:
/* TerminalAddict WAS HERE */
foreach ($posts as $key => $post)
{
    $posts[$key]['identities'] = unserialize($post['identities']);
}
/* END TerminalAddict 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:if is="!in_array('Steam', {$user.identities})">
        <div class="steamprofileNOT" title="No Steam"> &nbsp; <a href="account/contact-details">NO SteamID entered</a></div>
    </xen:if>
    </xen:hook>

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

example:
http://www.fps.net.nz/community/threads/hello.1485/

steam badges on each "post bit"
 
works to perfection are just a few tweaks and appears in several places and in discussions, etc..

Because it would appear in the threads.

steamprofile.webp
finished work:

SteamProfile1.webp
 
to all those who have messaged me about my edits not working.
I completely forget.
You have to use the steamprofile packages, I placed it in a subdirectory steamprofile/
then included the /steamprofile/steamprofile.js in my header.

the cache dir needs to be writable (chmod 777 or chown www-data:www-data or whatever)

attached is the contents of the directory.

it uses xmlproxy.php to get around remote site scripting etc.
I'm not sure what the requirements for steamprofile are
but here is the original work: http://code.google.com/p/steamprofile/

Hope this helps everyone, now if only I could get openid (logging in via steam working :) )
 

Attachments

Hi can you explain what these Japanese characters do?

PHP:
// gotta love the dirty weeaboo hax :3
if($communityId !== false)

   $value =  'STEAMスタートSTEAM'.$communityId.'STEAMミヅゥSTEAM'.$value.'STEAMエンドSTEAM';
 
A nice unique string to replace in order to workaround html escaping. There's likely better methods now, but at the time pretty sure there wasn't much alternative.
 
Can you tell me the alternatives? I am not familiar with these techniques.

Why can I not put HTML there normally?
 
Can you tell me the alternatives? I am not familiar with these techniques.

Why can I not put HTML there normally?

member_view uses {xen:string censor, $identity.value} which escapes the html tags

Alternatives include editing the template (security concerns) or fiddling with one of the template hooks
 
member_view uses {xen:string censor, $identity.value} which escapes the html tags

Alternatives include editing the template (security concerns) or fiddling with one of the template hooks

I see what you mean now. You replace those strings inside EventListener/TemplatePostRender.php
Can anyone point me to the right direction for doing it with template hooks?

I've also made some modifications to this plugin.

Changes
  • Saves Steam community ID instead of STEAMID.
  • Removed ability to add by STEAMID. 90% of players don't know how to find their STEAMID, and most of the web APIs use community IDs.
  • Fixed the regular expressions.
  • Parses profiles properly with XML instead of using substr.
  • Checks that the ID exists on steamcommunity.com
  • Verifies that you own the account by having you paste a string in your profile.
Here are some things I wanted to do, but didn't know how.
  • Verify account ownership with OpenID. Pasting a string in your profile is not the best solution, but it is better than nothing.
  • Verify ID is unique in the forum.
  • Terminal Addict's mod without editing the core.
  • Have the ID show near the top of the profile (instead of in a tab).
Update

Here is a version that uses OpenID instead of verifying with a unique string.

http://xenforo.com/community/threads/steam-community-openid-login.18958/#post-244471
 

Attachments

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..
PHP:
$posts = $postModel->getAndMergeAttachmentsIntoPosts($posts);
add...
PHP:
/* TerminalAddict WAS HERE */
foreach ($posts as $key => $post)
{
    $posts[$key]['identities'] = unserialize($post['identities']);
}
/* END TerminalAddict 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:if is="!in_array('Steam', {$user.identities})">
        <div class="steamprofileNOT" title="No Steam"> &nbsp; <a href="account/contact-details">NO SteamID entered</a></div>
    </xen:if>
    </xen:hook>

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

example:
http://www.fps.net.nz/community/threads/hello.1485/

steam badges on each "post bit"

Very good one :)

on-off.webp

Remember this post mate? :)
 
This add-on effectively just became obselete.

Anyone can easily add a custom profile field directly in the ACP for this now.
 
This add-on effectively just became obselete.

Anyone can easily add a custom profile field directly in the ACP for this now.
I imagine Darkimmortal will rewrite it to create a new custom profile field so that it still integrates with the Log in with Steam add-on.
 
I'm not sure how the custom profile fields will work, but this plugin will likely still be needed for validation and display (as a link). Will probably need some changes to both this and the plugins that depend on it.

I plan on updating this asap if necessary, as both my sites rely on it.
 
Status
Not open for further replies.
Top Bottom