[02:13:42] finlay: you can do it via Scribunto/Lua [02:14:29] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects [02:14:41] see isRedirect and redirectTarget [03:54:53] legoktm: ooo thank you kind stranger for the necropost! Much appreciated! [03:55:07] is Lua the new hotness for MediaWiki? I see it mentioned a lot. [03:55:13] for templating, yes [04:01:22] I was curious why, for anyone wondering, https://www.mediawiki.org/wiki/Lua_scripting explains that parserfunctions wikitext templates started having performance issues, and this was seen as a fix. [10:04:04] hi, i am testing the install : the server is coming with Centos 7.x. when checking the software needed, it request Git, i'd like use it. So although git packages are installed, mediawiki can not detect it... Do you know, which package/config need to be loaded/installed ? [10:44:43] yesi: mw just looks for /usr/bin/git i think [10:45:06] There is a config variable to change what path it looks for [10:45:48] Git is only used to show version hashes on special:version if you install extensions via git clone [11:56:58] bawolff: my fault, the path was not found ; thanks [15:01:36] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @milimetric & @amir1 - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [15:51:18] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @milimetric & @amir1 - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [20:53:44] Evening everyone :D [20:55:04] A question about images and uploads if this is the place to do it? [20:56:11] hutber_: maybe, maybe not. Won't know until you ask [20:56:21] lol ye [20:56:39] Basically I'd like to limit the image sizes uploaded to the wiki. [20:57:00] So if I upload a 4000x4000px image, I'd like to automatically resize the image to say 1000x1000px [20:57:09] but not just with the viewing, the actual image [21:00:51] you can configure limits where the wiki will reject images that are too large, I don't think there's a way to make it automatically resize it and then pretend the smaller file is what was uploaded [21:01:33] there's $wgMaxUploadSize for the size (in bytes) that an image can be, default 100MB [21:01:42] looking for one that specifies a max height/width (not sure if that exists) [21:02:09] Ye [21:02:17] I have looked pretty extensively [21:02:35] I got to this bit [21:02:35] https://www.mediawiki.org/wiki/Manual_talk:$wgImageMagickConvertCommand [21:02:58] Basically with the idea of using ImageMagick to resize the images upon upload with the `$wgImageMagickConvertCommand! [21:03:17] SO I thought, if maybe I used a `.sh` script I could do it [21:04:43] you could write an extension that would do it, but it doesn't seem possible in vanilla mw [21:04:55] Ye got you :) Thanks for talking too [21:05:40] now comes the question... how the hell do you do that :P [21:05:45] if you shrink $wgMaxUploadSize you de facto limit how big the files can be in dimensions as well. A limit of (for example) 5 MB doesn't give one a lot to work with when images start getting large [21:05:48] $wgUseImageMagick = false; [21:05:49] $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"; [21:05:49] $wgSVGConverters['GraphicMagick'] = '/usr/bin/gm convert -background none -thumbnail $widthx$height\! $input PNG:$output'; [21:05:49] $wgSVGConverter = 'GraphicMagick'; [21:05:49] # For extension PdfHandler [21:05:50] # Adapted solution from above. "gm convert" results in error message "[thumbnail] thumbnail failed on XXX: error 127 "/bin/bash: gm convert: command not found" [21:05:54] please don't past- [21:05:55] sigh [21:06:55] use a pastebin :) [21:06:57] seems i can't paste code in here... or at least 5 messages [21:06:58] lol ye [21:07:01] the anti-spam bot gets cranky otherwise [21:07:43] So I guess with: $wgSVGConverters['GraphicMagick'] = '/usr/bin/gm convert -background none -thumbnail $widthx$height\! $input PNG:$output'; [21:07:54] $width and $height are just variables I set about this line [21:07:58] all of those only control thumbnailing [21:08:10] no transforms are applied to the base uploaded image at upload time [21:08:53] arghh [21:09:00] ok [21:09:04] I don't like thumbnails :P [21:11:44] humm i've no problem with writing an .sh script [21:12:14] but how I can get access to that image upon upload [22:40:27] Good evening, i search a french forum/community for mediawiki, could you give me more information in this way? tkx