Steam-5punk integration

News and important info, general banter, and suggestions for 5punk

Moderator: Forum Moderators

ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Steam-5punk integration

Post by ProfHawking »

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.
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Re: Our 5punk Needs You

Post by Dog Pants »

That's brilliant Prof, absolutely spot on. Nice work!
HereComesPete
Throbbing Cupcake
Throbbing Cupcake
Posts: 10249
Joined: February 17th, 2007, 23:05
Location: The maleboge

Re: Our 5punk Needs You

Post by HereComesPete »

I like the look of the name/rank being next to the Avatar.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

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
Yeah my mistake, set a path wrong to the Javascript file, tis fixed now.
FatherJack wrote:we'll have to be careful that long pages don't get us blacklisted by the Steam API.
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.
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.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

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
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Re: Our 5punk Needs You

Post by Dog Pants »

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.
Dr. kitteny berk
Morbo
Morbo
Posts: 19676
Joined: December 10th, 2004, 21:53
Contact:

Re: Our 5punk Needs You

Post by Dr. kitteny berk »

:above:

all of that, most pleasing.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

Cheers :aww:
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
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

Dog Pants wrote:Steam ID underneath (in text); Buzz had '5punk' and Bobbins and Joose had the numeric value.
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.
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. :lemon:
deject
Berk
Berk
Posts: 10353
Joined: December 7th, 2004, 17:02
Location: Oklahoma City, OK, USA
Contact:

Re: Our 5punk Needs You

Post by deject »

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.
:above: [borat]is very nice, I like![/borat]
mrbobbins
Robotic Despot
Robotic Despot
Posts: 4595
Joined: October 14th, 2004, 21:35
Location: Sitting in a tin can
Contact:

Re: Our 5punk Needs You

Post by mrbobbins »

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.
Where do you do the friendly name bit? :?
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

Its an option in your steam community profile. There is a setting called Custom URL
mrbobbins
Robotic Despot
Robotic Despot
Posts: 4595
Joined: October 14th, 2004, 21:35
Location: Sitting in a tin can
Contact:

Re: Our 5punk Needs You

Post by mrbobbins »

ProfHawking wrote:Its an option in your steam community profile. There is a setting called Custom URL
Aha!, changed it and updated my profile and the link works now :likesitall:
buzzmong
Weighted Storage Cube
Weighted Storage Cube
Posts: 7167
Joined: February 26th, 2007, 17:26
Location: Middle England, nearish Cov

Re: Our 5punk Needs You

Post by buzzmong »

ProfHawking wrote:And Buzz.. is just weird. He's picked 5punk as his friendly id. :lemon:
Yeah, I did that when it first came out and didn't work properly. I'd forgotton about it actually.

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?
FatherJack
Site Owner
Site Owner
Posts: 9597
Joined: May 16th, 2005, 15:31
Location: Coventry, UK
Contact:

Re: Our 5punk Needs You

Post by FatherJack »

ProfHawking wrote:Ive done some speed testing (on FJ's server - dont know if thats slower/faster than 5punkproper)
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.
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?
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!
Dr. kitteny berk
Morbo
Morbo
Posts: 19676
Joined: December 10th, 2004, 21:53
Contact:

Re: Our 5punk Needs You

Post by Dr. kitteny berk »

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!
Has been like that forever.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

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.

Image


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.
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Re: Our 5punk Needs You

Post by Dog Pants »

Hmm, it's telling me that nobody's playing right now. By my reckoning there should be at least seven.
Thompy
Shambler In Drag
Shambler In Drag
Posts: 768
Joined: July 9th, 2010, 13:34

Re: Our 5punk Needs You

Post by Thompy »

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
:above: Guess that's the reason. Looks good!
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Re: Our 5punk Needs You

Post by ProfHawking »

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 :wave:
Post Reply