Widescreen Gaming Forum

[-noun] Web community dedicated to ensuring PC games run properly on your tablet, netbook, personal computer, HDTV and multi-monitor gaming rig.
It is currently 20 Apr 2024, 02:02

All times are UTC [ DST ]




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 24 May 2013, 22:40 
Offline
User avatar

Joined: 27 Feb 2013, 16:25
Posts: 163
Location: Gloucester, UK
Uhuru NUru wrote:
LuckyNoS7evin wrote:

I'm not sure if your steam profile has to be public for it to pick up all your games, I haven't tested this.


I can confirm

Profile Status: must be public

then will work even if

Inventory: is Private

will not work at all if

Profile Status: is not public



Thanks for that, when I properly write the system I will note that

_________________
i7 3770K (Ivy bridge) | Corsair Dominator 32GB | Asus P8Z77-V LE Plus Intel Z77 | Corsair H100i | 2 x Gigabyte ATi Radeon HD 7950 in crossfire | NXZT Phantom case | OCZ 1000W Powersupply | Samsung 840 PRO 256GB | 2x OCZ agility 3 60GB SSDs | 2x 1TB HDDs |


Top
 Profile  
 


PostPosted: 03 Jul 2013, 16:52 
Offline
User avatar

Joined: 27 Feb 2013, 16:25
Posts: 163
Location: Gloucester, UK
Right so I'm back, after a couple of weeks putting steam IDs into WSGF I ended up at a standstill, there wasn't much I could carry on with until I got some info of the website developers here at WSGF. I also ened up having a lot of stuff going on privately and got sidetracked a little.

Anyway as I just said I'm back and can spend a little time coding some stuff, but I would like a little info or a chat privately with the web guys. (Delphium, CrackerJackMack or whoever can help)

The end goal is for me to give you a php page, one that can be put/embedded into WSGF under the games section, a user goes to said page and gets similar functionality to my test site (in this thread, if it's still up).

The thing is I would like to do this in the fastest and most efficient way, this means SQL queries and using the php 5 JSON or XML libraries to access content from steam.

So I guess the answer is will you allow me a snapshot of the database tables used for the MGL? I need something where I can do a select all games from table and if they have a steam ID include it, if they don't have a steam ID I still however want the game. From this snapshot of tables I'll then be able to produce a php version of the page which connects to a database.

You can then take this off my hands and embed this in WSGF.

Any help would be fantastic, I know I would use it to add more DRs for games I have in steam that you don't have yet, for updating DRs that are "incomplete" and adding more steam IDs to games you already have.

Thanks

S7evin

_________________
i7 3770K (Ivy bridge) | Corsair Dominator 32GB | Asus P8Z77-V LE Plus Intel Z77 | Corsair H100i | 2 x Gigabyte ATi Radeon HD 7950 in crossfire | NXZT Phantom case | OCZ 1000W Powersupply | Samsung 840 PRO 256GB | 2x OCZ agility 3 60GB SSDs | 2x 1TB HDDs |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 18:20 
Offline
Administrators
Administrators
User avatar

Joined: 27 Dec 2009, 14:27
Posts: 1789
Hey s7ven, im sure we can help.

Drupal has a hook for the database that you can call upon instead of us giving direct credential access to the database.
I will look at getting some table information for you if you can let us know what data it is you need, ie each field/item.

I am wondering if I could help chip in and potentially make this into a drupal module, rather than a php code entry, much like I have done with the fovcalc and manual DR grading calc.
This would allow for easier maintinance and have a more offcial feel as it is a tool.

Im quite busy over the next few days sadly, but when i get time ill try catch up with you for a chat.

_________________
| Gigabyte X79S-UP5-WiFi Skt2011 | i7 4820k @4.4GHz Watercooled (Ivy Bridge-E) | Corsair Vengence 32GB @2133MHz 11-11-11-27 2T Quad-Channel (8x4GB) | AMD R9-Fury-X 4GB @1140/505MHz + EKWB Watercooled | 256GB Crucial MX200 SSD | 8x 1TB Samsung F3 SATA-II | Corsair 850W TX PSU | 3x Dell S2209W 22"wide TFT's (5760x1080res) | Logitech Z-5400 5.1ch speakers | Win7 Ultimate x64 |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 18:40 
Offline
User avatar

Joined: 27 Feb 2013, 16:25
Posts: 163
Location: Gloucester, UK
Delphium wrote:
Hey s7ven, im sure we can help.

Drupal has a hook for the database that you can call upon instead of us giving direct credential access to the database.
I will look at getting some table information for you if you can let us know what data it is you need, ie each field/item.

I am wondering if I could help chip in and potentially make this into a drupal module, rather than a php code entry, much like I have done with the fovcalc and manual DR grading calc.
This would allow for easier maintinance and have a more offcial feel as it is a tool.

Im quite busy over the next few days sadly, but when i get time ill try catch up with you for a chat.


Sweet sounds good, I'm all for doing it as a drupal module, although I have no experience of this I have no objections learning :)

The information I need is already in the XML you provide http://www.wsgf.org/mgl/xml the only added data I would like is that all games are returned rather than those with just a SteamID. If I could have the table structure of this data that would be great, I can create that structure in a database, fill it and use it for testing.

In the meantime while you are busy I'll learn/teach myself about Drupal modules :) I'll do an install of drupal on my personal site, and do a temp table structure and base it on the XML in the MGL.

Thanks for all the help and I hope we can work on this and you will be happy with the results.

_________________
i7 3770K (Ivy bridge) | Corsair Dominator 32GB | Asus P8Z77-V LE Plus Intel Z77 | Corsair H100i | 2 x Gigabyte ATi Radeon HD 7950 in crossfire | NXZT Phantom case | OCZ 1000W Powersupply | Samsung 840 PRO 256GB | 2x OCZ agility 3 60GB SSDs | 2x 1TB HDDs |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 19:16 
Offline
Administrators
Administrators
User avatar

Joined: 27 Dec 2009, 14:27
Posts: 1789
Modules are faily simple enough, depending on how much integration with the rest of the site you wish to have but im sure your work it out, i can give you an example of one of mine and or help convert the code into a module once its working.

Here is the MGL XML without the SteamID filter, http://www.wsgf.org/mgl/xml-all

And here is the SQL query that generates that result...
Code:
SELECT node.nid AS nid,
   node.title AS node_title,
   node_data_field_steam_app_num.field_steam_app_num_value AS node_data_field_steam_app_num_field_steam_app_num_value,
   node_data_field_steam_app_num.delta AS node_data_field_steam_app_num_delta,
   node.type AS node_type,
   node.vid AS node_vid,
   term_data_node.name AS term_data_node_name,
   term_data_node.vid AS term_data_node_vid,
   term_data_node.tid AS term_data_node_tid,
   term_data_node_1.name AS term_data_node_1_name,
   term_data_node_1.vid AS term_data_node_1_vid,
   term_data_node_1.tid AS term_data_node_1_tid
 FROM main_node node
 LEFT JOIN (SELECT td.*, tn.vid AS revision FROM main_term_data td INNER JOIN main_term_node tn ON tn.tid = td.tid WHERE td.vid IN (11)) term_data_node ON node.vid = term_data_node.revision
 LEFT JOIN (SELECT td.*, tn.vid AS revision FROM main_term_data td INNER JOIN main_term_node tn ON tn.tid = td.tid WHERE td.vid IN (33)) term_data_node_1 ON node.vid = term_data_node_1.revision
 LEFT JOIN main_content_field_steam_app_num node_data_field_steam_app_num ON node.vid = node_data_field_steam_app_num.vid
 WHERE (node.type in ('dr')) AND (node.status = 1 OR (node.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1)
   ORDER BY node_title ASC


As for the tables, there is many of them, maybe CJM can help with that if you still require them.

_________________
| Gigabyte X79S-UP5-WiFi Skt2011 | i7 4820k @4.4GHz Watercooled (Ivy Bridge-E) | Corsair Vengence 32GB @2133MHz 11-11-11-27 2T Quad-Channel (8x4GB) | AMD R9-Fury-X 4GB @1140/505MHz + EKWB Watercooled | 256GB Crucial MX200 SSD | 8x 1TB Samsung F3 SATA-II | Corsair 850W TX PSU | 3x Dell S2209W 22"wide TFT's (5760x1080res) | Logitech Z-5400 5.1ch speakers | Win7 Ultimate x64 |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 19:29 
Offline
User avatar

Joined: 27 Feb 2013, 16:25
Posts: 163
Location: Gloucester, UK
Delphium wrote:
Modules are faily simple enough, depending on how much integration with the rest of the site you wish to have but im sure your work it out, i can give you an example of one of mine and or help convert the code into a module once its working.

Here is the MGL XML without the SteamID filter, http://www.wsgf.org/mgl/xml-all

And here is the SQL query that generates that result...
Code:
SELECT node.nid AS nid,
   node.title AS node_title,
   node_data_field_steam_app_num.field_steam_app_num_value AS node_data_field_steam_app_num_field_steam_app_num_value,
   node_data_field_steam_app_num.delta AS node_data_field_steam_app_num_delta,
   node.type AS node_type,
   node.vid AS node_vid,
   term_data_node.name AS term_data_node_name,
   term_data_node.vid AS term_data_node_vid,
   term_data_node.tid AS term_data_node_tid,
   term_data_node_1.name AS term_data_node_1_name,
   term_data_node_1.vid AS term_data_node_1_vid,
   term_data_node_1.tid AS term_data_node_1_tid
 FROM main_node node
 LEFT JOIN (SELECT td.*, tn.vid AS revision FROM main_term_data td INNER JOIN main_term_node tn ON tn.tid = td.tid WHERE td.vid IN (11)) term_data_node ON node.vid = term_data_node.revision
 LEFT JOIN (SELECT td.*, tn.vid AS revision FROM main_term_data td INNER JOIN main_term_node tn ON tn.tid = td.tid WHERE td.vid IN (33)) term_data_node_1 ON node.vid = term_data_node_1.revision
 LEFT JOIN main_content_field_steam_app_num node_data_field_steam_app_num ON node.vid = node_data_field_steam_app_num.vid
 WHERE (node.type in ('dr')) AND (node.status = 1 OR (node.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1)
   ORDER BY node_title ASC


As for the tables, there is many of them, maybe CJM can help with that if you still require them.


Thanks that's awesome it's all I need! no need for tables as I can figure that out from the query.


EDIT: which version of Drupal, so I know which API?

_________________
i7 3770K (Ivy bridge) | Corsair Dominator 32GB | Asus P8Z77-V LE Plus Intel Z77 | Corsair H100i | 2 x Gigabyte ATi Radeon HD 7950 in crossfire | NXZT Phantom case | OCZ 1000W Powersupply | Samsung 840 PRO 256GB | 2x OCZ agility 3 60GB SSDs | 2x 1TB HDDs |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 20:32 
Offline
Administrators
Administrators
User avatar

Joined: 27 Dec 2009, 14:27
Posts: 1789
LuckyNoS7evin wrote:
EDIT: which version of Drupal, so I know which API?

Pressflow 6.28

_________________
| Gigabyte X79S-UP5-WiFi Skt2011 | i7 4820k @4.4GHz Watercooled (Ivy Bridge-E) | Corsair Vengence 32GB @2133MHz 11-11-11-27 2T Quad-Channel (8x4GB) | AMD R9-Fury-X 4GB @1140/505MHz + EKWB Watercooled | 256GB Crucial MX200 SSD | 8x 1TB Samsung F3 SATA-II | Corsair 850W TX PSU | 3x Dell S2209W 22"wide TFT's (5760x1080res) | Logitech Z-5400 5.1ch speakers | Win7 Ultimate x64 |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 21:23 
Offline
User avatar

Joined: 27 Feb 2013, 16:25
Posts: 163
Location: Gloucester, UK
Sorry back again, not a big issue right now as I can code around it but I think the SQL is a little off, an example if in the xml-all with the first game on the list with a SteamID (A Valley Without Wind) appears 5 times... at a guess it's because it's finding 5 rows in the

Code:
LEFT JOIN main_content_field_steam_app_num node_data_field_steam_app_num ON node.vid = node_data_field_steam_app_num.vid


just a suggestion and this is based on MS SQL as I'm not a massive user of MySQL or other databases but should it be

Code:
LEFT JOIN main_content_field_steam_app_num node_data_field_steam_app_num ON node.vid = node_data_field_steam_app_num.vid AND node_data_field_steam_app_num.field_steam_app_num_value IS NOT NULL AND node_data_field_steam_app_num.field_steam_app_num_value != 0


or will that block out the ones with no SteamID at all?

Anyway back to coding :)

_________________
i7 3770K (Ivy bridge) | Corsair Dominator 32GB | Asus P8Z77-V LE Plus Intel Z77 | Corsair H100i | 2 x Gigabyte ATi Radeon HD 7950 in crossfire | NXZT Phantom case | OCZ 1000W Powersupply | Samsung 840 PRO 256GB | 2x OCZ agility 3 60GB SSDs | 2x 1TB HDDs |


Top
 Profile  
 
PostPosted: 03 Jul 2013, 21:52 
Offline
Administrators
Administrators
User avatar

Joined: 04 Jun 2011, 21:18
Posts: 34
I can't be 100% sure right now as I don't have the schema in front of me, but you almost definitely want INNER JOIN instead of LEFT JOIN. Doing that alone may fix the problem, I'll look more later.


Top
 Profile  
 
PostPosted: 03 Jul 2013, 23:36 
Offline
Administrators
Administrators
User avatar

Joined: 04 Jun 2011, 21:18
Posts: 34
Ok so now that I have a little more time, the reason you get multiples for the same result is because of a combination of a) LEFT JOIN does that, and b) there's an entry for each revision of the article. So what you are going to want to do will depend on some things.

A simple change to INNER JOIN may appear to work on the outset, but it may not produce the expected results depending on what you're going for. Can you share the full query, as well as a description of what you'd like it to return? That'll give me a better understanding of what you're trying to do, and I'll rewrite it for you to make it work as you want if necessary.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  




Powered by phpBB® Forum Software © phpBB Group