[07:41:42] Hey, can someone help me with a template page problem, the template/doc page doesn't show on my template page [07:50:07] Im also having trouble making shortURL work properly [08:13:33] Can anyone help me? [08:28:50] Do I need Lua for it to work? [08:53:36] Jeffrey: https://www.mediawiki.org/wiki/Manual:Short_URL [09:10:21] @Foxt_ I have tried following that, the problem i have, is once I have done it, the page loads but does not display correctly [15:48:28] Can someone tell me why adding in a user script (as per given in https://en.wikipedia.org/wiki/Wikipedia:User_scripts#Automatic_installer does not work for me ? See page https://en.wikipedia.org/wiki/User:01tonythomas/common.js SAD. [15:50:59] Caching? [15:52:42] Reedy: that would've been nice. I have ctrl+f5 on my keyboard pressed like ever. [15:53:08] Log out and in again? [15:53:50] I still see the same one line there. https://en.wikipedia.org/wiki/User:01tonythomas/common.js - now I am wondering if I am supposed to even see something else there ? [15:54:19] * Reedy slaps tonythomas [15:54:20] https://en.wikipedia.org/wiki/User:TheDJ/sharebox.js [15:54:23] IT'S EMPTY, BRO [15:54:31] ofcourse. what a dummy [15:54:31] So, no, it's not going to change anything [15:54:33] xD [15:55:03] I made you point out the `restart logic` though. xD [15:55:48] some people on hi-wikipedia are having some trouble using Yuvipandas old user scripts. sad situation actually. I was trying to investigate and ended up trying this for the first time. [15:56:31] https://en.wikipedia.org/wiki/Wikipedia_talk:Noticeboard_for_India-related_topics#Tag_&_Assess [16:31:28] I was wondering how I could use the template from the main page of the media wiki site like the first box that says welcome to mediawiki [16:32:36] Installing any required extensions [16:32:42] Then export the template and any dependancies [16:32:44] !exporttemplate [16:32:44] To copy templates from Wikipedia, use Special:Export and check the "Include templates" option to get all the sub-templates, then upload the file with Special:Import on your wiki. You'll also likely have to install the ParserFunctions extension, Scribunto extension and install/enable HTML tidy. You also might need some CSS from Wikipedia's Common.css. You'll also need a lot of... [17:02:21] I am trying to get some sort of boxes but it looks like I am going to have to copy templates even though I don’t really want to. [17:02:27] Like a welcome box for the home page [17:10:16] Is there a way to make a recursive template? I'm trying to make a template that parses a string [17:12:48] You make it call itself, same as you would any recursion [17:13:01] But you obviously need a conditional/similar to prevent it being infinite [17:13:39] I was doing something like {{#if:{{{1}}}|do something with {{str left|{{{1}}}|1}} and continue with {{template|{{str right|{{{1}}}|1}}}}} [17:14:00] I think I'm missing }} there [17:14:18] Feels a lot simpler if you can just use lua [17:14:30] Reedy: that's what I thought but it seems that recursion is not allowed in templates [17:14:57] https://www.mediawiki.org/wiki/Help:Templates#Recursion_in_templates [17:16:51] Yes, that seems to mean that recursion is not permitted, right? [17:17:32] I get "Template loop detected" [17:18:12] Ah, maybe I messed up and I'm creating an *infinite* loop [17:20:21] Sounds like it [17:22:53] Reedy: IIRC one issue with #if was, that it always evaluated both sides and then only one result made it through. You know if that's still true? Or ever was? [17:23:11] My bad, I misunderstood, I thought no loop was allowed [17:23:32] FoxT_: honestly no idea [17:23:34] FoxT_: damn, that might be an issue [17:23:48] includeonly workaround/ [17:24:15] What workaround? [17:24:35] using parser tricks to stop it evaluating stuff [17:25:03] I think I'll read about Lua templates [17:25:38] Can regular users create them? [17:25:44] Yup [17:28:19] Seems complicated, like I need to create a module [17:28:47] What are you actually trying to do? [17:29:51] Morse parser: convert {{morse|.---}} to "dit daah daah daah}" [17:30:43] you should be able to just do that with a loop in lua [17:30:49] Instead of the current {{morse|dot|dash|dash|dash}} [17:31:52] https://www.rosettacode.org/wiki/Morse_code#Lua [17:31:58] I don't remember much of Lua but I guess it would be easy, but I have no idea how to make a Lua template [17:32:46] !scribunto [17:32:46] Scribunto is a new extension that makes it easier to write repeatable code in Lua, rather than in complex wikitext templates. See http://www.mediawiki.org/wiki/Lua_scripting and http://www.mediawiki.org/wiki/Extension:Scribunto for more information. [17:33:05] It's mostly to a pattern [17:36:36] OK, so I need to make a thing in the Module: namespace [17:36:59] Yip [17:37:08] Out of curiosity, what was that includeonly workaround? [17:37:53] Changing the order if/when things are parsed [17:37:55] Also, is there any advantage on using or not using Lua? I think people on Wikipedia tend to reject Lua templates [17:38:15] Do they? [17:38:16] Since when? [17:38:32] They exist to make complex "templates" more simple, easier to maintain etc [17:38:47] Not actually sure, it's an impression I got but maybe I misunderstood something [17:39:30] Brb, asking [17:44:08] https://en.wikipedia.org/wiki/Special:AllPages?from=&to=&namespace=828 [17:44:09] fwiw [17:47:27] Lua is a bit difficult to start if you don't know the syntax (wiki syntax is simple and easy in general), but once you dig in it, it's a lot easier to do complex things than wikitext [17:48:10] Vulpix: I also already linekd a Morse Code parser in lua ;) [18:02:18] I still haven't figured out that includeonly thing… also I'm not sure if there's some easy way to sandbox Lua modules (per user if possible), just put it in Module:sandbox/Cousteau/morse or something like that? [18:05:36] (although I'd I'm making a module just for this, I might as well make a more universal one that parses arbitrary characters/strings) [19:06:26] hello [19:07:18] ?+ [19:07:19] hi [19:07:30] i have a question regarding wiki [19:07:48] is this the right chat for wiki problems [19:08:01] write /topic [19:08:16] how can i do that [19:08:33] by typing it and pressing enter [19:08:41] oh ok i see sorry [19:08:47] it will show you the topic of this channel :) [19:09:00] So I have a wiki account that is not working the whay it should [19:09:31] okay [19:09:40] even my username is wrong..i dont know how that could happen [19:09:54] so now i wish to delete my wiki account in oder to create a new one [19:10:01] are you the admin of the wiki? [19:10:07] no [19:10:11] im just a student [19:10:14] thats y i am here [19:10:29] i thought this will help me to fix my problem [19:11:33] what is your problem? [19:12:23] my problem is that my username is not correct [19:12:35] and that is also the reason that they dont accept my passwort [19:12:56] i want to delete my current account to create a new one [19:13:16] the username shoud be the sur and family name together [19:13:22] without any gap, right? [19:13:48] i just used the same username as i have in moodle [19:13:53] and that is wrong [19:14:14] alright, maybe you should contact your schools/unis tech support? [19:15:14] ok thx [19:16:51] I'm sure they can help you, we can't really [22:43:09] Wikipedia is fucking shit and all your admins are fucking kikes who need to be gassed. [22:43:12] fuck you [22:44:18] Fucking kikes censoring new users and banning them for no valid reason. [23:01:55] hello, is there a way to enable "subpages" in the File namespace, so that users can upload files with names like dir/subdir/filename.ext? [23:02:05] I tried $wgNamespacesWithSubpages[NS_FILE] = true but that did not seem to work [23:02:31] I also found $wgIllegalFileChars but I'm worried that changing it will open up a security hole [23:03:46] What Lua version does mediawiki use? [23:05:35] I'm having trouble making a Lua function that iterates over the arguments. So far I did something like for i = 1, #frame.args do but that seems to yield 0, not the number of arguments [23:05:56] https://www.mediawiki.org/wiki/Extension:Scribunto#Lua_binary 5.1 seemingly [23:06:50] ah wait, it's a weird metatable [23:07:40] Argument values are requested from MediaWiki on demand. This means that most other table methods will not work correctly, including #frame.args, next( frame.args ), and the functions in the Table library. [23:08:15] ...so how do I know when I ran out of arguments? because an argument is nil/""? [23:08:16] nomadictype: currently we use the files real name as the file name. So / is banned as we dont want to make subdirectories in the images directory [23:09:31] bawolff: makes sense. I guess there is no option to always hash/sanitize filenames before they hit the filesystem? [23:09:58] I think there might be actually [23:10:25] But it probably wouldnt remove the / check because it happens on different layers [23:10:55] $wgHashedUploadDirectory is true by default [23:10:58] but i suspect that somewhere in the FileBackend or FileRepo config you can set always hash [23:11:20] right, but thats not the whole filename [23:11:41] but deleted files get fully hashed, so there is that somewhere [23:12:01] You mean storing the file name as the hash? [23:12:11] lol [23:12:38] yeah, so not a/ab/filename.ext but 0/01/01234...def [23:13:16] or just replace all slashes with dashes [23:17:59] Welp, it is done, my very first Mediawiki Lua module: https://en.wikipedia.org/wiki/Module:Sandbox/Cousteau/strsubst [23:18:26] on second thought, it would've been easier if I just knew what that trick to make recursion work was [23:18:40] but I didn't manage to figure out what it was [23:39:15] is there a way to make an argument to a template be a single white space? [23:39:41] just like you can use {{=}} or {{!}} for = and | ?