[MODDB] Steam Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Locked
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Steam Mod

Post by muggins » Fri Jan 07, 2011 7:02 pm

Please do this, keitzy! 8-)
Muggins

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 12:17 am

You need the steam id to get the online state from valve/steam user profile xml.

So using the online state from the xml file you can create the online state.
Image

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [RC] Steam Mod

Post by Mess » Sat Jan 08, 2011 12:34 am

keitzy wrote:You need the steam id to get the online state from valve/steam user profile xml.

So using the online state from the xml file you can create the online state.
Do you want me to pm you a steam login/password?
I got one with no games on it, took me 30sec to create.

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 12:45 am

Na it's all good. I have a couple of steam accounts.

I'll try and write it today Western Australian time.
Image

User avatar
Prosk8er
Registered User
Posts: 1444
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Steam Mod

Post by Prosk8er » Sat Jan 08, 2011 2:15 am

keitzy wrote:Na it's all good. I have a couple of steam accounts.

I'll try and write it today Western Australian time.
if you want when your done with it i can add it as a addon if it will use anything from my mod

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] Steam Mod

Post by RMcGirr83 » Sat Jan 08, 2011 2:24 am

Code: Select all

$xml = simplexml_load_file('"http://steamcommunity.com/profiles/' . $steam_id64 . '?xml=1"');
will require allow_url_fopen which many hosts do not allow. I would suggest using cURL.

Code: Select all

			/**
			* Initialize the cURL session
			*/
			$ch = curl_init();
			/**
			* Set the URL of the page or file to download.
			*/
			$url = simplexml_load_file('"http://steamcommunity.com/profiles/' . $steam_id64 . '?xml=1"');
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
			$Gxml = curl_exec ($ch);
			curl_close ($ch);
			if (@simplexml_load_string($Gxml))
			{
				/**
				* Create a new file
				*/
				$fp = @fopen($filename, 'w');
				if ($fp)
				{
					fwrite($fp, $Gxml);
					fclose($fp);				
				}
				else
				{
					continue;
				}
			}
which will then allow you to cache the xml feed for however long and use it instead of the feed from Steam. Granted it may not be "real" time but better than nothing I suppose and the above is given as an idea not as functioning code.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 2:40 am

bprsk8r4272 wrote:
keitzy wrote:Na it's all good. I have a couple of steam accounts.

I'll try and write it today Western Australian time.
if you want when your done with it i can add it as a addon if it will use anything from my mod
It will combine about three to four scripts atm.

Plus i will combine it into a auto mod for install.

But i will post code up here first for the advanced lot like ourselves to implement asap.

Prosk8er you can chat to me on steam man if needed and i can send the code and scripts direct man.

Thanx Rich.

I'll have alook at the curl code you have nicely submited for me and see try and implement it.
Image

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 3:06 pm

bprsk8r4272 wrote:
keitzy wrote:Na it's all good. I have a couple of steam accounts.

I'll try and write it today Western Australian time.
if you want when your done with it i can add it as a addon if it will use anything from my mod
I actually added to your mod Prosk8r. Rich and yourself have done a fine job IMO.

Now has steam: online, offline and in game with game playing.

and in profile-icons next to email & pm now has has steam icon to take you to user profile page on steam.

Working on steam sign in intergration atm for registration page ATM.

Am intergrating a steam avatar to give the user the choice of using their steam avatar or upload one instead of overwriting phpbb's avatar system.

Can implement pretty much anything from here http://steamcommunity.com/profiles/7656 ... 0148?xml=1 .

A great thing to maybe do would be a UCP type checkbox to turn on and off any element within the steam mod.

http://www.ausgamingcore.com/clean

when finished. I will give prosk8r the edits to add to the mod if wanted
Image

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] Steam Mod

Post by RMcGirr83 » Sat Jan 08, 2011 3:28 pm

[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1511: simplexml_load_file() [function.simplexml-load-file]: http://steamcommunity.com/profiles/?xml=1:10: parser error : EntityRef: expecting ';'
Needs a bit of debugging first. ;)
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
Prosk8er
Registered User
Posts: 1444
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Steam Mod

Post by Prosk8er » Sat Jan 08, 2011 4:48 pm

keitzy wrote:
bprsk8r4272 wrote:
keitzy wrote:Na it's all good. I have a couple of steam accounts.

I'll try and write it today Western Australian time.
if you want when your done with it i can add it as a addon if it will use anything from my mod
I actually added to your mod Prosk8r. Rich and yourself have done a fine job IMO.

Now has steam: online, offline and in game with game playing.

and in profile-icons next to email & pm now has has steam icon to take you to user profile page on steam.

Working on steam sign in intergration atm for registration page ATM.

Am intergrating a steam avatar to give the user the choice of using their steam avatar or upload one instead of overwriting phpbb's avatar system.

Can implement pretty much anything from here http://steamcommunity.com/profiles/7656 ... 0148?xml=1 .

A great thing to maybe do would be a UCP type checkbox to turn on and off any element within the steam mod.

http://www.ausgamingcore.com/clean

when finished. I will give prosk8r the edits to add to the mod if wanted
yeah sounds good i will certainly add it to the package

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 4:56 pm

RMcGirr83 wrote:
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1511: simplexml_load_file() [function.simplexml-load-file]: http://steamcommunity.com/profiles/?xml=1:10: parser error : EntityRef: expecting ';'
Needs a bit of debugging first. ;)
Yeah wierd. Not sure how you came accross that.

I might have been uploading the same time you looked at the site.

Darn profile-icons.
The hardest thing to get working in phpbb.
Can get some really complicated code to run but the profile-icons no.

Thats why the steam profile-icon is not there.

Arg. Ill keep trying.
Image

User avatar
Prosk8er
Registered User
Posts: 1444
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Steam Mod

Post by Prosk8er » Sat Jan 08, 2011 5:49 pm

keitzy wrote:
RMcGirr83 wrote:
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1511: simplexml_load_file() [function.simplexml-load-file]: http://steamcommunity.com/profiles/?xml=1:10: parser error : EntityRef: expecting ';'
Needs a bit of debugging first. ;)
Yeah wierd. Not sure how you came accross that.

I might have been uploading the same time you looked at the site.

Darn profile-icons.
The hardest thing to get working in phpbb.
Can get some really complicated code to run but the profile-icons no.

Thats why the steam profile-icon is not there.

Arg. Ill keep trying.
im coming across those right now on your test board also if your not logged in go to your post and you should see bout 20-30 errors

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sat Jan 08, 2011 6:01 pm

Yeah me & sql = fail.
Give me some rally hard php im fine. Give me simple sql queries = fail time.
Image

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [RC] Steam Mod

Post by keitzy » Sun Jan 09, 2011 3:38 am

OK. I have got it working. 6 hours to realise it wasn't my code. I should use automod less and more manual install when adding to a mod.

http://www.ausgamingcore.com/clean

To make your steam mod viewable to guests

Code: Select all

In viewtopic.php around line 1146

Find

// BEGIN steam mod
				'steam'			=> ($row['user_steam'] && $auth->acl_get('u_sendim'))  ? $row['user_steam'] : '',
				'steam_is_int'	=> '',
// END steam mod

Inline Find

=> (

remove 

(

and 

&& $auth->acl_get('u_sendim'))  ? $row['user_steam'] : ''

leaving only $row['user_steam'],

Image

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [RC] Steam Mod

Post by Mess » Sun Jan 09, 2011 11:06 am

Wow that perfect! exactly what I have been looking for since... forever. :)
Looking very much forward to be able to try it out.

Locked

Return to “[3.0.x] MODs in Development”