1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

Discussion in 'Add-on Releases [Archive]' started by Luke F, Dec 31, 2010.

Thread Status:
Not open for further replies.
  1. Luke F

    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.

    [​IMG]
    [​IMG]

    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. :)
     

    Attached Files:

    SHOOTENZ, kde, Alien and 10 others like this.
  2. Luke F

    Luke F Well-Known Member

    The download is now available again :)
     
    laztrix likes this.
  3. dieketzer

    dieketzer Well-Known Member

    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.
     
  4. jonsidneyb

    jonsidneyb Well-Known Member

    Ummm, what is steam?

    To me it is one of the states of water.
     
  5. dieketzer

    dieketzer Well-Known Member

    steam is valves (half-life ppl) software distribution/community thingo.
    http://steampowered.com
     
  6. Mycologist

    Mycologist Member

    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
     
  7. Luke F

    Luke F Well-Known Member

    Enable the bcmath extension
     
  8. TerminalAddict

    TerminalAddict Active Member

  9. dieketzer

    dieketzer Well-Known Member

    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.
     
  10. TerminalAddict

    TerminalAddict Active Member

    Yeah mate. Got that installed already :)
     
  11. TerminalAddict

    TerminalAddict Active Member

    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
     
  12. ragtek

    ragtek Guest

    never edit the original xenforo files!
    use the event system and overwrite the original methods
     
    Darkimmortal likes this.
  13. TerminalAddict

    TerminalAddict Active Member

    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?
     
  14. ragtek

    ragtek Guest

    Maybe this http://xenforo.com/community/threads/creating-an-addon.5416/ or this http://xenforo.com/community/threads/creating-a-simple-modification.3532/ helps
     
  15. CFodder

    CFodder Well-Known Member

    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?
     
  16. TerminalAddict

    TerminalAddict Active Member

    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
     
  17. eod

    eod Active Member

    did you find a good way to add the status image?
     
  18. John L.

    John L. Well-Known Member

    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.
     
  19. Luke F

    Luke F Well-Known Member

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

    Will add that sometime in the future
     
  20. John L.

    John L. Well-Known Member

    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?
     
Thread Status:
Not open for further replies.

Share This Page