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

Convert STEAMID to Steam Community ID


Post New Thread Reply   
 
Thread Tools Display Modes
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-20-2008 , 07:00   Re: Convert STEAMID to Steam Community ID
Reply With Quote #91

Through the Steam interface you need their username. Through the Steam protocol you can use their community id, which of course you can calculate from their steam id. Just run steam://friends/add/765611979xxxxxxxx from anywhere, as used in Add friend (steam friends list) v0.6.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
dann
Senior Member
Join Date: Nov 2007
Old 09-23-2008 , 15:04   Re: Convert STEAMID to Steam Community ID
Reply With Quote #92

Quote:
Originally Posted by voogru View Post
What could potentially be done with this, is to fetch data on a player, see what groups he is in, and basically gives you the flexibility to ban whole groups from your server without knowing all of their steamids.

At least, thats what I intend to do with it. You can also of course do the reverse, converting friend ID's to steamids.
has anyone released a plugin etc. that allows you to ban whole steam groups yet?

thanks
dann is offline
FredJed223
Senior Member
Join Date: Feb 2008
Old 09-25-2008 , 23:23   Re: Convert STEAMID to Steam Community ID
Reply With Quote #93

Quote:
Originally Posted by dann View Post
has anyone released a plugin etc. that allows you to ban whole steam groups yet?

thanks

Yes THis would be great!
FredJed223 is offline
8088
Veteran Member
Join Date: Jan 2008
Old 11-10-2008 , 18:47   Re: Convert STEAMID to Steam Community ID
Reply With Quote #94

Since I've received several requests for a vBulletin plugin, I decided to provide one which covers the basics and can be modified at will. I'll leave modification, optimization and styling to you. As stated before, KoST wrote most of the code, all props to him. I just turned it into a poor vB plugin (one of my few skills is pressing Ctrl+C followed by Ctrl+V).

As for optimization, grabbing the XML (add ?xml=1 to a Friend's page - example) instead of parsing complete HTML pages might speed up things. Also, not loading the Steam2Friends part with javascript until the complete page has loaded could increase the user/visitor friendliness. To enable memcached support, open steam_function.php and follow the instructions.

As for styling, you could have a look at the original Steam Community pages for inspiration, or create your own style. To create a style of your liking, you can simply use CSS and (X)HTML. See the attached .xml file for the basic XHTML.

Here are the instructions for this basic plugin :
  1. create a subfolder named 'steamtools' in the folder where your forum (index.php) resides
  2. create a subfolder in 'steamtools' named 'icons'
  3. make 'icons' writable for the webserver (chmod to 755)
  4. open steam_function.php in a plain text editor like notepad, and replace the paths in lines 58 and 62 accordingly. Note that these paths need to be absolute and not relative!
  5. upload steam_function.php to 'steamtools'
  6. create a sinlge-line text box custom profile field named 'Steam ID' (note this is case sensitive, if you want to change this, change the occurring instances in the .xml and .php files as well)
  7. create a single-selection radio buttons custom profile field named 'Steam Community' with these two values : 'Yes, make the links visible' and 'No, hide the links' (note this is all case sensitive, if you want to change this, change the occurring instances in the .xml and .php files as well)
  8. import product-steam2friends.xml in the admin panel

Oh, it's only been tested on vBulletin 3.7.x and 3.8.x. It may or may not work on other versions.

Update: a bug that prevented the avatars from showing up has been fixed in 1.1 (see attachment)
Attached Files
File Type: zip steam2friends.zip (3.0 KB, 637 views)

Last edited by 8088; 11-01-2009 at 15:31.
8088 is offline
3RMAC
Junior Member
Join Date: Jul 2006
Old 11-11-2008 , 12:04   Re: Convert STEAMID to Steam Community ID
Reply With Quote #95

I can't seem to get it working correctly. There are no nifty images like steam which I saw in the first post. Any help?

EDIT: Well I have figured out that the Steam ID info doesn't like the STEAM_ in it, but I still can't seem to get it working correctly. Under the user profile, it does not give a picture with a link to add, join game, etc, instead it gives the option : Yes, make the links visible

Last edited by 3RMAC; 11-11-2008 at 14:41.
3RMAC is offline
8088
Veteran Member
Join Date: Jan 2008
Old 11-11-2008 , 18:15   Re: Convert STEAMID to Steam Community ID
Reply With Quote #96

I've sent you a PM.
8088 is offline
nibbler12345
Junior Member
Join Date: Oct 2008
Old 11-12-2008 , 14:06   Re: Convert STEAMID to Steam Community ID
Reply With Quote #97

I think I have same problem as 3RMAC
nibbler12345 is offline
3RMAC
Junior Member
Join Date: Jul 2006
Old 11-14-2008 , 02:36   Re: Convert STEAMID to Steam Community ID
Reply With Quote #98

We are vigorously trying to work the issue out. If you have the same problem then bcmath is more then likely not configured for php. Here is a way to check:

1) Create a file named info.php
2) Edit info.php and add the following code:
Code:
<?php
 phpinfo();
?>
3) Near the top on the left will be 'Configure Command'. Make sure --enable-bcmath is present.

I am having a few more little issues I'm trying to work out.
3RMAC is offline
8088
Veteran Member
Join Date: Jan 2008
Old 11-14-2008 , 19:28   Re: Convert STEAMID to Steam Community ID
Reply With Quote #99

If bcmath is not enabled (which is default for Linux), you will get an error like 'undefined function: bcadd()'. To enable it, you would have to recompile PHP with --enable-bcmath.

Windows has it built in by default.
8088 is offline
3RMAC
Junior Member
Join Date: Jul 2006
Old 11-18-2008 , 23:24   Re: Convert STEAMID to Steam Community ID
Reply With Quote #100

Just a few things I have noticed, but not sure if there will ever be a work around. When clicking a user name from the forums page it directs to ..?find=lastposter&f=.. There is no u= so the avatar is not displayed. Also, for people who have not put in the in their steam id yet I get an ssl error, which is odd.
Code:
Warning: file_get_contents(http://steamcommunity.com/profiles/) [function.file-get-contents]: failed to open stream: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? in /steamtools/steam_function.php on line 32
I have only noticed this error on people with the show id check, but no steam id. Is there a way to check it see if it's empty, if so end?
3RMAC is offline
Reply



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


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