[01:51:52] Interested in reasonably priced GLOBAL IRC ADVERTISING? Contact me on twitter https://twitter.com/nenolod or linkedin https://www.linkedin.com/in/nenolod [01:52:24] wow sounds like an amazing deal [01:52:39] I should buy lots of advertising so they can be immediately kicked from freenode [07:01:38] hello, can i ask for some feature request :) [07:02:24] in this case i want to see original language https://www.mediawiki.org/w/index.php?title=Help:CirrusSearch/te&curid=800625&diff=2839391&oldid=2834154 [07:04:19] cronolio: what do you mean by "original language"? [07:07:32] in this case english [07:14:10] like here https://www.mediawiki.org/w/index.php?title=Translations%3AHelp%3ACirrusSearch%2F1%2Fte&type=revision&diff=2839390&oldid=2834069 it is also shown english version [07:15:41] hey folks. i've been trying to use AuthManager to implement a Google login mechanism for the past few days but with little success. I'm able to register a new user but apparently there's no real option of logging a user in. [07:15:47] am i missing something? [07:23:13] tkore: have you looked at the GoogleLogin extension? https://www.mediawiki.org/wiki/Extension:GoogleLogin [07:24:05] i have, but the login mechanism is still unclear to me [07:30:33] cronolio: scroll down to where it says "Message definition (Help:CirrusSearch)", copy and paste the HelpCirrusSearch into the searchbox and hit enter [07:37:22] p858snake: scrolling down is only show me full article. to understand if this was right edit or not would be nice to see english text also [07:55:44] you probably need to be in the translation system for that [07:55:54] which I have no idea how to use [08:16:38] is there any way for a skin to get the toc directly? doesn't seem like it's exposed anywhere [10:33:58] legoktm, oh, got it. the creation & login flow is much different than anything i've ever seen :) [18:15:58] raaaaawr! [18:16:03] hello all you happy people [18:18:00] so I'm making my first foray into making a Mediawiki extension [18:21:51] and I have very little idea of what I'm doing [18:22:24] hello [18:23:14] Volund: hello :) let us know if you have quesitons [18:23:17] questions [18:23:24] https://en.wikipedia.org/wiki/Space_Shuttle_thermal_protection_system [18:23:59] I dont have a question but this is mislabeled and didnt know who to tell. You have the barrier hypertext or whatever its called going to atmospheric entry too [18:24:08] in the first sentence [18:24:13] Just wanted to tell someone [18:24:21] IDK if this is the right plave [18:25:53] Well actually I do have a question. So I have this php code over yonder... https://github.com/volundmush/mushcode/blob/master/scenesys/scene/libraries/ansi.php [18:26:56] These functions are meant to convert raw text stored in a retrieved SQL field into HTML-escaped text, and also to replace their own native color encoding with HTML with css identifiers for equivalent colors [18:27:00] yo dawg, not about to open a random php file haha sorry [18:27:10] it's on github's viewer [18:27:31] here though, alternate [18:27:36] ah, just started using github like 3 days ago [18:27:45] so not familiar haha [18:27:50] https://i.imgur.com/cbDP3TY.png [18:28:14] mickey: you should ask in #wikipedia-en [18:28:33] whats yo question [18:28:51] ask or tell them about the little error? [18:28:52] about the space shuttle article [18:28:58] yeah, tell them :) [18:29:01] I dont wanna be wasteing your time [18:29:14] Thanks guys [18:29:19] Volund: so what was your question? [18:29:20] idly: a .php file is generally safe to open in your browser, since the browser does not execute PHP code - the server does. A .php extension is no less safe than opening any random website. it's client script languages that you need to watch out for. [18:29:21] I wanna know the question though [18:29:26] SO as I was trying to say: [18:29:31] AHHH [18:29:34] Thats good to know [18:29:45] My uncle just gave me ajob learning web dev [18:29:51] so I am super unfamiliar [18:30:08] S'okay! [18:30:22] The question doe [18:30:33] Iwanna hear it [18:30:40] lol [18:30:52] and thanks for the knowledge bomb [18:31:00] Always like that stuff [18:33:11] Alright actually gotta go, thanks, have a great day [18:33:37] so anyways right now I have this database full of text that uses a special encoding for color. It's just raw, otherwise unescaped plain UTF8 text. I want to create a page that will get a database ID from the URL (UrlGetParameters extension) retrieve this text from the database (ExternalData extension), decode said text and re-encode it as HTML with the colors converted to css-marked tags. Finally, the CSS extension will [18:33:37] make the page display nicely. [18:34:14] so I need to make the extension that will do said conversion. I already have the PHP code, but it's not in the form of a Mediawiki extension. [18:34:32] where should I begin? How difficult should this be? [18:37:02] (I'm currently examining the CSS extension since its functionality is similar) [18:37:17] Volund: have you read through https://www.mediawiki.org/wiki/Manual:Developing_extensions ? [18:41:16] yeah I've been reading it. I believe it'd be a Wiki markup extension obviously, and I don't need any kind of localization... I guess the easiest way to do this would be to create a parser function? [18:43:23] what would you suggest? [18:45:12] Volund: I'm still not sure I understand what you're trying to do. [18:45:42] > These functions are meant to convert raw text stored in a retrieved SQL field into HTML-escaped text, and also to replace their own native color encoding with HTML with css identifiers for equivalent colors [18:45:58] So [18:46:18] Like what's the goal? [18:47:31] You can probably do https://github.com/volundmush/mushcode/blob/master/scenesys/scene/libraries/ansi.php in Scribunto/Lua. [18:49:06] https://www.unitedheroesmush.com/scene/ this site here is for viewing roleplay logs, where the roleplay is taking place on an old telnet game server that has some very funny encoding standards for text coloration. When it saves the roleplay actions to SQl, it includes that funny markup. I have PHP code that converts said text to HTML-escaped text and re-encodes the colors for display in a browser. RIGHT NOW, this posts to the [18:49:06] wiki by relaying all of that stuff to a Semantic Mediawiki form. But I want to alter it so that there's no forms, no creating a page for each roleplay event. I just want a single page that can query SQL and pull data directly. Which means I need to integrate the color converter into mediawiki somehow. [18:49:37] Scibunto? [18:49:41] Scribunto* [18:49:43] !scribunto [18:49:43] 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. [18:50:00] If you know ParserFunctions, Scribunto/Lua is the successor. [18:50:14] I keep meaning to install that but I am far too lazy. [18:50:19] You could also do this in JavaScript, maybe. [18:50:54] You could also intercept the writing to SQL and sanitize one time there? [18:51:31] I want to do it that way, definitely want to do it that way, but I'd have to do all kinds of hacks to make that work [18:51:53] the game server is written in spaghetti C [18:52:05] so... not touchin' that [18:52:16] anyway [18:54:08] if my extension makes mediawiki crash, where can I find error log? [18:54:47] !debug [18:54:47] For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms [19:01:29] https://exalted.mushhaven.com/index.php?title=Main_Page It seems to complain about localization information... but I'd just as soon yoink that out, I am only trying to add a single function to the parser, bwargh. [19:11:09] * Volund just grabs the Example extension and starts from there [19:13:35] OKAY got my extension.json loading, showing up in Special:Version. Onwards adding functionality [19:21:25] i'm not sure i understand how you want the pieces to go together, but if you want a reference for a simple extension that manipulates content, you might look at the poem extension included with mw [19:21:31] it's pretty easy to follow [19:25:00] yeah I'm a little perplexed here... [19:27:19] https://dpaste.de/6oDw [19:29:02] mmmm [19:29:05] lessee if I can mimic this [19:29:12] the poem approach I mean [19:30:03] that seems right at first glance [19:30:06] for a function [19:30:59] except the more modern way to do messages is with the i18n json files [19:31:09] but that doesn't really matter obv [19:31:21] can you link me to a simple but very modern extension? [19:32:40] like i said, i think poem's a good reference [19:33:21] it's a tag extension rather than a function one, but the main code differences there are just some method signatures [19:33:26] Poem doesn't create a function though. I am looking at it over here and its renderPoem function uses a different call style [19:33:30] yeah [19:34:15] * Volund reads Parser documentation [19:34:27] does your code not work [19:36:12] alright so setFunctionHook wants a callable... I'm not sure if that uses $this or something else. argh [19:37:39] the way you have it seems fine [19:38:53] how do I strip out localization? I want minimum complexity. do I need this .i18n.php file? [19:39:06] (just want to make this LOAD, then I can add functionality) [19:40:44] oh i'm not sure you can even use the json method for the magic-words stuff, i probably was wrong before [19:40:49] yes, as far as i know you need that [19:41:05] it tells it what the name of your function is [19:43:39] all I'm getting is an error: "[b5b0441433e84275bee62599] 2018-07-29 19:42:06: Fatal exception of type MWException" even with error display turned on. I'm sure it's because I have localization stuff wrong [19:45:41] it should probably have the full message in your web-server log [19:45:52] but you can also set $wgShowExceptionDetails = true in your settings file [19:49:55] FINALLY useful data [19:50:20] Invalid callback MUSH::onParserFirstCallInit in hooks for ParserFirstCallInit [19:51:06] invalid callback... confusing, because there seems to be like 5 different ways to register a Parser.setFunctionHook() [19:51:43] https://doc.wikimedia.org/mediawiki-core/master/php/classParser.html#a86720298ad0d03d430b1e35fd684d696 [19:52:20] can you pastebin your code? [19:52:39] https://dpaste.de/dY98 [19:52:53] I'm confused because this is the format that the CSS extension used [19:53:05] can I see your extension.json? [19:53:27] https://dpaste.de/GUzN [19:54:07] in extension.json you have a typo. change "AutoLoadClasses" to "AutoloadClasses" [19:54:12] I think ExtensionMessagesFiles is screwing things up but I remove that, it doesn't help--... [19:54:26] * Volund beats head into wall [19:54:47] IT LOADED [19:54:50] HOORAAAAAAAAAY [19:54:53] THANK YOU [19:54:53] :))) [19:55:04] and it's showing in the parser function hooks [19:55:22] so now I just need to do {{#mushparse | MY TEXT HERE!}} and it will call that function right? [19:55:31] err [19:55:33] #mushparse: [19:55:34] but yeah [19:55:46] yep [19:55:54] *cracks knuckles* [19:56:55] THANK YOU that was driving me up a bloody wall [19:57:28] I have a heck of a project ahead of me now though [19:58:51] my next step is to incorporate: [19:59:03] https://github.com/volundmush/mushcode/blob/master/scenesys/scene/libraries/ansi.php [20:02:58] does that work? it doesn't seem like it will [20:03:11] why doesn't it seem like it will work? [20:04:47] oh i misread, i thought you were passing the content to ansispan() and then you were escaping all of the spaces in the result [20:08:18] https://www.unitedheroesmush.com/scene/scene.php?id=5048 [20:08:37] the pose column, it's going through those two functions [20:15:32] woooooo. it appears to be working! [20:15:46] {{#mushparse: This is a test!}} - returned exactly what I typed. [20:17:30] now let's see what I can do... :D [20:26:16] [6228f082112fb8bc387be54b] 2018-07-29 20:26:00: Fatal exception of type "Wikimedia\Rdbms\DBQueryError" when trying to use ExternalData... :| hm [20:32:00] there we go, SQL errors enabled.. [20:40:14] i have not chatted in irc for years and years [20:40:36] looking for help using a movie credits feature on my wiki site [20:42:12] help how? [20:42:20] yeah if you can [20:42:31] i can link you to the one i want to use [20:43:50] oh i misread you [20:44:16] how: the feature page lacks enough how-to info for me to get it working [20:44:30] Which feature? [20:44:40] so maybe if one of you pros checked it out, you'd say oh that's easy [20:44:48] should i post the link for it here? [20:44:58] that seems best [20:44:58] It'd be helpful to have some context [20:45:04] https://www.mediawiki.org/wiki/Snippets/Movie_Credits [20:45:06] that one [20:45:31] o_0 [20:45:36] I've... Never seen that in my life [20:46:17] twould be so cool to add that feature to the wiki i edit [20:46:26] Ugh. It's spam outward links [20:46:53] lol so like a marquee tag [20:47:11] yeah but scrolls vertically like the end of a movie [20:48:12] "spam outward links" sounds bad to me. maybe there is a better one [20:48:50] I was meaning these [20:48:50] https://www.mediawiki.org/w/index.php?title=Snippets%2FMovie_Credits&type=revision&diff=2839663&oldid=2436893 [20:51:44] it doesn't seem like a very general-purpose solution [20:51:55] the animation duration would be dependent on the amount of text [20:52:58] yes or space between lines of text [20:55:22] i don't know where to paste all that code [20:56:02] the css would usually go in your MediaWiki:Common.css [20:58:10] It kinda looks like it's setup to be usedin a template [20:58:15] i don't know if i have ever accessed that (he says with some embarrasment) [21:00:03] it's just a page on the wiki [21:00:44] oh. found it. it's empty [21:01:06] if it could be made into a template that adjusts the animation duration based on line count or something that seems like it'd be better than the way it is [21:01:09] so i just paste that code there? how do i keep that code seperate from other CSS functions? [21:01:29] yes a template appeals to me [21:02:08] on wikipedia they use an extension called template styles that allows you to tie style sheets to individual templates instead of putting them all in the main one [21:02:17] which can be convenient [21:03:55] if you want, i can link you to the wiki i edit (in a PM i guess?) so you can see more precisely where this is going [21:05:28] the problem you'll have with it is, like i said, it's not a general-purpose thing [21:05:35] (if i can remember how to PM in irc lol) [21:05:43] they want you to put in fixed numbers for the animations, and that will only work in very specific cases [21:06:09] it will likely only be used on 1 page [21:07:08] if that's the case then you can just paste the css on that page into Common.css and replace the {{{placeholder}}} bits [21:08:01] {{{height of seal}}} would be the height of the scroll box, {{{animation seconds}}} depends on the number of lines (probably in the dozens of seconds), {{{How often}}} is probably infinite [21:08:49] {{{Negative Top}}} is also dependent on the number of lines [21:09:17] if you go to the original link they put in the code, http://codepen.io/reejosamuel/pen/ALjcr [21:09:24] you can see what it looks like and what some of the values are there [21:11:34] trying it... [21:23:33] odd, {{#switch: {{{sceneStatus}}} | 0 = Active | 1 = Paused | 2 = Scheduled | 3 = Finished | {{{sceneStatus}}}}} is not matching... [21:25:30] if I plug in the number directly it works, but not {{{sceneStatus}}} despite the fact tha the default case DOES return {{{sceneStatus}}}... wtf? [21:26:15] https://exalted.mushhaven.com/index.php?title=Roleplay_Logs [21:29:25] i don't think that gets expanded yet [21:30:47] hi, anyone familiar with google analytics extension? ive created ga account and seems that i can see the pages that being watched at ga web, there is a way to connect that to the user that watch ? (or ip in case of none registered)? [21:30:59] Volund: try {{#external_value:sceneStatus}} instead [21:39:09] ohhhhh [21:41:10] works now! [21:43:52] okdana thank you for the help! it's working. i have to figure out a bunch of details to tune it [21:47:58] cool [21:49:03] it's great to come here, not knowing anyone, ask a question and get help that fast [21:49:42] ugh, now I'm having weird things happen with ExternalData [21:49:55] it's generating this query: [21:49:56] Query: SELECT character_id,character_name,action_id,action_text FROM `volv_action` WHERE scene_id=[[:Template:If]] AND action_is_deleted=0 ORDER BY action_date_created ASC [21:50:15] the where clause is [21:50:15] |where=scene_id={{if#:{{#urlget:scene_id}}|{{#urlget:scene_id}}|0}} AND action_is_deleted=0 [21:50:30] what the heck is up with that Template thing? [21:51:07] should be #if: presumably [21:51:17] ... [21:51:19] I'm a yutz [21:55:13] okay so the next problem (I'm running out of them, don't you worry) [21:55:18] https://exalted.mushhaven.com/index.php?title=Roleplay_Logs [21:55:34] red links! this is probably because I'm embedding &scene_id=3 and so on [21:56:50] do I have any options besides making a full external link? [22:01:04] ah [22:02:26] AHA [22:03:17] Collaborative extension development! <3 [22:03:49] it's working IT'S WORKING [22:04:08] [{{fullurl:Log_Page|scene_id={{{sceneId}}}}} {{{sceneId}}}] [22:10:34] i wish mw's parser would detect links to the same domain and not mark them as external [22:11:01] you can work around it in css, but it doesn't feel optimal [22:11:38] Same. [22:11:46] It's kinda crazy that it can't. [22:11:59] s/can't/doesn't/ [22:12:12] it doesn't seem like it'd be a hard thing to add, maybe i'll look at it [22:12:31] maybe that's hubris though, i'm sure someone's thought of that before [22:15:26] https://phabricator.wikimedia.org/T13477 [22:15:53] I marked it easy in 2016. ;-) [22:17:05] that goes back a while [22:22:39] Yes. [22:35:57] i guess the really lazy way would be to just drop the external class in Linker::makeExternalLink() if the url matches... idk, $wgServer? [22:37:28] hm [22:37:35] it should be pretty trivial [22:37:42] And yet! [22:37:51] okdana: yeah, that's how I would do it [22:37:55] there are a few considerations, like for example should it also drop rel="nofollow" and so on [22:38:14] okdana: The other bug that bothers me is external links not working when edit summaries are rendered. [22:38:27] But that's a separate issue. [22:38:35] If anyone's in a bug-fixing mood, tho. [22:39:01] * legoktm hands Ursula some ant spray [22:39:51] Thx bb. [22:42:04] you would probably want to account for different protocols, so that like [//my.wiki/foo ...] works [22:42:20] and then you would probably also want to account for url credentials, because that's a security risk [23:45:46] https://ptpb.pw/Fh5X.Ond9rfxg/diff idk, that seems to work for the basic stuff at least [23:45:52] doesn't feel nice though