[02:50:54] Hi [02:51:04] I have an issue [02:51:12] With this page [02:51:56] My name is portrayd by a wrong picture [02:52:05] Help [02:52:12] Das [02:52:26] daskaloth@hotmail.com [08:19:48] Hello there [15:44:55] hi [15:45:10] whats the best way to add some code to ? [15:45:35] depends on where you're trying to add it and what you're trying to add [15:45:48] in any case, the answer is probably going to be "write an extension" -- the only difference is what hook you use [15:46:13] its just google verification code [15:48:09] don't they want you to upload a special file with that rather than inject onto every page? [15:49:41] ya [15:49:44] they have that too [15:49:48] maybe ill do that [15:52:04] Skizzerz: [15:53:46] https://github.com/p12tic/AddBodyClass/blob/master/AddBodyClass.php <- something similar would work? [15:56:09] biberao: no, I wouldn't do that [15:56:11] just upload the file [15:56:18] i uploaded the file [15:56:33] but was wondering how to write such extension to add code like that [15:56:35] im curious :D [15:57:01] (that link you gave likely has security vulnerabilities in any case, so don't use it) [15:57:13] didn't test but I saw some suspicious stuff [15:57:14] ok advise me a better example/reading? [15:57:15] thanks [15:57:54] https://www.mediawiki.org/wiki/Manual:Developing_extensions [15:58:30] that i know i meant that particulary situation [15:59:04] you write an extension, browse through the list of hooks for something relevant to what you want to do, read the documentation for that hook, and then use it in your code [15:59:31] ok thanks [15:59:57] it's often helpful to look through the mediawiki source as well to see how the hook is being called, and the automatic docs for mediawiki classes to see what methods/functions are exposed to you in the hook based on parameters passed in [16:00:28] like for the meta [16:00:32] i used this [16:00:42] function onOutputPageParserOutput $out->addMeta [16:00:47] don't just copy/paste someone else's code without putting in the effort to understand what it does and how it works, you don't learn anything that way and, more likely than not, you'll either break something or introduce security vulnerabilities [16:02:12] im reading yes thanks [16:02:12] :D [16:03:51] How do you mass approve pages? [16:05:45] Skizzerz: i think i found something [16:05:45] :D [16:07:42] or how do you approve pages?' [16:10:17] ApprovedRevs extension is installed I think [16:10:55] Skizzerz: im going to test one function [16:10:56] :D [16:11:00] atleast i learn :D [16:11:24] the addHTML should work [16:18:21] it worked [16:18:26] Skizzerz: thanks for making me learn :D [16:18:31] hi 5 [16:20:42] is there a difference when using (OutputPage &$out) and (&$out) [16:20:42] ? [16:31:12] the former is better, as it constrains the function to receiving a parameter of exactly that type [16:31:32] this means two things: your IDE (if you use one) can provide more detailed and precise auto-completion when coding [16:31:55] and second, if the API for that hook changes in the future, your extension will break loudly with a relevant error message rather than possibly failing silently and leaving you to wonder why it's not working [16:32:59] right thanks [16:51:35] ok need to add some js code uhuh [16:59:17] Hi, when uploading the 1.32 version, I get an error message that the file unwatchedPages.js won't upload. Is that something to be concerned about? [17:00:55] I'm on 1.32, and I've changed some css that is loaded by a legacy extension using RLPAGEMODULES. The changes are not showing up so I can only assume there is a cache somewhere. I tried CTRL-F5 and &action=purge but the old CSS is still showing. How do I clear the cache? Site is set up with $wgMainCacheType = CACHE_NONE; [17:05:41] GuidodB: in and of itself, not really (some minor behaviour wont work) but it probably means you have bigger problems [17:07:21] Everything else uploads fine [17:08:24] Current version is 1.23.2, I need to upgrade [17:12:57] Interestingly, trying again single-file has worked [17:36:59] How do you mass approve pages? [17:37:02] ApprovedRevs extension is installed I think [17:58:39] is it possible to modify user's group's rights? [17:58:51] sure, tweak $wgGroupPermissions [17:59:33] i mean the actual "user" group [17:59:36] possible right? [17:59:36] :D [17:59:55] ok its possible thank you [18:45:40] "Multiple translation unit markers for one translation unit. " [18:45:41] bah [18:45:46] I have no idea what this is [18:46:14] you'd think by now I would understand how the translation thing works [18:49:37] figured it out, was misconfiguring the extension which resulted in the css file not getting loaded. [18:49:38] I think i know what that means, but it doesn't make any sense [18:51:10] Maybe, you could mark 2 paragraphs that are separated by other stuff as part of same translation unit [18:54:54] I don't really understand what a translation unit is [18:55:05] the error message just throws a new concept at me without any explanation :D [20:11:46] Its like the [20:12:10] Where it divides the page into parts [21:28:26] Krenair: hopefully the docs are helpful, maybe those should be linked [21:36:55] Nikerabbit, hm, I can't make it happen again [21:36:57] But it was in VE [21:37:11] I don't remember there being a link, it's entirely possible that my code is at fault for breaking the links :p [21:37:24] (VE source mode) [21:37:49] Krenair: there was (probably still is) tha VE is sending different line feeds than normal editor, and those are not normalized in the hook Translate is using. But I worked around that so this is likely something different. [21:47:22] How do i know about OutputPage objects for example [21:47:32] ? [21:47:33] i saw this OutputPage &$out [21:49:00] parameter types? [21:50:25] what parameter types it accepts i mean [21:50:55] Well, if it's got the type on the left, it only accepts that and subclasses [21:51:42] know a place i can read more about that? thanks [21:52:10] Read about what? [21:52:15] Look at the PHP code? [21:52:29] http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration [21:52:52] no i dont mean that [21:52:57] i meant mediawiki wise [21:52:58] ? [21:53:46] https://doc.wikimedia.org/mediawiki-core/master/php/annotated.html [21:53:50] also look at the source code [21:55:33] thanks [22:52:59] by the way [22:53:17] the "OutputPage" is called what [22:53:27] a type declaration or it could be like a callback? [23:07:02] or even better where are those declared? [23:38:34] I have a case where a p-element is inside a div-element, where the margin for the p-element seems to extend outside the div-element. Anyone knows how this can happen? The behavior is consistent in Chromium and Firefox, so obviously (!) it is an intended behavior. [23:38:44] * jeblad scratches his head