Steam-5punk integration
Moderator: Forum Moderators
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Steam-5punk integration
Okies, i have basic steam integration working on my test phpbb install.
You can see here: http://clintweb.co.uk/5punktest/viewtopic.php?f=2&t=1 (feel free to register/post/play/whatever)
Update - Latest stuff is On fj's test board now: http://5punktest.fatherjack.net/forum/
I've tweaked the layout in the profile info boxes next to posts to fit in the new info without making it too long - usernames and rank info are to the right of avatars instead of underneath.
Thoughts?
Next task would be to put a live feed of what games are going on somewhere in the header I think, followed by the auto tweeter. Should be simple enough now i have the steam grabbing and data caching code all sorted.
You can see here: http://clintweb.co.uk/5punktest/viewtopic.php?f=2&t=1 (feel free to register/post/play/whatever)
Update - Latest stuff is On fj's test board now: http://5punktest.fatherjack.net/forum/
I've tweaked the layout in the profile info boxes next to posts to fit in the new info without making it too long - usernames and rank info are to the right of avatars instead of underneath.
Thoughts?
Next task would be to put a live feed of what games are going on somewhere in the header I think, followed by the auto tweeter. Should be simple enough now i have the steam grabbing and data caching code all sorted.
Re: Our 5punk Needs You
That's brilliant Prof, absolutely spot on. Nice work!
-
- Throbbing Cupcake
- Posts: 10249
- Joined: February 17th, 2007, 23:05
- Location: The maleboge
Re: Our 5punk Needs You
I like the look of the name/rank being next to the Avatar.
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Yeah my mistake, set a path wrong to the Javascript file, tis fixed now.FatherJack wrote:I really like the look of what Prof's done, but after a few reloads I get "Just a sec Prodding Steam...." against all the profile windows
Its using an API key from my account, i haven't checked what the request limit is, but im sure what we are doing is not taking the piss.FatherJack wrote:we'll have to be careful that long pages don't get us blacklisted by the Steam API.
The code is written so that it only needs to ping steam now and again. It doesn't do an api request for each user - it firstly checks which users it needs to get data for, then gets all the data from steam in one api call (unless there are more than 100 users in which case it splits it into chunks and does one call per 100). Also the user data is cached locally, so it only goes back to steam to get the users data that is out of date. (currently 120 seconds - this could be increased quite a lot if we dont mind the statuses shown being further behind reality).
PS. I'd like to try it out on your test copy of 5punk if thats ok - see how it handles long threads with lots of users. Can you ping me FTP details and give me access to the admin control panel on it? I've tried to keep a checklist of all the file modifications ive done.
Might be overkill, but what do you think about using github keep track of code changes? might make it easier when a few of us are working on it at the same time.
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Okies, i've wangled the steamy5punk thing into FatherJack's test board. To see how it performed I have filled in steamids for everyone in this thread: http://5punktest.fatherjack.net/forum/v ... =2&t=54866
Ive done some speed testing (on FJ's server - dont know if thats slower/faster than 5punkproper), with results:
A) Worst case scenario of a whole thread of unknown users takes around 10 seconds to fetch from steam.
B) Middle case scenario, thread of known users with out of date statuses takes around 3 seconds to update from steam.
C) Best case scenario is that cache is up to date takes around 200ms to retrieve.
I'd say thats probably acceptable as scenario A is very unlikely once its been used for a bit - its going to be mostly somewhere in between B and C in general use, mostly towards C as people flick around threads.
If you guys want to play with testing yourself i've put in a temporary cache reader/clearer here: http://5punktest.fatherjack.net/forum/s ... f=AdmCache
Ive done some speed testing (on FJ's server - dont know if thats slower/faster than 5punkproper), with results:
A) Worst case scenario of a whole thread of unknown users takes around 10 seconds to fetch from steam.
B) Middle case scenario, thread of known users with out of date statuses takes around 3 seconds to update from steam.
C) Best case scenario is that cache is up to date takes around 200ms to retrieve.
I'd say thats probably acceptable as scenario A is very unlikely once its been used for a bit - its going to be mostly somewhere in between B and C in general use, mostly towards C as people flick around threads.
If you guys want to play with testing yourself i've put in a temporary cache reader/clearer here: http://5punktest.fatherjack.net/forum/s ... f=AdmCache
Re: Our 5punk Needs You
I'm really impressed Prof, that is a thing of beauty. Only couple of things I noticed were with the Steam ID underneath (in text); Buzz had '5punk' and Bobbins and Joose had the numeric value. To be honest I could live with that though, as the integration is fucking ace.
-
- Morbo
- Posts: 19676
- Joined: December 10th, 2004, 21:53
- Contact:
Re: Our 5punk Needs You

all of that, most pleasing.
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Cheers
and yes i agree about the extra text, I meant to hide it. Its not really needed as the username acts as a link and all. Give me 2 secs...
/edit
done!

and yes i agree about the extra text, I meant to hide it. Its not really needed as the username acts as a link and all. Give me 2 secs...
/edit
done!
Last edited by ProfHawking on September 10th, 2012, 22:01, edited 1 time in total.
Reason: did thingy
Reason: did thingy
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Ah I didnt explain this - there are two types of steam id.Dog Pants wrote:Steam ID underneath (in text); Buzz had '5punk' and Bobbins and Joose had the numeric value.
The numeric value is the old type, set by valve. Everyone has one of these, eg mine is 76561197969611415. More recently they let you choose a friendly name, eg mine is profhawking.
I've done the code so you can put either in, but it doesnt work backwards, thats why bobbins and joose are numbers - because they've never picked a friendly id. Friendly id is better though as then the little steam link button will work as well.
And Buzz.. is just weird. He's picked 5punk as his friendly id.

-
- Berk
- Posts: 10353
- Joined: December 7th, 2004, 17:02
- Location: Oklahoma City, OK, USA
- Contact:
Re: Our 5punk Needs You
Dog Pants wrote:I'm really impressed Prof, that is a thing of beauty. Only couple of things I noticed were with the Steam ID underneath (in text); Buzz had '5punk' and Bobbins and Joose had the numeric value. To be honest I could live with that though, as the integration is fucking ace.

-
- Robotic Despot
- Posts: 4595
- Joined: October 14th, 2004, 21:35
- Location: Sitting in a tin can
- Contact:
Re: Our 5punk Needs You
Where do you do the friendly name bit?ProfHawking wrote:Ah I didnt explain this - there are two types of steam id.
The numeric value is the old type, set by valve. Everyone has one of these, eg mine is 76561197969611415. More recently they let you choose a friendly name, eg mine is profhawking.

-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Its an option in your steam community profile. There is a setting called Custom URL
-
- Robotic Despot
- Posts: 4595
- Joined: October 14th, 2004, 21:35
- Location: Sitting in a tin can
- Contact:
Re: Our 5punk Needs You
Aha!, changed it and updated my profile and the link works nowProfHawking wrote:Its an option in your steam community profile. There is a setting called Custom URL

-
- Weighted Storage Cube
- Posts: 7167
- Joined: February 26th, 2007, 17:26
- Location: Middle England, nearish Cov
Re: Our 5punk Needs You
Yeah, I did that when it first came out and didn't work properly. I'd forgotton about it actually.ProfHawking wrote:And Buzz.. is just weird. He's picked 5punk as his friendly id.
Edit: Changed now and on that note, as 5punk is now free as a community ID, can the 5punk Steam Page admins see if they can use it?
-
- Site Owner
- Posts: 9597
- Joined: May 16th, 2005, 15:31
- Location: Coventry, UK
- Contact:
Re: Our 5punk Needs You
It should be pretty much identical, which is kind of the point. It's the same package from Dreamhosts we use for the main site, but on a separate virtual instance, the hardware of which will be shared with other customers.ProfHawking wrote:Ive done some speed testing (on FJ's server - dont know if thats slower/faster than 5punkproper)
It was already set to http://steamcommunity.com/groups/5punk when I went to look at it, don't know if someone else already modified it or it's always been set that way.buzzmong wrote:Edit: Changed now and on that note, as 5punk is now free as a community ID, can the 5punk Steam Page admins see if they can use it?
Great work!
-
- Morbo
- Posts: 19676
- Joined: December 10th, 2004, 21:53
- Contact:
Re: Our 5punk Needs You
Has been like that forever.FatherJack wrote:It was already set to http://steamcommunity.com/groups/5punk when I went to look at it, don't know if someone else already modified it or it's always been set that way.
Great work!
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Okiedokie! steamy5punk stage 2 is up for testing at http://5punktest.fatherjack.net/forum/
You should see a new bit under the header that shows live info about what games are being played by all of the users that have been seen posting.
When someone is playing, hovering mouse over the player count will open up info about what is being played and by who.

Test my pretties, test!
PS.
For now, i've set the (steam api spamming prevention) timings quite low, about 10 seconds or so off real-time. For the real forum this might need to be tweaked, depending on how slow/spammy it is.
You should see a new bit under the header that shows live info about what games are being played by all of the users that have been seen posting.
When someone is playing, hovering mouse over the player count will open up info about what is being played and by who.

Test my pretties, test!
PS.
For now, i've set the (steam api spamming prevention) timings quite low, about 10 seconds or so off real-time. For the real forum this might need to be tweaked, depending on how slow/spammy it is.
Re: Our 5punk Needs You
Hmm, it's telling me that nobody's playing right now. By my reckoning there should be at least seven.
Re: Our 5punk Needs You
Dog Pants wrote:Hmm, it's telling me that nobody's playing right now. By my reckoning there should be at least seven.
ProfHawking wrote:users that have been seen posting

-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
Re: Our 5punk Needs You
Yep, probably those playing games haven't put their steamid into their profile on the test site.
Also they'd have to have posted for the steamy5punk to have picked them up. Maybe I'll do proper database integration at some point to skip that step.
In any case it's not going to have everybody until people add their steamid to fj's test site. it would help me out if everyone did
Also they'd have to have posted for the steamy5punk to have picked them up. Maybe I'll do proper database integration at some point to skip that step.
In any case it's not going to have everybody until people add their steamid to fj's test site. it would help me out if everyone did
