[01:00:56] !hss [01:00:57] https://upload.wikimedia.org/wikipedia/mediawiki/6/69/Hesaidsemanticga2.jpg [11:43:29] Hi guys! I'm new to Wikidata, and I have some edit suggestions, which I cannot perform myself since the articles are semi-protected. What's the best way to "submit" the edit suggestions? [11:45:03] For example, the topic Q22583595 (Middle Africa) has the property P527 ("has part") with value Q916 (Angola), but Angola does not have a P361 ("part of") property with value Q22583595. [11:46:58] Same for Democratic Republic of the Congo (Q974) and Chad (Q657) [13:29:17] How can I restrict edit access to each page ONLY to its original author? [13:36:10] meaning only the original author can edit it [13:48:26] hi! I'm currently trying to set up a mediawiki with the help of the bitnami stack virtual machine. So far everything is working, but now I'm trying to import Templates from Wikipedia. Especially Annotated_Image and Annotated_Image_4. When importing Annotated_Image_4 I get no errors but testing this, there is a lot of unformated text. When trying to import Annotated_Image I receive the error, that there is no content handler for sanit [13:49:21] So I tried installing TemplateStyles but after this nothing can be imported anymore. I am trying to configure TemplateStyles but cannot find good documentation at the moment [13:53:06] Can someone maybe give me a pointer on how to solve this? [13:53:11] Thanks in advance [15:00:29] I'm getting a weird newline-eating bug trying to make a conditional column in a wiki-template. Could someone please take a look at my template and let me know how I'm supposed to do this? https://www.mediawiki.org/wiki/User:Ofbeaton/Sandbox [15:00:44] notice the WYSIWYG editor shows it properly, but mediawiki does not [15:01:58] I've been scratching my head at this thing in a Template for the good part of an hour now trying various things [15:02:30] if I split the {{#if: over multiple lines it works, but now I introduce extra newlines when the parameters are off [15:02:43] it's like I'm damned if I do, damned if I don't [17:06:41] I ended up ditching the Wikitable format and going with HTML tables that did not have this problem. [19:15:40] GeorgiosMavropal: As far as I know that's not possible out of the box. It's a fairly common request, though, so there might be some extension around. [22:22:38] is it possible, in api.php or similar, to get a cropped region of an uploaded image? [22:23:22] like on the fly? [22:23:30] no [22:23:53] ok. I guess I can make my own api extension if I need to [22:24:05] it'd be a bit more than just an api extension [22:24:11] MW doesn't do that at all [22:24:27] I know, I can use imagemagick or whatever [22:24:30] it's basically originals or thumbnails [22:24:59] is there a way, in an extension, to receive requests at an endpoint in some way and process the response? [22:25:10] an endpoint? [22:25:23] Reedy: a url that someone can publicly use [22:25:26] like api.php or similar [22:25:52] wordpress has something like this where you can define a custom api route with your own logic [22:26:31] https://www.mediawiki.org/wiki/API:Extensions [22:26:42] An extension can add API modules, yes [22:26:55] But MW has no functionality to add mycustomentrypoint.php [22:27:02] yeah, I was just trying to figure out what mediawiki calls this functionality [22:27:10] right, I was saying either way is fine as long as it's possible [22:27:13] I wasn't sure what was possible [22:27:27] I just need a place to receive requests in my code and process them [22:27:31] index.php and api.php can support custom "actions" [22:27:41] ok [22:28:42] if you extend ApiBase to create your own API class, you can basically do whatever you want [22:29:47] aha, there is $wgActions and extension.json can declare the action class [22:29:54] ok, I will look at that vs. ApiBase [22:31:06] $wgActions through index.php would be more if you want a GUI with it [22:31:16] ok, sounds like ApiBase then [22:31:24] I want to get coordinates or similar in, and output a jpg [22:32:53] Probably [22:35:00] btw what issues, if any, might be caused by uploading "large" images into mediawiki? large being very subjective obviously [22:35:04] I mean large filesize [22:35:21] not being able to thumbnail it [22:35:30] since your converter runs out of memory :P [22:35:47] some code I am going over takes images that are 3mb or so and scales them down so they are 700k or so and around 2000 pixels wide, before uploading/importing them [22:35:58] the originals are 5600 wide, which doesn't seem too crazy to me [22:36:26] I can try it and see [22:36:31] importing the originals [22:36:37] it will probably work [22:36:42] thanks [22:36:45] we have much larger images at commons.wikimedia.org [22:36:55] Platonides: right, I figured you must [22:37:09] I don't have a ton of experience with mediawiki or even really dealing with large images [22:37:13] it doesn't use the default thumbnailer, though [22:37:29] should I generally use imagemagick if it's available? [22:38:13] as opposed to what? [22:38:17] generally, yes [22:38:29] it's better to use imagemagick than php-gd [22:38:30] wgUseImageMagick [22:38:32] When I need to generate thumbnails of large images for mediawiki on shared hosting, I use this little script: https://phabricator.wikimedia.org/P7049 [22:38:33] right [22:38:35] ok, thanks [22:40:25] from mediawiki's perspective, everything that isn't the original is a thumbnail, right? so I could have a 5600px original scaled down to 2000px and call that a thumbnail [22:41:59] sorry? [22:42:24] Platonides: I am thinking of making a scaled down, but still quite large, version of an image. in normal parlance one wouldn't call that a thumbnail [22:42:35] in fact I'm thinking it would be the primary version of the image for most purposes [22:42:42] the original being a high quality one for special purposes [22:42:58] you could upload the original one [22:43:10] then the "2000px original" [22:43:20] so the bigger one appears on the history [22:43:25] but is not generally used [22:43:29] hrm... ok [22:43:40] interesting idea actually [22:44:00] or, I could make a convention for connecting the two images -- different names [22:44:14] foo and foo-original [22:44:33] how would that help mediawiki? [22:44:50] hmm, you could make a custom thumbnailer script [22:45:00] then I wouldn't have to worry about specifying the resolution of foo that I generally want [22:45:01] that first looked for the 2000px file [22:45:14] and used that as the source for the smaller thumbnails [22:45:15] foo-original will be used for generating cropped high-res versions of zoomed in regions [22:45:30] via the custom api thing I will make [22:45:49] mediawiki would just manage the file for foo-original but otherwise it wouldn't be used [22:46:57] Platonides: the issue here is kinda that we are using mediawiki as a platform for something specialized [22:47:06] it provides a ton of useful features out of the box that we don't want to reinvent [22:47:13] but we have to integrate our own stuff on top [22:47:50] I am still thinking through the options [22:48:27] I would generally let mediawiki manage the thumbnails itself [22:48:35] ok [22:48:48] but isn't it suboptimal to have the 2000px "thumbnail" be the main version? [22:48:56] why? [22:49:00] I dunno :) [22:49:15] I guess it doesn't matter [22:49:27] let the 3mb file be the original one :P [22:49:41] ok, I'll try that first [22:50:12] in which format are those files? [22:50:41] jpg [22:52:01] if they are *not* progressive ones [22:52:13] they can be thumbnailed progrssively [22:52:31] ie. efficiently [22:53:05] how? [22:54:10] imagemagick will do that automatically [22:54:14] ahh ok [22:54:21] cool [22:54:25] it will read a bit of the image, output that thumbnailed, and so on [22:54:31] with progressive images [22:54:41] in order to know the full data [22:54:48] it needs to read the full image [22:54:55] so, you need to keep it in memory [22:54:58] I am pretty sure these are not progressive to start with, dunno though [22:55:08] probably not, indeed