[00:34:30] Hi everyone. New to MediaWiki here. I want to make it so that if somone writes [00:36:10] {{myfunction | term1= string1 | term2 = string2 | etc. }} that I get the strings ordered and hyperlinked in a specific way. What's the best way to do that? [05:16:29] Hi all. A question about wikipedia (if anyone knows the answer): I am looking at wikipedia traffic stats hosted on amazon web services. The data contains lines explained as "project article_name visits bytes_transfered" per line. [05:17:00] one of those lines is "en.b A-level_Mathematics/Edexcel/Core_2 1 7489" - which project is en.b? [05:17:37] This url does not work: http://en.b.wikipedia.org/wiki/A-level_Mathematics/Edexcel/Core_2 [05:18:12] sorry, I thoguht I was in #wikipedia :( [05:20:48] Hi, I was wondering if somebody could possibly help me find a hook that would allow me to access the text within the edit box of an article? I'd like there to be a "hidden" template, Eg it's removed while editing but re inserted when saving. [05:24:33] You can add ?action=raw to the URL [05:24:59] replace ? with & if it's not the first parameter [05:25:11] Aleksandrina: Was that directed towards me? [05:26:24] yeah [05:27:03] it would get the source wiki text [05:27:28] you could do something with that to present it into a window [05:27:59] Maybe do a web request with JavaScript for the text, store it into a variable, and display it in a popup window [10:19:57] access bec/part [11:34:51] Hi ! [11:37:17] I've got a small question about mediawiki and the extensions it uses [11:37:30] Am I at the right place ? [11:41:50] Anyone ? :( [11:42:15] best to just ask the question [11:42:23] Sure, I'll go ahead then [11:42:38] I would try to re-create the same table as the one you can see here: http://www.mediawiki.org/wiki/Compatibility#PHP [11:42:42] (on the right) [11:43:07] The thing is, I'm pretty sure it uses extensions to achieve this but I don't know which one [11:43:38] I installed TemplateData on my server but I'm sure I'm missing something [11:44:22] So the question is: Is there any way to know which extension is used to generate this ? [11:44:47] (I checked the Special:version of mediawiki but there is a lot of extensions in there) [12:54:47] hi! [12:58:43] hi. is it possible to output the content of mediawiki pages formatted as plain text, i.e. with all hyperlinks, templates, formatting tags stripped out? [13:02:25] You could try lynx. [13:04:24] Greetings, I need small help in MediaWiki formatting, am I in the right IRC ? :) [13:07:26] Hi antranigv. Yes. [13:08:47] I've just upgraded from 1.18 to 1.19.2, which seems to have gone just fine. I upgraded the ldap auth extension as well, which however seems to have broken somehow. [13:08:51] Carmela: I want to put some space at the beginning of a text, it is a book [13:09:19] gleki: you can use this API query https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&prop=extracts&format=json&exlimit=10&explaintext=&exsectionformat=plain&titles=India [13:09:39] I've turned on the debug log, and what I get that isn't correct is this: "PHP's LDAP connect method returned null, this likely implies a misconfiguration of the plugin." [13:09:50] anyone have a likely clue as to what this might mean? [13:10:13] gleki: it's not perfect but is the closest you'd get I think [13:11:47] YuviPanda: thanks [13:11:59] gleki: yw [13:18:13] Hi all [13:18:24] Hi Sid3way [13:18:30] I got a question (an easy one) for you :) [13:18:39] My favourite kind! [13:18:45] he he [13:18:47] I would try to re-create the same table as the one you can see here: http://www.mediawiki.org/wiki/Compatibility#PHP (on the right) [13:19:07] The thing is, I'm pretty sure it uses extensions to achieve this but I don't know which one [13:19:08] Yup [13:19:33] I would like to know if there is a way to know which ones [13:19:50] I'm looking [13:19:55] I installed TemplateData but I think there must be another [13:20:06] https://www.mediawiki.org/wiki/Template:Version_history [13:20:13] I think you just need ParserFunctions [13:20:35] ParserFunctions ? [13:20:41] Ok, I'll install it right away [13:20:42] !e ParserFunctions | Sid3way [13:20:42] Sid3way: https://www.mediawiki.org/wiki/Extension:ParserFunctions_ [13:20:48] Damn it wm-bot [13:20:50] !e ParserFunctions| Sid3way [13:20:50] Sid3way: https://www.mediawiki.org/wiki/Extension:ParserFunctions [13:21:04] Thank you very much ! [13:21:08] No problem [13:21:16] I'll let you know if it worked ! :) [13:21:33] (I'll restart my irc client, it's a bit laggy, be right back) [13:22:13] I'm back ! [13:22:15] :) [13:35:40] Sorry to bother you, but I'm still having an issue [13:36:03] I'm pretty sure that I'm doing something wrong, but I can't really figure what [13:36:20] I have this as my page content [13:36:22] 1.2 [13:36:38] But instead of being parsed and be displayed a a nice tab [13:36:56] You probably need CSS from mw.org [13:37:00] It goes out like this: 1.2 [13:37:01] common.css probably [13:37:09] Oh, seems logical [13:37:33] But it should work if I remove the style, right ? [13:37:37] Wait, your page content is that, or the template content is? [13:37:48] Empty style isn't an issue [13:38:09] My page is [13:38:16] I'm editing this [13:38:16] Editing Template:Version history/header row [13:38:27] (on my wiki, no worries) [13:38:56] And in the text box, I entered the tab you saw above [13:39:22] OK yes, sounds fine [13:39:56] Hmmmm [13:42:59] I made a screenshot of it [13:43:04] here: http://s28.postimg.org/3ovon8qnx/wiki.png [13:43:14] Does it look ok to you ? [13:45:45] Sure [13:45:51] You could have left the style in [13:46:13] Yeah but I'm trying to pinpoint the issue for now [13:46:27] Oh, wait. [13:46:30] so since it's not mandatory I removed it just in case [13:46:38] ...huh, weird [13:46:46] Sid3way: Do you have HTML tidy turned on? [13:47:36] I'll check but I didn't turned it on [13:47:53] The default value should be OK [13:48:42] Is it on the localsetting.php ? [13:49:03] yeah, but forget about it, it's not important probably [13:49:11] Ok [13:49:26] what are url parameters to redirect search results to the first result page? [13:49:50] Oh ! [13:49:57] marktraceur: It works ! [13:50:03] It was indeed $wgUseTidy [13:50:25] I added it to my localsetting and set it to true [13:50:32] and it's now working like a charm [13:50:41] Thank you so much for your help [13:51:39] Sid3way: Cool beans, didn't think that would work, glad to help [13:53:21] I owe you a beer [13:53:23] :) [14:09:30] a rephrasement. What would be the query to show the page that would be the first in the list of search results without displaying the search page? [14:12:28] gleki: You want an API query? [14:13:05] marktraceur: yes [14:13:36] if this doesnt work i'd probably have to parse search results page to run a new query based on search suggestions [14:13:41] gleki: https://en.wikipedia.org/w/api.php?action=opensearch&search=Test&format=json [14:14:27] well, okay. [14:17:42] gleki: :) [14:26:24] gleki: Sorry, even better: https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Test&format=json [14:27:27] gleki: Help here https://en.wikipedia.org/w/api.php?action=help&modules=query+search [14:49:42] exit [15:02:17] The mediawiki co-op meeting is happening now for those interested [15:02:45] https://plus.google.com/events/cf7ajegl3357ukcc946vnm1j9b8 [15:03:37] Whoa, what? Co-op? [15:03:56] marktraceur: The release manager's user group thingy [15:04:10] Ah. [15:04:20] * marktraceur believes in all of you [15:04:57] Actually I think its called cooperation now, but I always misread that as corporation [15:05:13] * bawolff not really a member, just observing [15:43:58] @trust [15:44:04] !trust [15:44:07] Huh. [15:44:09] I trust: petan\|w!.*@wikimedia/Petrb (2admin), .*@wikimedia/.* (2trusted), .*@wikipedia/.* (2trusted), .*@mediawiki/..* (2trusted), .*@wikipedia/MZMcBride (2admin), .*@wikimedia/Krinkle (2admin), .*@fsf/.* (2trusted), .*@unaffiliated/valhallasw (2trusted), .*@wikinews/bawolff (2admin), .*@unaffiliated/jeroendedauw (2trusted), .*@MediaWiki/.* (2trusted), .*@unaffiliated/ciencia-al-poder (2trusted), [15:44:09] @trusted [15:44:11] There we go [15:44:17] Krenair: ^^ [15:44:36] Just realized I pinged everyone. [15:44:41] :D [15:45:43] why is it mediawiki/..* [15:47:18] Same as mediawiki/.+ I guess [15:47:38] why is it there twice? [15:47:59] bawolff: Case sensitive, I guess [15:53:56] Yeah, ashley has it with proper caps for some reason [15:54:22] proper caps FTW ;-) [16:02:46] \o/ https://translatewiki.net/w/i.php?title=Translating%3AMediaWiki%2FNew_languages&diff=5818688&oldid=5638419 [16:04:47] Hi! I was here ysterday with a question about hooks, and I return once more for the very same reason. I'm looking for a hook that would allow me to access the actual text within the text box when editing pages -- One when viewing page, and one when saving the page. Does such a thing exist? [16:09:00] tyne: I assume you checked Manual:Hooks and the categories? [16:09:29] Nemo_bis: Yes, I have. I can't seem to find anything for that specifficly. [16:11:36] tyne: That's possible, although doing that sounds sketchy [16:11:43] tyne: what do you mean "when saving", before or after the pre-save transforms (search this phrase if you don't know what they are) [16:11:47] tyne: See EditFormInitialText hook [16:12:21] Specifficly, I need a hook that would allow me to: a) Access the text of of the edit box while editing, and b) allow to access the text right before it's saved. [16:12:55] *While* editing I doubt, PHP has no knowledge of that [16:13:07] tyne: and EditFilterMergedContent (for between hitting save, and actual saving) [16:13:52] there's also various hooks for after save [16:14:01] Nema_bis: As in, while 'action=edit' [16:15:22] What does while action=edit mean? [16:15:46] bawolff: Er, I mean 'Edit Mode'. [16:15:55] That's still not clear [16:16:13] Editing involves several steps [16:16:58] bawolff: I udnerstand that, but when I say "while editing", I mean that you're on a page where you can either change the articles text. [16:17:04] *understand [16:17:36] While PHP only executes on the server side, it does not execute while the user is typing things [16:18:14] PHP hooks can either happen before the page gets sent to the user, or after the user pressed the save button. It can't do anything in the middle [16:18:15] bawolff: No, I mean while you're on the edit page for whatever article. [16:19:13] If you want to do something at the same time as the user is interacting with the textbox, you'd need to use javascript [16:20:32] 'before the page gets sent to the user' <- What I need. There's a template within each article. I need to "intercept" the article's text and remove it before it gets sent to the user. Then, when the article gets sent back, I need to "intercept it" again and add the template back. [16:21:15] ok, you can use EditFormInitialText, and EditFilterMergedContent hooks to do that [16:21:30] However, you should really consider if you want the template in the actual page text [16:21:34] morning/afternoon everyone! Ulfr's stupid question of the day. How might one redirect from one special page to another after a form has been submitted? [16:22:03] Or if you want the template to be included in the skin, or output by some other hook that doesn't rely on the contents of the page text [16:22:15] Also be careful with mediawiki namespace pages if you do magic template hiding [16:23:19] Ulfr_: $this->getOutput()->redirect( $urlToRedirectTo ); [16:23:43] Assuming you're redirecting after processing whatever was submitted in the form [16:24:09] bawolff: I'm assuming I can use a new RequestContext if I'm no longer in a $this context? [16:24:49] Umm, I don't think you can [16:25:11] You'd need to use a RequestContext that has an OutputPage object which is connected to $wgOut [16:25:58] bawolff: Well $this stopped working on me when I tried calling another function in the same class, but I'm unsure how that's done other than SpecialWhatever::foobar() [16:26:42] Ulfr_: You can call the other function with $this->foobar(); [16:27:04] assuming the current function isn't static [16:27:30] bawolff: It's complicated - I know there's projects like SMW, but our user base needs somthing "simple" to work with. More or less, there's a form included with each article in which the user can enter a character's "attributes", 'Gender', 'Home Land', ect from a pre-defined list of values. These values are then sent to the database, and a template it generated that should be inserted just before the page itself is sent. Like a Sem [16:27:42] bawolff: Mine isn't, but HTML form is :( [16:28:50] tyne: Sorry, only saw that last message you posted, but wouldn't SMW with a dash of SemanticForms do the trick? [16:28:50] bah HtmlForm [16:29:10] I don't want to talk about it. I need fancy form stuff and cannot be arsed to actually encapsulate a bunch of html [16:30:12] * bawolff has a tendency to get confused whenever I start working with HTMLForm [16:30:34] Its probably a good thing you're using it. Using it is better than manually generated html [16:30:53] It was root canal versus gums scraped with cheese grater [16:31:16] Ulfr_: Our users decided that SMW was too complicated to use, so we've begun to build our own system. It originally began as simple templates using magic words that would take the enter value and put in the datatbase, BUT we need a way to "control" what these values are. [16:31:59] tyne: Trust me. I know that holy smokes this SMW stuff is too complicated, but that sounds almost exactly like y'all need some dropdowns in a semantic form [16:32:23] there was supposed to be a 'feel' in there before that comma, but it got lost [16:32:58] The point of the forms isn't to make things easier, it's to save users from themselves [16:33:59] Ulfr_: But the thing is that it's possible to replicate the form aspect and dodge the complications of SMW. It will also allow us to implement our own search engine. [16:34:52] Ulfr_: So to clarify, in your code, you're specifying a callback to the HTMLForm by giving it the string: SpecialPageName::foobar() ? [16:35:06] bawolff: That's the only way I'm able to call another function in the class, yes [16:35:10] In that case, try specifying the callback by using array( $this, 'foobar' ) [16:35:38] tyne: Good luck :) [16:36:01] bawolff: Can I do that with params? [16:36:15] also, since when was this a thing? [16:36:32] * bawolff has to look up HTMLForm to see what it actually does [16:36:51] Ulfr_: Thank-you. The issue about actually inserting the template into the page's source before it is saved still exists, however. [16:37:29] Ulfr_: The array( object, methodname ) syntax actually predates the Class::method syntax for callbacks in php [16:37:39] bawolff: Shenanigans. [16:38:02] tyne: Wasn't here for that part of the discussion, sincerily wish you the best of luck though! [16:39:20] bawolff: I see where the $this context is broken. $htmlForm->setSubmitCallback( array( 'SpecialClaimTime', 'trySubmit' ) ); makes everything suck :( [16:40:06] array( 'SpecialClaimTime', 'trySubmit' ) would still call trySubmit statically [16:40:31] array( $referenceToSpecialPageObject, 'trySubmit' ) would call it non-statically, and should allow $this to work [16:41:16] I'll give it a whirl. How might I sneak a paramter in? pardon my ignorance :( [16:41:41] I'm not sure what you mean. How were you sneaking a parameter in before? [16:42:00] calling it like a regular human being [16:42:02] foobar($sv) [16:43:00] I don't think you can do that directly from setSubmitCallback(); I think you'd have to have a helper method which called foobar with the extra parameter [16:44:00] bawolff: Disregard what I was saying. My feeble brain finally figured out what you were trying to say [16:49:06] bawolff: You're the man. Got it, thanks! [16:49:14] yay :) [16:49:17] * Ulfr_ snickers at the intern who is now in perma-pageforward hell [16:53:22] * Ulfr_ sighs as he realizes this project chose to use 'user' and 'username' interchangably and without any rhyme or reason. :| [17:28:37] Reedy: check https://gerrit.wikimedia.org/r/#/c/166186/ [17:35:39] Hello, I just tried changing the main page of my wiki, and on the side bar the main page link now links to INVALID_PAGE, how do i fix this? [17:36:08] What did you try to change the main page of your wiki to? [17:36:37] (And change by editing MediaWiki:mainpage ?) [17:36:53] so basically i followed the official docuemntation and setup that redirect [17:36:57] yes [17:37:01] changed it to MyWiki [17:38:40] if i hover my mouse over the main page link on the side bar it navigates to http://ip/mediawiki/INVALID_PAGE [17:40:21] Sorry, did you turn that page into a redirect, or did you make the contents of that page be exactly "MyWiki" [17:40:38] it made it into a redirect [17:41:53] its like the sidebar link is wrong im not sure how to change that [17:42:09] You're not supposed to make it into a redirect. It should contain exactly the text of the name of the Main page [17:42:16] ok [17:42:22] well how do i fix that? [17:42:37] Edit the page MediaWiki:mainpage to be only "MyWiki" [17:43:03] You might have to go to it by doing http://ip/mediawiki/index.php/MediaWiki:Mainpage?action=edit&redirect=no [17:43:12] http://192.168.1.42/mediawiki/index.php?title=MediaWiki:Mainpage&action=edit [17:43:14] i have it [17:43:23] that page there basically has the text for MyWiki in it [17:45:37] basically, or exactly? [17:47:22] exactly [17:47:24] it contains two lines [17:47:26] welcome to mywiki :) [17:48:31] MyWiki is the original main_page text [17:57:56] MediaWiki:mainpage cannot contain more than one line. It has to contain just exactly the name of the main page [18:00:37] ahhh ok in [[ ]] or just MyWiki? [18:00:50] so [[ mYwIKI ]] OR MyWiki ? [18:03:02] hey ori, you around? [18:04:25] fhocutt: kinda, doing five other things. what's up? [18:05:36] ori: a prospective OPW applicant mentioned she's been trying to get hold of you, can I introduce the two of you over email? [18:08:01] fhocutt: sure. i'm really behind on emails :/ [18:08:42] Hi all! How would one manage to get the current page's ID from a skin? [18:08:59] fhocutt: (and: thanks) [18:09:00] ori: the application deadline is Oct 22, so if you're able to talk with her about microtasks, project outline, stuff like that, that would be very useful [18:09:08] * ori nods [18:09:10] ori: (you're welcome!) [18:10:17] zoidberg-: It need to contain just the text MyWiki. No brackets [18:10:35] zoidberg-: Nothing other than A-Z 0-9 or underscores [18:17:34] bawolff: Sorry for the not-technical question, but did it strike you like that tyne guy before (who said semantic was too hard) was trying to invent a wheel and an axel when he was up the block from a cart store? [18:18:26] yes, his solution sounded like it would end up being just as hard as semantic, but also be super buggy [18:19:12] Unlike smw which is totally not buggy [18:19:15] !hss [18:19:16] ZOMG!! https://upload.wikimedia.org/wikipedia/mediawiki/6/69/Hesaidsemanticga2.jpg [18:19:18] marktraceur: Listen. [18:19:20] It's not buggy [18:19:22] it has character [18:19:40] Ulfr_: I'm with you 100% [18:19:50] If I'm not fixing my server every five hours I get bored too [18:20:16] Which is why I share my root password publicly on 4chan every few days [18:20:26] Well that's what you get for letting users use semantic all willy nilly [18:20:38] mine have so many abstraction layers between them and anything breakable it's silly [18:21:37] bah, chicken. key auth your servers and just start giving it to people [18:21:44] way better that way [18:23:20] marktraceur: So I managed to scare someone so badly with MW he went home early today. [18:23:54] Getting in the halloween spirit, good [18:24:03] Oh no, he's just really annoying. [18:24:23] OooOOOooooOOO I'm a public-facing 1.8 MediaWiki instance with NO SECURITY PATCHESSSSS [18:24:28] I used some knowlege bawolff dropped on me earlier to redirect him to a random page every five seconds [18:24:28] Feeeeear meeeeeee [18:24:29] WHERE [18:24:31] GIMMIE [18:24:34] ALL THE INJECTIONS [18:25:05] Ulfr_: Wait, you stuck something in his user JS or something? [18:25:10] Yup. [18:25:13] Haunted browser trick :P [18:25:16] YUP [18:25:16] Clever [18:25:18] Except [18:25:21] I forgot and went to lunch [18:25:28] and when I got back he'd gone home [18:25:33] Wow gj [18:26:23] hey man. this is the same user who broke my uploads for awhile when he uploaded a file with .mpeg.mpeg on the end [18:26:34] he didn't see the extension and felt it should be there [18:29:45] ori, emailed! You may also find sumanah's post about how we structured my internship to be useful: http://www.harihareswara.net/sumana/2014/08/13/1 [18:30:50] You were an intern? And lived? [18:32:17] No, fhocutt is a zombie now [18:32:25] #mediawiki-halloween [18:32:53] Ulfr_, braaaaaaains [18:33:15] more seriously, I was, and really enjoyed it [18:33:38] Where do you guys keep the Chryssalids? Ours get hungry when it's not summer [18:33:58] git stash [18:34:14] fhocutt: Way to brag about it. Some of us spent our internships doing tech support and getting yelled at by confused old people [18:34:14] they're pretty cranky when they come out though [18:34:49] Ulfr_, that's rough [18:35:10] * bawolff learned how images worked [18:35:45] Basically during my gsoc I learned that image metadata is an ugly ugly hack in pretty much every format its implemented in [18:37:18] Isn't that how it usually is with everything non-techies can't/don't know how to see? [18:37:21] I mean, look at MIME typing [18:38:34] My favourite was GIF images, which put a slide of bytes 0xFF, 0xFE, 0xFD, .... at the end of the metadata block, as readers that won't understand treats the entire thing as a bunch of pointers to the next block, so no matter where you end up, it will always point to the exact end of the metadata block [18:41:39] bawolff: That's either genius or insanity [18:41:45] indeed [18:41:49] and whoever made HTMLForm is in a similar status [18:42:08] Because why wouldn't you just want a list 100 items long that now needs to be in an associative array [18:42:53] Well could be worse, they could make you specify it as an external json file [18:49:30] bawolff: That would be less hateful [18:51:13] Well. Atleast there's notepad++ macros [18:51:21] It was that or foist it off on a bored fellow/intern [19:46:47] AjaxDispatcher is still around in 1.25, right? http://www.mediawiki.org/wiki/Manual:Ajax#Deprecated_functionality makes it sound like it might be going away... [19:49:28] Its still in HEAD as of currently [19:49:35] so it will probably be in 1.25 [19:50:05] Ah, ok. [19:50:23] thanks [19:52:20] Rosencrantz, are you planning to start using it for something? [19:53:12] No, there was an extension I was decoupling from a large bundle. It's using ajax stuff, and I wanted to make sure I didn't have to figure out how to re-write that too....