4 Apr 2020 |
Charly | codensniffer is intergrated into PHPStorm as well and you can combine with other coding standards. (for anyone who didn't know) | 19:40:09 |
rheingoldriver | i tried applying the xml file from here https://www.mediawiki.org/wiki/JetBrains_IDEs but it didn't catch all the errors | 19:56:09 |
rheingoldriver | oh i see, i didn't keep reading below that... | 19:56:21 |
Charly | When you have the full MW local as well it will traverse down that code and show errors and hints to what it found as well | 19:57:54 |
rheingoldriver | i don't have a local install atm | 19:58:07 |
rheingoldriver | i was writing code on an install yaron gave me access to remotely and then copy pasting it locally to commit haha | 19:58:58 |
Charly | Whenever I find myself getting lost, I just download the whole MW install and let PHPStorm figure out what I'm missing :-) | 19:59:25 |
Charly | ah I get it :-) | 19:59:50 |
Charly | I was actually, for the first time in my life, editing a Wikipedia page :-) | 20:00:10 |
6 Apr 2020 |
tgr | the PHPStorm code style is not really up to date, and won't catch a number of things it could | 10:00:02 |
tgr | would be nice to get it updated | 10:00:09 |
tgr | you can integrate Codesniffer and that will be accurate, but that means you need to fight the IDE's auto-formatting all the time | 10:00:49 |
rheingoldriver | ive been writing code in sublime, i only dl phpstorm to attempt to do the autoformat. is it worth it to switch to coding in phpstorm? | 14:21:28 |
cicalese | You don't need to do a full install of MediaWiki to use PHP codesniffer from composer at the command line. That is, you need to download MediaWiki so you have the files, but you do not need to create a wiki or configure anything. Just put your extension in the extensions directory and, from your extension's directory, run "composer update" and then "composer test" or "composer fix". Well, you do need to install composer if you do not have it. (I use vim to edit my PHP.) | 14:30:56 |
rheingoldriver | oh i didnt even download mediawiki i just copied the files from that repo to one level outside of my folder with cargo in it and then ran from there | 14:32:16 |
rheingoldriver | https://github.com/wikimedia/mediawiki-tools-codesniffer#how-to-install this repo | 14:32:32 |
cicalese | Yeah, as long as you have the files at the correct place above your extension, you're golden. | 14:32:59 |
8 Apr 2020 |
tgr | not worth switching for just the autoformatting, you can probably configure any other IDE to do that | 11:18:08 |
tgr | PHPStorm is pretty decent, e.g. for using XDebug or for doing automated code refactoring; I never used sublime though so can't compare | 11:18:53 |
9 Apr 2020 |
Georgios Mavropalias | Has someone seen any examples of information call from wikidata to a wikipedia page? Meaning that a wikipedia page has a value (e.g. population of a city) directly linked and derived from wikidata? | 12:54:20 |
Georgios Mavropalias | * Has someone seen any examples of information call from wikidata to a wikipedia page? Meaning that a wikipedia page has a value (e.g. population of a city) directly linked and derived from wikidata | 12:54:24 |
addshore | I'm sure I can find some examples, but often they are burried deep in templates. They will either use LUA or one of the parser functions | 12:55:15 |
Georgios Mavropalias | I just want to see how the 'citation' looks like (is there a better word?) and also if it can be made using visualeditor | 12:56:27 |
addshore | hmmm, not sure what you mean byt citation in this context | 12:58:10 |
addshore | * hmmm, not sure what you mean by citation in this context | 12:58:15 |
addshore | Here is an example of the property parser function on test wiki https://test.wikipedia.org/wiki/User:Addshore/sandbox | 12:58:36 |
Georgios Mavropalias | Download image.png | 13:00:21 |
Georgios Mavropalias | This is what i see | 13:00:43 |
Georgios Mavropalias | Is it possible to put the population of e.g. New York in text with a hyperlink to the specific statement?
So you would put the property number in a certain format (like the parser functions you wrote above) but in text it would render just the value of the property (e.g. just the population number of New York) and it would allow you to click it and take you to the specific property of the wikidata item | 13:02:43 |
Georgios Mavropalias | I thought values or properties can be transcluded directly from wikidata to mediawiki pages | 13:03:52 |