[09:23:58] Hi. Any solutions for autoredirect to an external website when opening a wiki page? Commons.js, anything (but I need it only for one page, so i dont want extensions)? [09:27:26] gleki: javascript [09:43:26] Vulpix: but how? is there a premade function for this? [09:44:00] window.location does the trick [09:45:59] How to detect that I'm on a page that needs redirection? By reading its title? [09:48:27] mw.config.get('wgPageName') gets the name of the current page [09:48:35] *title [12:17:23] hey hey hey [12:17:30] what's happening y'all =) [12:17:57] I've run into a weird one.. I think that after installing Flow, WikiEditor doesn't work [12:18:04] I get the original editor instead [12:18:13] disabling Flow doesn't change it back [12:18:23] anyone have a clue as to why this is? [15:33:51] I'm donig a little custom CSS on MediaWiki:Common.css [15:34:09] I'm trying to achieve an indenting class (similar effect to blockquote) [15:34:45] I'm using the margin property for this effect: 1em 40px [15:35:22] The indent works in a div element, but not a p (paragraph) element. Can anyone tell me why? [15:39:45] Can you post what css you are using [15:40:05] but I would guess, maybe has to do with
being a block element [15:40:31] Sure, I'll post. But p is also a block element. [15:40:34] or wait,

is also block [15:40:36] yeah [15:41:10] .note { [15:41:10] background-color: Yellow; [15:41:11] padding: 0.5em; [15:41:11] margin: 1em 40px; [15:41:11] } [15:41:35] It works in a div but not in a p. [15:42:03] Actually the color and padding work, just not the margin [15:43:25] oh, I think .mw-body p { margin:0.5em 0; } is more specific, so overriding your style [15:43:47] try throwing in a !important, or use a more specific selector [15:44:38] That's good info -- thanks. I was actually trying to find built-in MW styles. Can you tell me where I would find a list of those? [15:45:59] hey! [15:46:11] I would like to make this http://www.mediawiki.org/wiki/Snippets/Photo_Slider work on my wiki [15:46:18] But it is not very clear to me how to do that [15:49:32] Cory_1975: They're spread through multiple files. Take a look at resources/src/mediawiki.legacy/shared.css [15:50:06] Cory_1975: But remember, you should never edit the built in styles, but instead add custom styles to either MediaWiki:Common.css (or your own skin if making one) [15:50:13] otherwise upgrading versions will suck for you [15:50:57] bawolff: Thanks. I was looking at MediaWiki:Common.css and MediaWiki:Vector.css but couldn't find mw-body p [15:51:09] But I'll check out your resource. [15:51:34] Thanks for the tip. I just wanted to look at it so I know what's default. Thanks again! :-) [15:51:39] Its generally easier to look at something like inspect element in firebug, or chrome developer tools [15:52:14] Another great suggesion -- thanks! [15:52:33] How does one install a MediaWiki snippet? [15:53:18] A MediaWiki snippet/ [15:53:23] A MediaWiki snippet? [15:53:40] oh wait I forgot to scroll up [15:54:13] hmm [15:54:15] MC8: http://www.mediawiki.org/wiki/Snippets [15:55:06] it's been implemented in http://en.wikivoyage.org/wiki/Main_Page/Sandbox [15:55:37] kikero: Usually by copy pasting the css part into MediaWiki:Common.css and js part into MediaWiki:Common.js, but sometimes it varries depending on the snippet [15:56:17] bawolff: tried that [15:56:18] didn't work [15:56:53] could be you have unrelated javascript errors. Could be something weird with the snippet [16:00:04] bawolff: do I have to wrap the code in MediaWiki:Common.js in a document ready? [16:00:33] I don't know, I was just talking generically. I don't know anything about that specific snippet [16:01:19] I'd find an appropriate hook and write a parser extension that just inserts the script in there [16:09:59] Appropriate hook for inserting scripts from a parser function is $parser->addModule (with the module registered to Resource Loader) [18:13:25] Hi there~ any idea why i can't get collapsible navboxes to work (never collapses or even shows a show/hide button...) using |state = collapsed and such of course (Mediawiki 1.22.1) [18:24:42] Neppy: you need a "class="collapsible" " in there or something. Are you doing that? [18:26:39] no, the navbox is doing that though (as in, its there in the html code) [18:28:47] Yaron: no, the navbox is doing that though (as in, its there in the html code) [18:29:25] Neppy: I don't know, then... but I do think you need to specify it somewhere there in the wikitext. [18:29:43] well the navbox does that [18:56:01] I seem to be having an issue with citation templates. I have the Cite extension installed. [18:56:11] I added a References section with the tag [18:56:33] I enclosed my citation information using tags and using the template {{cite book}} (copied and pasted from https://en.wikipedia.org/wiki/Wikipedia:Citation_templates) [18:56:52] But in the references section I'm getting "Template:Cite book" instead of the reference information. [18:57:02] Can anyone tell me what might be wrong? [18:57:40] Neppy, did you also copy over the css code for the navboxes? [19:05:26] MadMac: not sure where to find that, the navbox template was already there anyway [19:07:47] Neppy, copy from https://en.wikipedia.org/wiki/MediaWiki:Common.css [19:07:59] look for /* Default style for navigation boxes */ [19:10:36] also in https://en.wikipedia.org/wiki/MediaWiki:Common.js [19:10:51] search for navigationboxes [19:10:56] that has nothing regarding collapsible though [19:13:34] the correct class for collapsible is mw-collapsible IIRC [19:13:40] !collapsible [19:13:41] https://www.mediawiki.org/wiki/Manual:Collapsible_elements [19:14:21] well i cant do classing either way [19:15:27] look at the JavaScript error console of your browser. Maybe your wiki has some script error preventing other scripts to run properly [20:05:21] anomie: regarding overhaul ApiResult, you mention the "boolean convention" and "the usual api style" in several places, is now a good time to explain it to me? [20:08:43] spagewmf: Sure. Thanks to XML being the original output format, the API used to use a convention of outputting true/false (or set/unset, etc) properties by having the property be present for true and absent for false, and further it used the empty string as the property value when it was present. Since this wasn't fixed up when JSON format was introduced, for consistency the core API continued to use this convention even though it's a pain for [20:08:43] anything except XML. [20:10:32] anomie: OK. AIUI some modules were returning "somekey": true or false to clients rather than "somekey": "" for true and no somekey for false. To preserve this non-standard behavior with the v1 format after the ApiResult change, those modules now need to specify the booleans that require it using META_BC_BOOLS [20:10:52] spagewmf: That [20:10:55] 's correct. [20:13:01] And without this it breaks BC because clients of the module are probably checking if (someKey) rather than checking if someKey is present. [20:15:08] Yes, particularly since empty-string is false in most languages. [20:15:52] anomie: OK. Meanwhile in jsonformat=2, "someKey": true is returned for true, and either "somekey": false or absent for false. Specifying META_BC_BOOLS has no effect. [20:15:56] And accessing an unset property is usually a warning (but still false) where it isn't an error. [20:17:30] spagewmf: Correct. The absent versus false depends on the code: sometimes it's difficult to determine if something is false rather than just not-seen-yet when using continuation, and sometimes it's usually false and not worth the extra bytes to reiterate that over and over. [20:18:52] anomie: it seems like clients of API modules using formatversion=2 should always handle both absence and false. Is there a convention for API modules to indicate "I sometimes omit someKey in results when false" vs. "I always return false" ? [20:20:02] No, no convention. But each boolean property should be one or the other: always explicitly false or always unset, not sometimes explicitly false and sometimes unset-meaning-false. [20:22:44] anomie: OK, the fog lifts. This seems too much info to add to https://www.mediawiki.org/w/api.php?action=help#main/datatypes , so I'll add an entire section to https://www.mediawiki.org/wiki/API:Data_formats with reference to the JSON format 2 page. [20:23:28] spagewmf: https://www.mediawiki.org/w/api.php?action=help#main/datatypes is about input, not output, so has nothing to do with this. [20:24:16] how do I use something like this? http://www.mediawiki.org/wiki/Template:Warning [20:24:44] dgarstang: elaborate on "use" [20:24:52] Vulpix: implement [20:25:05] !templates | dgarstang [20:25:05] dgarstang: For more information about templates, see . See also: !templateproblems , !wptemplates [20:25:39] Vulpix: Yes I know. Every reference to those talks about templates, but none have the template source that I can find [20:25:52] In particular, the API *should* always output timestamps in ISO format, yyyy-mm-ddThh:ii:ssZ. And usually if not always "infinite" for never-expires. [20:26:38] dgarstang: just edit the template. There's the code [20:26:57] anomie: ah, I was just going to ask whether Data types was requests or responses or both. The text needs to say "API request parameter types need...", I'll make a patch. So the explanation of boolean request parameters doesn't change if you're using formatversion=2? [20:27:28] spagewmf: Correct. formatversion affects output only. [20:28:30] anomie great, I really appreciate it, especially if I'm asking outside your usual office hours [20:29:03] spagewmf: Not quite, my usual office hours continue for another half hour yet. Although I might disappear early today to run an errand before 5pm. [21:45:17] Vulpix: if I look at the soure of http://www.mediawiki.org/wiki/Template:Warning, there's a lot more there than just the template itself [21:57:23] Hi I seem to be having an issue with the citation templates. [21:57:52] #wikipedia might be better [21:58:54] ori: oh, but I'm not using Wikipedia. I'm running my own MediaWiki wiki. [21:59:49] For example if I'm using the {{cite book}} template, instead of getting the reference informatoin in the references section, I'm getting the link Template:Cite book [22:00:27] Cite extension was installed correctly (I checked Special:Version) [22:00:43] I'm enclosing the template in tags [22:01:58] Could you suggest what could be wrong? [22:13:55] ori: OK, I think my dense head finally gets it; citation templates are a feature of Wikipedia, not Mediawiki [22:14:33] yrocs: you're not dense -- I actually didn't see your follow-ups and I have to confess some amount of confusion about this myself [22:15:07] but what you say is correct -- the people who maintain citation templates are generally distinct from the people who maintain and develop mediawiki itself [22:15:25] and they are more likely to identify as wikipedians than as mediawiki developers. hence the suggestion to try #wikipedia. [22:15:39] maybe Fiona or Krenair would know [22:16:15] yeah, we don't provide those citation templates out of the box [22:16:35] ori: I did just come across the extension WikiCitation that seems to basically give the functionality of citation templates [22:16:40] on wikipedia they rely on extensions like scribunto which we don't provide in vanilla mediawiki [22:16:40] https://www.mediawiki.org/wiki/Extension:WikiCitation [22:17:01] Extension:Cite allows you to use and , but does not provide any templates [22:17:52] Krenair: Is it possible for a novice to add Wikipedia citation template functionality to MediaWiki? [22:18:35] IIRC once I installed Extension:Scribunto I got it working by fiddling around with imports of the english wikipedia templates [22:19:54] OK, maybe something I'll try in my spare time. I'll probably give Extension:WikiCitation a try first though. [22:38:09] How do I implement this? http://www.mediawiki.org/wiki/Template:Warning [22:40:13] hey looks like the mw-config is borked in the REL1_25 branch [22:40:48] is it safe to install REL1_24 and then checkout REL1_25? [22:42:36] I just don't folllow http://www.mediawiki.org/wiki/Template:Warning [22:43:17] i mean... where is the template code? [22:45:53] https://www.mediawiki.org/wiki/Template:Warning?action=edit [22:48:38] !libraries [22:48:38] Starting with 1.25, MediaWiki core's git repository no longer contains certain external libraries, see https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries for how to get them [22:48:44] heh, I already did that [22:48:46] !psr [22:48:46] There is no such key, you probably want to try: !ternary, [22:50:14] !psr is In 1.25, MediaWiki starts using the PSR-3 log interfaces. If you're getting errors about classes or interfaces not existing, you need to fetch external libraries. See !libraries [22:50:14] Key was added [22:50:17] !psr [22:50:17] In 1.25, MediaWiki starts using the PSR-3 log interfaces. If you're getting errors about classes or interfaces not existing, you need to fetch external libraries. See !libraries [22:53:27] Reedy: Sorry, I still don't see it [22:53:42] Reedy: I see the code that CALLS the template, but not the template implementation [22:59:25] dgarstang: That's the template code. You'll need the parser functions extension to use that code (for the #if function) and then it should work. It's mostly HTML - it's not anywhere near as complicated as the equivelant template on english wikipedia [23:02:12] Lcawte: I don't even see the word 'if' in the code for that page [23:03:17] dgarstang: Are you looking at the link Reedy provided? [23:09:42] Lcawte: I a now... [23:10:35] what about the code for other templates tho? [23:10:44] other warning templates rather [23:10:58] here's another http://www.hobbsknowledgebase.co.uk/wiki/Using_MediaWiki_Templates_(like_%22NOTE:%22_and_%22WARNING:%22) with source I can't find [23:11:26] and this one... http://www.mediawiki.org/wiki/Template:Note [23:12:10] dgarstang: You need to click the 'View source' / 'Edit' tab, you'll get the contents of any page :) http://www.hobbsknowledgebase.co.uk/w/index.php?title=Template:Note&action=edit [23:12:37] oh.. edit source != edit [23:14:03] hmmm note doesn't work tho