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

SteamSig SteamProfile clone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ugleh
Member
Join Date: Oct 2009
Old 08-03-2010 , 02:43   SteamSig SteamProfile clone
Reply With Quote #1

Features:


Changelog:



http://www.multiupload.com/TUU3IH8FJ5

The ability to set up a Steam Signature, this script cache's images for every 10 minutes.
Meaning status doesn't get updated for 10 minutes prior to the last cache.

ReadMe.html for how to install and exc.

Demo: http://ugleh.com/sig/

Last edited by Ugleh; 08-04-2010 at 00:12.
Ugleh is offline
Ugleh
Member
Join Date: Oct 2009
Old 08-04-2010 , 00:11   Re: SteamSig SteamProfile clone
Reply With Quote #2

Update
Download: http://www.multiupload.com/TUU3IH8FJ5

Default Design page looks like this:
(not functional) http://ugleh.com/sig2/index.php (not functional)
Ugleh is offline
InflatableSoulmate
Senior Member
Join Date: Oct 2008
Location: *.mdmp
Old 08-04-2010 , 02:03   Re: SteamSig SteamProfile clone
Reply With Quote #3

For those of you who want to download from somewhere other than the megaupload/rapidshare/multiupload style download sites, I've hosted the archive on my server. Please be nice to it... it's not particularly fast...

I also re-archived it as a vanilla zip file... I thought I had seen posts about the sourcemod people frowning on the use of .rar extensions... the .rar is smaller by about 100KB so if you care that much about bandwidth, download it from the link the author posted. I chose zip over tar.bz2 to be friendly to the windows people, and because the linux people probably already know enough to unzip a regular .zip file.

I *skimmed* the archive to look for anything blatantly malicious and didn't see anything, but I only spent about 2 minutes looking at the code, and I'm not exactly a brilliant php programmer, so the disclaimer should remain "use at your own risk, he might be trying to pwn your server, blahblahblah" and "my hosting of the file does not signify in any way my endorsement of the quality of the code, or the non-maliciousness of the code". I also didn't test to see if it actually works, but I'll probably do that eventually, because it looks useful (which is why I bothered hosting it in the first place). If anyone has a look at the code and thinks there's something suspicious about it, please let me know so I can remove it (and also avoid having issues when I try to use it myself). I'll take a more detailed look at it tomorrow.

http://www.boomheadshot.org/downloads/steamsig1.2.0.zip

P.S.: To the author -- If you want me to take it down, just PM me and I will... just thought I'd try to help the community out, and I thank you for putting this out there for me and everyone else to play with!
__________________
Inflatable Soulmate
Server Operations Manager
Brothers of Chaos Multi-Gaming Clan
http://www.brothersofchaos.com/

Last edited by InflatableSoulmate; 08-04-2010 at 02:06.
InflatableSoulmate is offline
Ugleh
Member
Join Date: Oct 2009
Old 08-04-2010 , 03:11   Re: SteamSig SteamProfile clone
Reply With Quote #4

no problem, it isnt a malicious code or anything.
the demo is quite simple.
//Friend ID
http://ugleh.com/sig/76561198004627776.png
//Custom ID
http://ugleh.com/sig/Ugleh.png
//Steam ID
http://ugleh.com/sig/STEAM_0:0:22181024.png

It updates every 5 minutes on my server, but the default in the script is 10 minutes.
You can change this via the config file.
Ugleh is offline
InflatableSoulmate
Senior Member
Join Date: Oct 2008
Location: *.mdmp
Old 08-04-2010 , 21:34   Re: SteamSig SteamProfile clone
Reply With Quote #5

Yeah, I took a closer look and had MatthiasVance take a second look. Just wanted to be safe on my side.

I think what would make this code make more sense would be to assume that the steam status signatures are going to be integrated with some other software, but you make use of the POST method, which isn't handy for people who want to just include a static signature in, say, a forum post. Wouldn't it make more sense to use the GET method? Then you could just create a link with your steam id/community id in the URL...

Edit: blah, is see what that was about. you were checking to see if for some reason someone POSTed the id, and if so, used the POST array, but the GET array was used otherwise. I should pay attention to all the files at the sam time instead of one at a time.

Edit2: and after more reading code, I have come to the conclusion that I shouldn't ever post anything to a forum without actually finishing looking at the code I am commenting on. epic newb moment.
__________________
Inflatable Soulmate
Server Operations Manager
Brothers of Chaos Multi-Gaming Clan
http://www.brothersofchaos.com/

Last edited by InflatableSoulmate; 08-04-2010 at 21:56.
InflatableSoulmate is offline
InflatableSoulmate
Senior Member
Join Date: Oct 2008
Location: *.mdmp
Old 08-04-2010 , 22:33   Re: SteamSig SteamProfile clone
Reply With Quote #6

Btw, I did run into a couple of problems using this on my web server. First, I didn't have the php-gd library installed (sudo apt-get install php5-gd), and second, it seems that the path wasn't working quite right... The script wasn't able to find the font files, so I modified the following lines in sig.php:

PHP Code:
$font "DejaVuSans-Bold.ttf";
imagettftext($imgs704814$tcolor$font$text);
$font1 "DejaVuSans.ttf";
imagettftext($imgs704825$tcolor$font1$statustext);
imagettftext($imgs704837$tcolor$font1$gametext); 
...so that they looked like:

PHP Code:
$font "./DejaVuSans-Bold.ttf";
imagettftext($imgs704814$tcolor$font$text);
$font1 "./DejaVuSans.ttf";
imagettftext($imgs704825$tcolor$font1$statustext);
imagettftext($imgs704837$tcolor$font1$gametext); 
Adding the "./" to the filenames made it work, for some reason... maybe php5 on ubuntu doesn't let you not specify a directory to be working in...
__________________
Inflatable Soulmate
Server Operations Manager
Brothers of Chaos Multi-Gaming Clan
http://www.brothersofchaos.com/
InflatableSoulmate is offline
InflatableSoulmate
Senior Member
Join Date: Oct 2008
Location: *.mdmp
Old 08-05-2010 , 01:54   Re: SteamSig SteamProfile clone
Reply With Quote #7

I wasn't using the index.php to generate the signatures and ran into a problem that is more than likely checked for in the index.php...

If you type in a random steam id/community id/custom url, and the imagecreatefromjpeg() function gets an error code back because the image doesn't exist (or a forbidden 403 error), then the script errors out and could possibly break a forum where a user is being malicious or made a typo. I changed a few lines of code in the sig.php to patch this problem, and I can't promise it will fix all cases or not break other cases that worked before, but it seems to be working for me:

Code:
        $profileimage = $z[1];

        if ($profileimage != '')
        {
                $profilei = imagecreatefromjpeg("http://media.steampowered.com/steamcommunity/public/images".$profileimage);
                $text = "$name";
        }
        else
        {
                $profilei = imagecreatefrompng($offline_image);
                $text = "Profile not found.";
        }

        imagecopy($imgs, $bstatus, 4, 4, 0, 0, 40, 40);
        imagecopy($imgs, $profilei, 8, 8, 0, 0, 32, 32);
        $font = "./DejaVuSans-Bold.ttf";
        imagettftext($imgs, 7, 0, 48, 14, $tcolor, $font, $text);
        $font1 = "./DejaVuSans.ttf";
        imagettftext($imgs, 7, 0, 48, 25, $tcolor, $font1, $statustext);
        imagettftext($imgs, 7, 0, 48, 37, $tcolor, $font1, $gametext);
        header("Content-type: image/png");
        imagepng($imgs, "cache/$userid.png", 0);
        imagepng($imgs);
        imagedestroy($imgs);
This is really hacky, but I noticed that the $profileimage variable ended up being blank if the profile didn't exist, so I checked for that and used the blank avatar box and changed the text associated with the user's name to "Profile not found."
__________________
Inflatable Soulmate
Server Operations Manager
Brothers of Chaos Multi-Gaming Clan
http://www.brothersofchaos.com/

Last edited by InflatableSoulmate; 08-05-2010 at 01:58.
InflatableSoulmate is offline
Ugleh
Member
Join Date: Oct 2009
Old 08-05-2010 , 06:49   Re: SteamSig SteamProfile clone
Reply With Quote #8

The image doesnt break and a forum wont break either, because the image will then be cached.


http://ugleh.com/sig/76561198004627w.png
this is a broken image, yet it shows no data and it isnt actually "broken", and no 404 errors either because it caches it out.
Ugleh is offline
InflatableSoulmate
Senior Member
Join Date: Oct 2008
Location: *.mdmp
Old 08-05-2010 , 10:30   Re: SteamSig SteamProfile clone
Reply With Quote #9

Hmm... maybe it's just my server, then. I get a php error, then a bunch of what looks like binary 'junk' in text form. Maybe if it is actually embedded in html, it renders the binary stuff?
__________________
Inflatable Soulmate
Server Operations Manager
Brothers of Chaos Multi-Gaming Clan
http://www.brothersofchaos.com/
InflatableSoulmate is offline
nomy
Senior Member
Join Date: Dec 2009
Location: United Kingdom
Old 04-15-2012 , 12:41   Re: SteamSig SteamProfile clone
Reply With Quote #10

Sorry for the bump. Does anyone still have the files?
nomy 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 12:57.


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