Raised This Month: $12 Target: $400
 3% 

Convert STEAMID to Steam Community ID


Post New Thread Reply   
 
Thread Tools Display Modes
8088
Veteran Member
Join Date: Jan 2008
Old 12-30-2009 , 19:19   Re: Convert STEAMID to Steam Community ID
Reply With Quote #231

More or less. Here's a quick and dirty with help of DarthNinja's code:
PHP Code:
<?php
if ($_GET['s'])
{
    
$steam_id=strtolower($_GET['s']);
    if (
substr($steam_id,0,7)=='steam_0') {
        
$tmp=explode(':',$steam_id);
    }
    if ((
count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2])){

        
//The 'Magic Number': 76561197960265728
        //Split up so it can be calculated without an extension.



        
$steamidCalc=($tmp[2]*2)+$tmp[1]; //Work out step 1
        
$calckey='1197960265728'//Second bit of the magic number
        
$pre='7656'//First bit of the magic number

        
$steamcid=$steamidCalc+$calckey//works out the ending of the steam community ID

        
$link="http://steamcommunity.com/profiles/";
        
//echo $link; echo $pre; echo $steamcid;
        
header('Location: http://steamcommunity.com/profiles/'.$pre.$steamcid);

    };
}
?>
Usage: steamid.php?s=STEAM_0:1:23456
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-30-2009 , 19:40   Re: Convert STEAMID to Steam Community ID
Reply With Quote #232

Make sure that goes before any HTML code or else the redirect won't work.
bl4nk is offline
jimbodude
Member
Join Date: Mar 2009
Location: England
Old 12-30-2009 , 22:32   Re: Convert STEAMID to Steam Community ID
Reply With Quote #233

Thanks, works nicely.
__________________
jimbodude is offline
bobbobagan
SourceMod Donor
Join Date: May 2007
Location: New Zealand
Old 01-12-2010 , 11:12   Re: Convert STEAMID to Steam Community ID
Reply With Quote #234

Quote:
Originally Posted by 8088 View Post
Just wanted to thank you and show you what you made possible on my vBulletin forums (that still need a lot of work) :





This was created with your snippet converted to php by KoST, and some other nice code which he kindly provided.
Any chance of getting something like this for phpBB?
__________________
bobbobagan is offline
Send a message via Skype™ to bobbobagan
rautamiekka
Veteran Member
Join Date: Jan 2009
Location: Finland
Old 01-12-2010 , 11:23   Re: Convert STEAMID to Steam Community ID
Reply With Quote #235

Quote:
Originally Posted by bobbobagan View Post
Any chance of getting something like this for phpBB?
I want it too
__________________
Links to posts I received Karma from:
Big thanks to all who gave Karma
rautamiekka is offline
Send a message via ICQ to rautamiekka Send a message via AIM to rautamiekka Send a message via MSN to rautamiekka Send a message via Yahoo to rautamiekka Send a message via Skype™ to rautamiekka
8088
Veteran Member
Join Date: Jan 2008
Old 01-12-2010 , 15:58   Re: Convert STEAMID to Steam Community ID
Reply With Quote #236

Quote:
Originally Posted by bobbobagan View Post
Any chance of getting something like this for phpBB?
Not from me, I'm not a phpBB user.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 01-12-2010 , 16:15   Re: Convert STEAMID to Steam Community ID
Reply With Quote #237

Im pretty sure VB has a much better template editing system than PHPBB making an addon like this much easier to do then on PHPBB. Thats why VB costs the big bucks.
__________________

DontWannaName is offline
DieterM75
Senior Member
Join Date: Aug 2009
Old 02-07-2010 , 11:12   Re: Convert STEAMID to Steam Community ID
Reply With Quote #238

its easy to hardcode it. why create a module?

http://wiki.phpbb.com/Tutorial.Custom_profile_fields

btw phpbb sucks...
DieterM75 is offline
rautamiekka
Veteran Member
Join Date: Jan 2009
Location: Finland
Old 02-07-2010 , 11:33   Re: Convert STEAMID to Steam Community ID
Reply With Quote #239

Quote:
Originally Posted by DieterM75 View Post
its easy to hardcode it. why create a module?

http://wiki.phpbb.com/Tutorial.Custom_profile_fields

btw phpbb sucks...
That's your right but neither I'm going to change from phpBB.
__________________
Links to posts I received Karma from:
Big thanks to all who gave Karma
rautamiekka is offline
Send a message via ICQ to rautamiekka Send a message via AIM to rautamiekka Send a message via MSN to rautamiekka Send a message via Yahoo to rautamiekka Send a message via Skype™ to rautamiekka
Schinken
Junior Member
Join Date: Mar 2010
Old 03-08-2010 , 22:15   Re: Convert STEAMID to Steam Community ID
Reply With Quote #240

http://developer.valvesoftware.com/w...owser_protocol here is a list of all(?) "steam://" urls.

It could be helpful for you custom profile.
For example: "steam://friends/message/<id>" would open a window to chat with the user.
Schinken is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode