[00:00:08] sumanah, I am moving from a website to a wiki. However, I am bootstrapping the wiki. I just don't want anybody to modify /yet/. [00:00:30] sumanah, However, out of social reasons I gave him/her already an account (i restricted all creations) [00:00:40] of course the wiki will become a collaborative thing in the future [00:00:45] ahhhhhh.... check out the Access & CMS things I invoked above Tectu_ - maybe they can help [00:00:53] I wouldn't spend all these hours porting from a joomla site :P [00:01:06] I'll take a look, thank you ver much for your help [00:01:29] Tectu_: glad to help! and thanks [00:02:06] :) [01:14:36] fhocutt: "Introvert night" -- http://www.meetup.com/SeattleAttic/events/190454772/ brilliant. kudos [01:14:49] we decided to expand our reading night :D [01:14:52] thanks! [04:18:48] Hi! Using Mediawiki's Query system, how would I achieve something like this?: ORDER BY date DESC LIMIT 10 - Order by the date entry (DATETIME), descending, and up to 10 results? The documentations don't go on to tell you how DESC and LIMIT work. [04:22:38] array('ORDER BY' = 'date DESC', 'LIMIT' => 10) [04:23:01] the ORDER BY option is just an SQL fragment, you can put whatever you want in it [04:24:03] Ooh, that's re assuring. Strange how the others aren't presented in the same query format when these are. [04:24:09] Thanks! [04:24:22] np [04:31:00] TimStarling: I've been playing around with the query a bit, it seems to dislike everything about your suggestion. [04:32:14] everything? [04:33:06] Yes, the error console says I should "check" the syntax starting from ORDER BY all the way to the end. It's no doubt a proper query it seems, it just produces errors. [04:33:43] maybe try array('ORDER BY' => 'date DESC', 'LIMIT' => 10) [04:35:14] That's what I have now actually. The error does mention a WHERE in there, though I have no need to use WHERE. [04:36:19] https://dpaste.de/kh5B < The raw SQL output (Notice that date = post_datetime) [04:36:48] that array goes in the $options parameter [04:37:22] Oh, I see. [04:37:32] in $conds you can just have an empty string, if there are no conditions [04:38:43] That did the trick! [04:39:00] Thank-you again :) [04:39:20] I think the docs are due for an update. [04:39:38] what docs are these? [04:40:01] http://www.mediawiki.org/wiki/Manual:Database_access - Simply, a lot of things aren't explained. [04:40:12] It gives the basics, though it should go into more detail. [04:40:58] maybe try https://doc.wikimedia.org/mediawiki-core/master/php/html/classDatabaseBase.html#a76f9e6cb7b145a3d9020baebf94b499e [04:42:19] Ah, I see. I've actually poked around there a bit, though I never stumbled across that. [04:48:37] Now the last issue seems to be that DESC isn't registering properly - The order remains the same. [05:52:17] Could somebody tell me what's wrong with this? 0_0 https://dpaste.de/2kfM#L8 The "DESC" bit's not working at all. [05:53:54] is that even for MediaWiki? [05:54:41] Hello! I wish to add menus in the mediawiki main page as an administrator. Please tell me how I can customize my mediawiki. [05:55:49] TennaFox: Last argument is normally an associative array (although a giant string might very well work) [05:56:23] there's an example at https://www.mediawiki.org/wiki/Manual:Database_access#Wrapper_function:_select.28.29 [05:59:30] AaronSchulz: yes [06:00:18] TennaFox: PHP doesn't have named parameters, so the "$conds = " there is not doing what you think it is doing [06:00:45] no a giant string does not work [06:01:06] the array I suggested earlier will probably work, i.e. array('ORDER BY' => 'date DESC', 'LIMIT' => 10) [06:01:10] So what do I do then? [06:03:12] https://dpaste.de/HkOh#L [06:13:33] TimStarling: Thanks for your help, the concept is still a bit fuzzy though I guess I'm learning more from experience, it's running flawlessly now. [06:14:12] It's very late here, so I should go. Thanks for explaining the concepts and giving examples, otherwise I never would have known. Thanks so much, again. [06:14:50] \name TennaFox|away [06:14:50] Wrong command :P [06:15:47] Hello! bawolff, Could you please guide me towards customizing mediawiki? I wish to add menus in the sidebar of my extension for easy navigation? [06:16:12] !sidebar [06:16:12] To edit the navigation menu on the left, edit page [[MediaWiki:Sidebar]] on your wiki using its special syntax (see https://www.mediawiki.org/wiki/Manual:Interface/Sidebar for details). If you need more control, you can use the SkinBuildSidebar hook (https://www.mediawiki.org/wiki/Manual:Hooks/SkinBuildSidebar). [06:18:56] Will this allow to make the links visible in my sidebar only when using the extension? Or will the links be permanent? I wish to show some links only when a specific extension is to be used. [06:20:23] The hook will do it via extension [06:23:24] alright thanks a lot bawolff , I will come back with some progress or queries after doing some homework. :) [07:15:04] i was facing a problem in mediawiki extension [07:15:20] i want to add style sheet in my extension [07:15:33] how i can do this ? [07:15:37] !RL [07:15:37] ResourceLoader is the delivery system for JavaScript/CSS in MediaWiki. First released in MediaWiki 1.17. See also https://www.mediawiki.org/wiki/ResourceLoader , https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_%28users%29 and https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_developers [07:16:48] there is my code [07:17:08] please check it and tell me where i am wrong [07:17:09] https://hiteshkumarsofat.wordpress.com/ [07:18:45] Well the @author tag is probably wrong :P [07:19:23] ok [07:19:37] sofat, you may try the above links mentioned against user181, and yea the author name is wrong :P [07:19:54] yes i try it [07:20:03] You're calling addModules( 'h.css' ). You want to do addModules( 'h' ); or perhaps instead addModulesStyle( 'h' ); [07:20:54] bawolff, nothing happen sir [07:22:01] I don't see anything else obvious standing out. [07:55:05] hello! is there a way i can stop mediawiki from redirecting to http:// when i visit a url over SSL? [07:56:23] sayakb: Adjust $wgServer. If you set $wgServer to be protocol relative, and then $wgCanonicalServer to be what your favourite protocol is, then all generated pages will work in both protocols [07:56:47] sayakb: e.g. $wgServer = '//mywiki.com'; $wgCanonicalServer = 'https://mywiki.com'; [07:56:57] !wg CanonicalServer | sayakb [07:56:57] sayakb: https://www.mediawiki.org/wiki/Manual:%24wgCanonicalServer [07:57:07] bawolff: thanks, let me try that [07:59:49] bawolff: still getting redirected: [04/Jul/2014:07:59:05 +0000] "GET /Welcome_to_KDE_UserBase HTTP/1.1" 302 35532 [08:19:27] how to add stylesheet in mediawiki extension? [08:19:29] ? [08:22:12] how to add stylesheet in mediawiki extension? [08:22:14] how to add stylesheet in mediawiki extension? [08:22:23] how to add stylesheet in mediawiki extension? [08:23:02] well, some patience would be a good start [08:24:07] samb, are you know how to add stylesheet in mediawiki extenstion [08:24:09] ? [08:25:25] no, but I do suspect that asking the same question so many times in a row is a good way to get banned [08:35:36] please help me [09:15:22] sir want to know how to add stylesheet in mediawiki extension? [09:17:21] sofat, You may try asking on mediawiki-l and wikitech-l which are the primary mailing lists for MediaWiki-related issues. See https://www.mediawiki.org/wiki/Mailing_lists for details [10:04:09] problem is solved [10:04:43] there is procedure with you add style sheet in media wiki [10:04:45] http://hiteshkumarsofat.wordpress.com/ [10:05:08] sorry with help you add style sheet in media wiki extension [10:31:21] sofat: Problem solved? [10:31:59] yes i had faced one problem [10:32:12] What sort of extension are you making? [10:32:24] problem i want to add the style sheet in mediawiki extension [10:32:50] i am doing gsoc project [10:33:21] Who is your mentor and what is your project? [12:10:06] hi, I'm building a free map where people can add information about points of interest. [12:10:08] This is an example: a user can click on "More" and write something http://getpeers.com/N264673865/Ai%20Tre%20Scalini%2C%20251%2C%20Via%20Panisperna%2C%20Campitelli%2C%20Municipio%20Roma%20I%2C%20Rome%2C%20Lazio%2C%2000184%2C%20Italy [12:10:09] I'd love to use a wiki for this, such that users can make edits, watch old revisions and rollback changes. Would it be possible to integrate mediawiki within the map?? [12:11:36] Anyone know of an extension which allows users to input an arbitrary URL, have the wiki grab that page, format it to PDF, and save it as a File? [12:35:00] orion__ : sounds more like you're looking for an app [12:35:29] sounds like it has nothing to do with wikis [12:39:05] wkhtmltopdf is a great program that does the conversion. I just wish there was something that could glue that application with automatic uploads. [12:40:12] It shouldn't be much work to write something to do that [12:40:14] orion__: any implementations in mediawiki yet? [12:40:35] i always used http://www.htmlpdf.com/ [12:54:27] don't wanna be boring but... does anyone have a hint about my previous question? [12:57:24] zPlus: It almost sounds like reproducing OSM [12:57:51] how so? [12:58:32] bah [12:58:47] https://freestatechronicles.com/index.php?title=Special:NewPages&hidepatrolled=1&namespace=all <-- how the heck do I patrol this new page creation? [12:59:48] Reedy: ^ [13:34:07] Can I embed a section from a page into another page in mediawiki? [13:37:48] vin: https://www.mediawiki.org/wiki/LST [13:38:57] !debug [13:38:57] For information on debugging (including viewing errors), see http://www.mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://www.mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging [13:42:20] Nemo_bis: sorry for the newb question, but it shows the xml tags in the page. I don't believe that's supposed to happen? [13:45:44] vin: I don't see any such thing, can you be more precise? [13:46:45] the marking of the section is two xml tags [13:48:23] I didn't install the extension, so nvm [13:52:49] Is there a way to find the recent updated text and to reach line number given in difference page ? [14:06:52] Is there a way to find the recent updated text and to reach line number given in difference page ? [14:43:50] Ashis: define "reach" [14:46:15] I mean ..when you see diff page which shows difference between new and old content. You can see on top a line number but MediaWiki do not provide any functionality to reach that line number directly. Is there a way to do ? [14:47:25] Nemo_Bis [14:53:13] not in core [14:53:18] I use ctrl-f [14:58:44] is there a way to get the first revision id of a page for a revision class object ? [15:02:31] is there a way to get the first revision id of a page for a revision class object ? [15:13:28] just use WikiPage::getOldestRevision() [15:32:04] Nemo_bis: Is it possible to get diff text in custom function ? [15:32:17] yes [15:32:31] What is the way ? [15:32:49] or reference link please [15:33:14] Nemo_bis [17:31:36] hi [17:32:02] How to get the id of a page we want the content? My query is https://fr.wiktionary.org/w/api.php?action=query&format=json&titles=Utilisateur:Automatik/langues.json&prop=revisions&rvprop=content but i don't have the page id to access the data [17:35:11] Automatik: it gives you the pageid in the query response [17:35:24] "pageid": 2837835, [17:35:24] "ns": 2, [17:35:24] "title": "Utilisateur:Automatik/langues.json", [17:35:34] so the page id is 2837835 [17:36:09] it also looks like it gave you the content as well [17:36:15] so I'm unsure as to what you're asking [17:36:17] in javascript, how I access it? data.query.pages["id i don't have?"] [17:37:10] is it clear? [17:38:31] it can return multiple pages, you're supposed to iterate over data.query.pages [17:38:57] ok i see, thks! [18:38:18] Is there a way to get the first revision id of a page for a Revision class object ? [18:52:27] rohan013, in what language [18:52:51] re for my past question: i tried this code : http://jsfiddle.net/wVm5R/ , but page.revisions is undefined, is it normal? [19:18:52] fhocutt: I wish to hear more about these feedsback [19:19:00] (plural of feedback because I am silly) [19:20:23] Waldir said the mwclient one was very helpful and that he wants to help make it meet the standard, and Amir posted similar to pywikipedia-l [19:20:32] YAYYYYY [19:20:52] so yes! I am glad that this is helpful [19:21:11] all that is left for Python is adding specifics to various issue trackers [19:21:47] and I have started making evaluative notes on one of the Perl libraries, which looks just fine [19:22:15] although I want to run that by a more experienced Perl person [19:22:42] nod nod nod [19:48:56] hidgw, I wish to pass an array of tables as an argument in JOINS syntax. Right now I have been able to join two tables but I wish to join all the tables that exist. [19:49:28] s/hidgw/hi/ [19:52:22] Like here http://pastie.org/9355705 I wish to join all the tables that are stored in the array. How can this be done? Could anyone help please? [19:55:33] albertcoder: you may want to email mediawiki-l [19:55:37] a lot of people are on holiday today [19:55:39] !lists [19:55:39] mediawiki-l and wikitech-l are the primary mailing lists for MediaWiki-related issues. See https://www.mediawiki.org/wiki/Mailing_lists for details. [19:56:12] thanks a lot sumanah [21:20:57] Back with my daily Q&A: https://dpaste.de/nhPM - This is complicated: Can someone help me think of a way to loop a query using an array, to get another array? For instance, looping an array containing five values (Each a User ID) with a query, to get the user_name corresponding to the user_id. Then, have the output of that query become it's own array, containing the five user_names that matched the user_id. [21:23:34] At first I thought it would be a fun challenge, until it became utterly confusing. [21:24:31] hey TennaFox - because it is a holiday in the US this channel is a bit slow. [21:24:36] Maybe try mediawiki-l ? [21:24:37] !lists [21:24:37] mediawiki-l and wikitech-l are the primary mailing lists for MediaWiki-related issues. See https://www.mediawiki.org/wiki/Mailing_lists for details. [21:25:15] Hmm, didn't consider that. [21:26:29] Ack, random power outage. [21:28:34] I'll take a look at those mail lists, thanks for pointing them out. My question's still up in the air if anybody happens upon it later. [21:28:42] nod. good luck [21:28:44] TennaFox_, you realise you can use User::newFromId( $id )->getName() right? [21:29:15] in a loop [21:29:19] for batch lookups, we have the UserCache class [21:29:40] Krenair: No, I looked around to see if such a function existed, thanks for directing me to that. [21:29:48] :) [21:29:50] TennaFox_: use UserArray::newFromIds for batch lookups [21:30:25] actually yeah, do that ^ [21:57:57] curious if anyone here uses or maintains the FlaggedRevs extension and can comment on the various difficulties we're having with it, which are detailed here: http://doomwiki.org/wiki/Doom_Wiki:Central_Processing#New_FlaggedRevs_glitch_or_odd_behavior [21:58:22] as of a week ago or so, it's begun behaving very badly for us and we are considering uninstalling it as a result. [22:04:03] legoktm: I've been having quite a difficult time controlling that function, the output is never an array with the methods I'd using. [22:04:20] UserArray returns an iterator [22:04:45] Quasar`: it's not "maintained" per se, but the WMF uses it, so you can file a bug in bugzilla.wikimedia.org about it [22:05:03] I'm not sure what we're seeing is even a bug or not [22:05:16] it's hard to understand the extension sometimes. [22:05:16] * legoktm reads [22:06:53] by your description on-wiki it looks like a bug [22:13:08] legoktm: I see, though converting the object to an array isn't working. I simply don't see why something so simple (Get the Usernames of the users with these IDs) requires so many processes. [22:13:35] TennaFox: did you try iterator_to_array() ? [22:13:52] while that sounds simple, it's not actually that simple on the backend if you want it to be performant [22:14:01] iterator_to_array() [22:14:06] Yes [22:14:14] can you pastebin your code? [22:18:46] https://dpaste.de/ou16 I'm slightly confused by what data UserArray::newFromIDs is giving me, and how I should handle that later on. [22:19:49] Though I'm grateful for these Mediawiki "shortcuts", my lack of understanding in them has tripped me up numerous times. [22:20:10] an iterator through User objects, I would assume? [22:20:45] TennaFox, does the $user_ids array really contain arrays with elements called authors...? [22:21:23] umm, [22:21:26] no that's not right [22:23:28] TennaFox: https://dpaste.de/6Y7n/raw [22:23:30] I'm aware of that, sadly. To be entirely honest, I had no idea what "iterator" was until now. I was able to write the applet with the most basic PHP knowledge at hand. Then when it came to porting it to Mediawiki, my lack full understanding becomes apparent. [22:23:42] I don't mean to be rude, but do you know PHP? I think that might be a blocker here... [22:24:54] TennaFox, an iterator isn't a PHP-specific concept [22:30:04] Blocker?! As stated, I knew only what I needed to know the write the application as a standalone system. Perhaps I've asked far too many questions. [22:31:02] TennaFox: I have something you might find useful [22:31:07] https://www.mediawiki.org/wiki/Manual:MediaWiki_architecture [22:31:21] there's a bit there that talks about how to customize stuff at different levels [22:31:27] and what is required at each level [22:31:59] TennaFox: sorry, I didn't mean for it to come across that way, just that it you understand PHP, this might be easier. Asking questions is totally acceptable and welcomed :) [22:32:29] TennaFox: I agree with legoktm - it's totally fine to ask questions here - it's just that we may ask diagnostic questions back so we can help you better [22:35:54] I believe I misinterpreted legoktm's message, "blocker" could mean either a divider (As in, a connection's not being made on my part), or the literal term "block", as in blocked from this IRC. Which was implied? [22:36:27] neither [22:36:28] Neither [22:36:29] I meant blocker as in "prevent you from completing your project/achieving your goal" [22:36:40] sorry TennaFox - software engineering slang [22:37:44] yeah, sorry about that :/ [22:38:13] * sumanah calls for consolatory cake all around [22:38:48] * Reedy looks at sumanah [22:38:58] * sumanah serves slice of cake to Reedy [22:40:16] I'm sorry for causing a fuss as well - I'm used to the internet being a snarky, rude environment. It's rare that you'll find a place (Such as this) where people are level headed, and willing to cope with stupidity. [22:40:37] (That's a compliment, by the way :P) [22:40:42] :) [22:40:44] Have some cake! [22:41:03] (also I think you are merely temporarily ignorant, as we all have been, not stupid.) [22:42:20] As long as you listen/read/try etc, we deal with "stupidity" quite well [22:42:56] :) [22:43:41] TennaFox: Did you try the code sample legoktm gave? [22:46:12] You can probably see what's going on a bit more clearly (a la other programming languages) than using some of PHPs strange functions [22:53:02] Reedy: It's implemented, and works just as it should (Thanks, legoktm). Are you speaking of languages with similar functions? I had always wanted to learn C++, and so as I've gotten more into PHP, I figured C++ would be less of a challenge down the road due to both stemming from C. [22:53:19] :) [22:54:13] I was more meaning you're given something that you iterate (loop over), grabbing what you want from it and storing in a local array [22:54:13] what languages do you already know, TennaFox? [22:54:53] I guess the name "UserArray" is slightly confusing [22:56:36] sumanah: This may come as a shock, but assembly (To a degree). I was very much into modifying video games, and programs like IDA Pro were your only way into getting into them. I helped develop some patches for games like Mario Kart Wii. [22:56:57] oh awesome [22:58:07] PHP doesn't really prepare you well for learning C++, they're very different beasts [22:58:21] really the only similiar thing is some of the basic syntax [22:58:52] oh, and the fact that it's really easy to shoot yourself in the foot for shoddy code [23:03:19] good luck all