Raised This Month: $32 Target: $400
 8% 

Steam ID into a Steam Community/Friends Page


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nice boy
Junior Member
Join Date: Mar 2009
Old 05-15-2009 , 22:19   Steam ID into a Steam Community/Friends Page
Reply With Quote #1

Hi. Does someone knows how to add a converter (Steam ID into a Steam Community/Friends Page) to a web page like the 1 on this website http://www.eurohangout.com/steamcommunity.php ??? I know there is a php code but y only work with html. So is there a html script or something ???
nice boy is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 05-15-2009 , 22:46   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=77361

You can take the code as an example and adapt it to your needs.
__________________

Community / No support through PM
danielkza is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-15-2009 , 23:14   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #3

PHP Code:

<script type="text/javascript">

function 
convert(steamID)
{    
    var 
parts steamID.split(":");
    
    var 
iServer Number(parts[1]);
    var 
iAuthID Number(parts[2]);
    
    var 
converted "76561197960265728"
    
    
lastIndex converted.length 1

    
var toAdd iAuthID iServer;
    var 
toAddString = new String(toAdd)    
    var 
addLastIndex toAddString.length 1;

    for(var 
i=0;i<=addLastIndex;i++)
    {
        var 
num Number(toAddString.charAt(addLastIndex i));
        var 
j=lastIndex i;
        
        do
        {
            var 
num2 Number(converted.charAt(j));            
            var 
sum num num2;        
                    
            
converted converted.substr(0,j) + (sum 10).toString() + converted.substr(j+1);    
        
            
num Math.floor(sum 10);            
            
j--;
        }
        while(
num);
            
    }
    
    return 
"<a href='http://steamcommunity.com/profiles/" +  converted "'>Converted</a>";
}

</script>

<input id="input" type="text" value="SteamID here" onclick="this.onclick='';this.value=''">
<input type="submit" value="Convert" onclick ="document.getElementById('result').innerHTML = convert(document.getElementById('input').value)" >

<br><br>

<div id="result">

</div> 
__________________

Last edited by joaquimandrade; 05-15-2009 at 23:58. Reason: fixed to work with Internet Explorer
joaquimandrade is offline
nice boy
Junior Member
Join Date: Mar 2009
Old 05-16-2009 , 09:55   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #4

Thx joaquimandrade it is working
nice boy is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-16-2009 , 10:04   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #5

I made it
__________________
joaquimandrade is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 05-16-2009 , 19:05   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #6

Quote:
Originally Posted by joaquimandrade View Post
I made it
So...
__________________

Community / No support through PM
danielkza is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-16-2009 , 19:09   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #7

So "it's working" is implicit.
__________________
joaquimandrade is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-18-2009 , 20:17   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #8

I've never seen someone so arrogant about their scripts. Whatever floats your boat.
__________________
Bugsy is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-18-2009 , 20:20   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
I've never seen someone so arrogant about their scripts. Whatever floats your boat.
It was a joke. Anyway i already figured out that i piss you. And since you are talking about this code, the fact of you don't add it to your plugin was an obvious way of seeing that you prefer to pay attention to a work of a guy just because it is a moderator.

And obviously you prefer to go against me without knowing how i really am. And instead of figuring out if i'm joking you assume that im being arrogant. If you want to, give a word to those who know me in private and ask them how arrogant i am. Try stupok, connor, arkshine, tuty, xpaw
__________________

Last edited by joaquimandrade; 05-18-2009 at 20:29.
joaquimandrade is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-18-2009 , 20:44   Re: Steam ID into a Steam Community/Friends Page
Reply With Quote #10

Quote:
Originally Posted by joaquimandrade View Post
It was a joke. Anyway i already figured out that i piss you. And since you are talking about this code, the fact of you don't add it to your plugin was an obvious way of seeing that you prefer to pay attention to a work of a guy just because it is a moderator.

And obviously you prefer to go against me without knowing how i really am. And instead of figuring out if i'm joking you assume that im being arrogant. If you want to, give a word to those who know me in private and ask them how arrogant i am. Try stupok, connor, arkshine, tuty, xpaw
It's not just from that comment; I've seen other posts where you, consciously or unconsciously, seem to convey that you are above others. I've talked to you for a while now both in PM and in threads and I know you're a good person. There is no need for me to refer to others about you.

What code are you even referring to that I didn't add to my plugin? What moderator and I siding with? I'm not trying to say you are a bad scripter if that's what you are getting at.

Sorry to ruffle your feathers, I apologize if you took offense. It is hard to tell if someone is joking by looking at text.
__________________
Bugsy 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 16:57.


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