User talk:Surafbrov

[ Please post new topics at the bottom of the page by clicking this link to add a new section.]

Please add extensions CSS and TippingOver
Could you add the extensions CSS and TippingOver so we can have card tooltips and template-specific styling. Thanks! Salvatos1 (talk) 21:43, 15 December 2019 (UTC)
 * Instead of using the CSS extension, just use the Common.css. TippingOver is now enabled. Surafbrov (talk) 22:53, 15 December 2019 (UTC)
 * Hiya, just chiming in - I'd like to grant Salvatos permissions to edit Common.css and Mobile.css, but I cannot see any option to set it as such - is this possible? Thanks K3W3L (talk) 03:18, 16 December 2019 (UTC)
 * I can add Salvatos to the interface administrator group that allows them to edit those pages. Is that okay? Surafbrov (talk) 03:25, 16 December 2019 (UTC)
 * Sure, thanks!K3W3L (talk) 03:28, 16 December 2019 (UTC)
 * Could you check if the settings are correct for TippingOver? The tooltip for Storm Signal is not appearing on pages like The_Banshee and User:Salvatos1/sandbox, but they appear when previewing changes to those pages. Is it just caching taking its sweet time? Salvatos1 (talk) 21:25, 19 December 2019 (UTC)
 * Seems to works fine, purging the page or null editing it (editing it and submitting it without making changes) fixed those pages. Surafbrov (talk) 02:50, 20 December 2019 (UTC)
 * Could you try setting $wgtoEarlyTargetRedirectFollow to false on TippingOver? We need tooltips to display from redirect pages to accommodate card variants with identical names that share a common article, and I'm hoping that would trigger it. Salvatos1 (talk) 00:00, 1 January 2020 (UTC)
 * Okay, done! Surafbrov (talk) 05:37, 1 January 2020 (UTC)

Please add the Cargo extension
We will need Cargo as well to build a database of cards. I started building one in a rudimentary way using templates but this would be much better. Salvatos1 (talk) 21:25, 19 December 2019 (UTC)
 * Okay, it is now available. Surafbrov (talk) 23:08, 19 December 2019 (UTC)
 * Thank you! I also realize now that you may not have noticed my simultaneous reply to the thread above. Salvatos1 (talk) 01:33, 20 December 2019 (UTC)
 * Sorry to bother you again, but neither SharkbombStudios nor K3W3L have been able to create the data table at Template:CargoCards. It doesn’t look like there’s anything wrong with the declaration. Could you take a look please? I also get a MediaWiki error if I try to edit it now:

[5f0c1de29e39f3df0d554f24] /index.php?title=Template:CargoCards&action=submit Wikimedia\Rdbms\DBTransactionStateError from line 1424 of /home/hydra/public_html/includes/libs/rdbms/database/Database.php: Cannot execute query from Wikimedia\Rdbms\DatabaseMysqlBase::tableExists while transaction status is ERROR.
 * Salvatos1 (talk) 15:28, 20 December 2019 (UTC)
 * Looks like it’s fixed now. Maybe it just took a really long time to process? Salvatos1 (talk) 23:42, 20 December 2019 (UTC)
 * Looking into and asked about it. I created the table just fine, but an administrator and wiki guardian should be able to create it. Surafbrov (talk) 23:47, 20 December 2019 (UTC)
 * Did you find out anything about this? SharkbombStudios tried to created this table and nothing happened. Salvatos1 (talk) 16:03, 8 January 2020 (UTC)
 * One thing that could be done is to get rid of all the cargo_stores from the page and call it whenever an article gets created. For example, an infobox can store this information for each card as they get created. Same case for Template:CargoCards. Surafbrov (talk) 17:30, 8 January 2020 (UTC)
 * Well, to be honest that’s basically the opposite of what we want. We want to be able to store and update the information in one place and then fetch it in various areas of the wiki. We already have tables of all the data we need that we just need to run some regular expressions on to turn into a Cargo-readable format. Entering it manually on every page and having to update it piecemeal defeats the purpose of a database completely, in my view. I know that’s Cargo’s primary intended mode of operation, but it seems to be the only option available for database behavior, so I am making do with it. I could put the cargo_create and the cargo_stores in two separate templates, if that helps, but other than that I just don’t see a useful alternative. Salvatos1 (talk) 22:48, 8 January 2020 (UTC)
 * Looking at the Recent Changes, I removed it all from the article and was able to successfully to create the table. The problem with having it all on one page is that it'll be more difficult to update the information. Individual articles like having Lookout give the information by using the would work a lot better. Surafbrov (talk) 13:54, 9 January 2020 (UTC)
 * Thanks! Honestly though, in our situation this is easier and much more efficient. Whenever changes are made to the game, the dev can just update the Google spreadsheet and it’s a matter of a few minutes to run a regular expression on each table to turn it into wikitext and update everything at once by just copy-pasting it into the Cargo page. On top of being quick and simple, it saves us having to manually check/keep track of where exactly changes have been made. Salvatos1 (talk) 14:11, 9 January 2020 (UTC)

RegexFunctions and RandomSelection
Hi, please add RegexFunctions and RandomSelection as well so we can complete Template:Showcard and show random cards on the home page. Thanks! Salvatos1 (talk) 05:17, 31 December 2019 (UTC)
 * Okay, done! Surafbrov (talk) 14:02, 31 December 2019 (UTC)

Multiple Upload
Could you add the multiupload gadget to the wiki? I need to upload 172 status icons :) Thanks! Salvatos1 (talk) 14:36, 8 January 2020 (UTC)
 * Okay, enabled gadgets and added the multiupload gadget. Surafbrov (talk) 15:30, 8 January 2020 (UTC)

BoilerRoom extension
I hope you’re not too sick of my requests; I’m finding out what I need as I go. I’d like BoilerRoom added as well, please. Salvatos1 (talk) 03:22, 10 January 2020 (UTC)
 * Okay, added. Surafbrov (talk) 12:44, 10 January 2020 (UTC)
 * Thanks! I think TemplateData would also be useful at this point even though I’m not a fan of the visual editor myself :) Salvatos1 (talk) 22:55, 10 January 2020 (UTC)
 * And TemplateData has been added. Surafbrov (talk) 17:39, 11 January 2020 (UTC)
 * Could you add Loops as well please? And I suppose the IF SQL function is off the table on Gamepedia in general? It would be really helpful in formatting Cargo query results. Salvatos1 (talk) 10:47, 13 January 2020 (UTC)
 * Added. Pretty sure the #if does the same thing. Surafbrov (talk) 17:22, 13 January 2020 (UTC)

Granting admin rights to Salvatos
Hi, if Salvatos is keen, would it be possible to up his rights to administrator rights? He's been doing a huge amount of work to get the Wiki looking a lot fancier and it'd probably make things a lot more convenient on his end to do specific technical bits. Thanks! K3W3L (talk) 09:49, 15 January 2020 (UTC)
 * Okay, done! Surafbrov (talk) 19:14, 15 January 2020 (UTC)

SQL functions
So, going back to SQL functions in Cargo. One specific case where I would like one added to $wgCargoAllowedSQLFunctions is Template:SortableDeckList. In many cases, we would want the results sorted by rarity, but I can’t do a default  since the possible values are ranked as Common < Rare < Legendary < Mythic, i.e. not alphabetically. This would be easily solved by using, but FIELD is not allowed by default.

I don’t have a specific example for IF, but there are a couple things I tried to do and gave up on where IF would have worked. The #if parser function is no help at query time since using the # character in a Cargo query throws an error, and I don’t imagine the parser function would properly interact with each fetch operation anyway. It would be especially helpful in custom query pages where making a template to post-process the results would be overkill. Salvatos1 (talk) 11:37, 17 January 2020 (UTC)
 * For IF, Pcj suggested that you might be able to use the CASE statement instead, though he hasn't checked. I'll get back on you about the FIELD. Surafbrov (talk) 12:32, 17 January 2020 (UTC)
 * CASE would probably be a suitable alternative, but it seems to be disabled as well: test. Either would really help in dealing with cards that have the same name and that we need to handle differently based on another identifier. Salvatos1 (talk) 12:43, 17 January 2020 (UTC)
 * Instead of the using the FIELD, why not create a new table for Rarities with two columns for the name and a number then use the  for the name and sort them by the number. Regarding IF, there is a ticket. Surafbrov (talk) 16:44, 17 January 2020 (UTC)
 * So the setting can’t be changed per-wiki? I’ll subscribe to the issue, let me know if I should share my use case to help it along. For FIELD, I considered it, but it feels like putting a band-aid on an easily-solved problem. If we decide we want to sort by gender (with possible values being ’’, ’undefined’, ’male’ and ’female’) or by faction (considering that the game files use different names than what is displayed), we’d have to create more and more tables and make everything more complicated. I do appreciate the suggestion though if turning it on isn’t possible. Salvatos1 (talk) 17:00, 17 January 2020 (UTC)
 * It is per-wiki, though it is required to make a ticket for new functions to be added though do feel free to share your use case, it could help! About FIELD: Using the tables would help a whole lot more when it comes to new values. Let's say a new faction was introduced to the game. Instead of going through and updating every template that sorts the faction using FIELD with the new value, you'd instead just update the Faction table with the new value. And if you do go for the tables, might I suggest using a namespace like "Metadata" for them to help them all be searchable in one area. Surafbrov (talk) 17:29, 17 January 2020 (UTC)