Logo

CS.RIN.RU - Steam Underground Community

Cool members bookmark the index page.
It is currently Tuesday, 17 Jul 2018, 04:39

English | Русский




Reply to topic  [ 98 posts ] 
Author Message

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Monday, 03 Apr 2017, 18:06   Reply with quote
I live here Три раза сломал клаву :)
User avatar
Joined: Friday, 12 Sep 2014, 19:18
Posts: 1970
What I learned from my time here is that most people don't seem to care about the OP, and if they do, they're looking for installation guide or quick summary of the most important information. That's why I'm grateful this SteamInfo code exists, so I don't have to waste time on the general game information for people who don't care about it :razz:

_________________
Always wanted to get rid of the files that were not listed in the sfv/md5 hash file? Check the batch I wrote for this: viewtopic.php?p=1273745#p1273745


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Tuesday, 04 Apr 2017, 03:01   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
TwelveCharzzz, I was just thinking the very same thing when I saw Rezmar's layout. I tried to restructure the code yesterday, but I'm not proficient in Javascript. I find callback functions and functions defined inside functions extremely awkward, but there seems to be no sensible way of passing entire objects by reference.

What I would like to have, as a first step, is to separate the part of the code that, provided the SteamInfo data, builds the BBCode output, and all the rest like the XMLHTTPRequest and error handling.

Or we really build a simple template engine where users can put a specification into a userscript - or a custom profile field! So users can write something like:


[img]{SI_HEADER_IMAGE}[/img]

[color={SI_COLOR}][size={SI_TITLE_SIZE}][b]{SI_NAME}[/b][/size][/color]

[color={SI_COLOR}][b]Details[/b][/color]
[b]Store Page: [/b][url=http://store.steampowered.com/app/{SI_APPID}/]http://store.steampowered.com/app/{SI_APPID}/[/url]
[b]Genre(s): [/b] {SI_GENRELIST}
...

[color={SI_COLOR}][b]Features[/b][/color][list]
{SI_FEATURE_LIST}
...
[/list]

[color=#FF0000][b]About The Game[/b][/color]
{SI_ABOUT_THE_GAME}


..and the generator button gives them that.
Edit: But I realize now that stuff like {SI_FEATURE_LIST}, which you could format in 100 different ways, and probably many other parts, would be tedious to code an engine for. It would have to be restricted in some ways. Or we give the user more control and actually go with full Javascript userscripts and assume (very) basic coding knowledge. Many many options for something like this.

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Tuesday, 04 Apr 2017, 03:02   Reply with quote
I live here Три раза сломал клаву :)
User avatar
Joined: Wednesday, 20 Mar 2013, 01:45
Posts: 1674
Anomaly wrote:
What I learned from my time here is that most people don't seem to care about the OP, and if they do, they're looking for installation guide or quick summary of the most important information. That's why I'm grateful this SteamInfo code exists, so I don't have to waste time on the general game information for people who don't care about it :razz:

The problem is 90% of the threads don't have updated info in the OP because they just get abandoned once the creator gets bored of the game. If more OPs were a reliable source for updated info then more people would look at them first before asking questions over and over. I know it's not easy to keep some games up to date but maybe people just shouldn't create game threads if they have no intention of updating it.
There's quite a few examples of threads that have clearly just been created as a sort of "request" rather than out of any desire to provide actual info to other forum users.


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Tuesday, 04 Apr 2017, 03:11   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
bongsmoke1989, I completely agree, and this has been subject of a few staff discussions. There's no technical solution for that, with the amount of games on here, we don't have the manpower to maintain first posts. And by manpower, I mean engaged users, not just staff (who'd have their hands full already if they did only half of what they do).

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Tuesday, 04 Apr 2017, 08:36   Reply with quote
I live here Три раза сломал клаву :)
User avatar
Joined: Thursday, 09 Feb 2012, 23:00
Posts: 5588
Location: Yugoslavia...
^ This...
There will never be enough of people willing to maintain up to date first post (Topic).

So I only try to make topics that I think I am willing to maintain... ofc there is some oversight...

@RessourectoR
I posted my layout just to share all images that I am resized. There is couple of missing, like keyboard and mouse support :shock: .

I think will remake a little bit my layout...

_________________
List of some Computer games [[Please login to see this link.]]

I am off until last day of this month and maybe more.

Image Image Image


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Wednesday, 05 Apr 2017, 17:33   Reply with quote
Advanced forumer Завсегдатай
User avatar
Joined: Thursday, 22 Aug 2013, 03:34
Posts: 230
Hi @RessourectoR, i improved your script.

[[Please login to see this link.]]

_________________
Get DLC Info from SteamDB


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Wednesday, 05 Apr 2017, 20:00   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
Very nice, thanks for this. You made it a lot cleaner, encapsulating it like that and getting rid of the long "if" string, as well as using `` and ${} notation.
I'll work in your improvements later.

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Wednesday, 05 Apr 2017, 20:55   Reply with quote
Advanced forumer Завсегдатай
User avatar
Joined: Thursday, 22 Aug 2013, 03:34
Posts: 230
If you need help, contact me ::)

_________________
Get DLC Info from SteamDB


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Wednesday, 05 Apr 2017, 22:42   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
The code looks straightforward to me, although of course I wasn't familiar with some of the things you can do in JS. I assume everything works on major browsers? Or is there something too modern for older versions?

To everyone: Once we've agreed on a default format, I still need to replace the [steaminfo] occurences. There are almost 4000, so I need to automate it. I'm going to reuse the JS code we're working on here, but we need to be aware that once I run the script, we cannot fix any formatting mistakes automatically anymore.

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Thursday, 06 Apr 2017, 05:18   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
Of course I wrote a huge post explaining all my changes, and of course I closed the unsaved tab in Notepad++ before actually posting it. Well done.

So here's the short version:

Steam store data filtering (HTML tags, HTML entities, excessive linebreaks etc.) is now done on the PHP side.

Javascript code is completely restructured to make it easier for userscript authors and for me to reuse parts of it. You can now pass a "processing callback" to the function that is triggered by the button. All error handling and getting the JSON data is done in other functions, all that processing function has to do is format the JSON data into BBCode and pass the result to another callback function.

So all you have to do to use your own post format is to replace the callback parameter in the onclick="..." call at the button and then implement that function.
If you want to do more advanced things, like make your own buttons or elaborate forms, you can still reuse the functions I provide. If in doubt, ask.

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Thursday, 06 Apr 2017, 08:07   Reply with quote
I live here Три раза сломал клаву :)
User avatar
Joined: Thursday, 09 Feb 2012, 06:31
Posts: 1557
Location: yes
That's some sexy looking code! Lots of nice use of ES6. RessourectoR, everything there works (mostly) on the latest versions of major browsers.
Although the latest version of IE does not support template literals, concise methods, and arrow functions which are used.

Also, it would most likely break on older browsers, so you should check out a compatibility table to see if that's a concern for you.
[[Please login to see this link.]]

_________________
Stuff: [[Please login to see this link.]].GoodOldDownloads | OpenLoad & ClicknUpload Download Userscript


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Thursday, 06 Apr 2017, 13:35   Reply with quote
Advanced forumer Завсегдатай
User avatar
Joined: Thursday, 22 Aug 2013, 03:34
Posts: 230
Perfect! If you have problems in the future, contact me ::D

_________________
Get DLC Info from SteamDB


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Friday, 07 Apr 2017, 11:25   Reply with quote
I live here Три раза сломал клаву :)
User avatar
Joined: Tuesday, 24 Feb 2009, 16:42
Posts: 9473
Location: CZ
seems like the generator doesnt do anything while trying to generate this game httptp://store.steampowered.com/app/586390/ .

_________________
[[Please login to see this link.]]
[[Please login to see this link.]]
Image Image
List of recent games with modern DRMs:(updated 23-Apr-2018) - http://cs.rin.ru/forum/viewtopic.php?f=10&t=68151


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Friday, 07 Apr 2017, 12:06   Reply with quote
Retired
Joined: Friday, 06 Jul 2012, 05:00
Posts: 25803
Location: Faster Than Scene
prudislav wrote:
seems like the generator doesnt do anything while trying to generate this game httptp://store.steampowered.com/app/586390/ .

i just tried using "Generate SteamInfo BBCode" using the appid 586390 and it worked fine. try making the topic again


Top
 Profile  

Post Post subject: Re: SteamInfo BBCode Generator   
Posted: Friday, 07 Apr 2017, 12:12   Reply with quote
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 17:09
Posts: 10952
Nope, I just fixed it a few minutes ago. The double quotes for the citation in the game description were replaced incorrectly and led to a JSON syntax error. Thanks for the report.

_________________

For questions and concerns regarding forum policy, contact a moderator first. I may not always reply to such PMs.

Bookmark this to stay informed during downtimes: [[Please login to see this link.]]


Top
 Profile  
Display posts from previous:  Sort by  
Reply to topic  [ 98 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next


Who is online

Users browsing this forum: Black Poseidon, Blomei, cicad4, dantexmas, Darius69, eagle79, gazarika, Goeke54, gylz12, henning102, hiroex13, hydecruz, JCazz, JDougny, kaseya14, kirbykid1234, L3TR1X, Licher, linnet9999, loladass, Majestic-12 [Bot], Mr. Tapz, mugenman18, Njknight, Omegakenshin, prome7eu, rail396983, rTz2606, sephopowerx1a6, sfas, Titeuf, TTLRiot, Twilight Starocean, xjf2, zaviedsky93, zyris and 41 guests


Jump to:  
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




Powered by phpBB® Forum Software © phpBB Group