[00:29:33] Hi, I am trying to make a single query to the API that searches for articles as one normally does @ Wikipedia.org, and returns some good identifying info. [00:30:29] The problem is, if I were to do a list search, I am getting the article results, but not the props I need (like pageId or url). I can probably do another search from the title, but that seems to be frowned upon and would be inefficient [00:31:40] With generators, I cannot use the same search function (CirrusSearch), and the best I can do seems to be a type of enumeration instead of a real matching search by score. [00:32:10] Does anyone know of how I can accomplish my search to get the info I need in one query? Thanks in advance! [00:38:52] Gabe__: "one normally does @ Wikipedia.org,"... have you looked at https://en.wikipedia.org/w/api.php?action=help&modules=opensearch [00:40:41] oh.. you are wanting to combine that with other query props I guess. [00:41:07] it seems like there is a weird way to do that hidden somewhere in the api [00:41:44] I went through these two pages: https://www.mediawiki.org/wiki/API:Query, https://www.mediawiki.org/wiki/API:Search_and_discovery [00:41:55] Going through the search and discovery one again to see if I can find something new [00:43:29] I'm pretty sure that generator=search is cirrus on wikimedia wikis [00:44:09] but the scoring may get lost in the result [00:46:11] Yeah, the docs show action=query & list=search as a Cirrus search [00:46:19] and it does indeed return the results I want in the correct order [00:46:52] it just doesn't return the info that I find important (like pageId or url) but instead gives less important information in my opinion like size or word count [00:47:17] add in prop=info maybe? [00:47:51] https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=info&generator=search&formatversion=2&inprop=url%7Cdisplaytitle&gsrsearch=meaning&gsrinfo=totalhits%7Csuggestion&gsrprop=size%7Cwordcount%7Csnippet [00:48:03] I looked at using action=opensearch too, and there it returns some better information (includes the URL), but either way it looks like I'll need to make a second query after parsing through the results [00:50:10] Oh cool! I think that query you sent me does it. [00:51:25] I missed that you can set the generator as a "search". I wanted the page ids so I followed the example to use generator=allpages [00:51:29] Thanks! [01:00:18] Gabe__: yw! [01:03:27] I'm playing around with the settings now and don't see it yet, but would you know how to make the returned results match the order of the suggestions? [01:04:21] For example, right now at https://www.wikipedia.org/ if you start typing "gabriel" you will see "gabriel garcia marquez" then "gabrielle giffords" etc [01:04:35] the one from your query will first return a "Peter Gabriel" [01:07:18] actually once the full 'gabriel' is typed, 'gabriel' comes up first followed by the others [01:09:10] weird, and changing the 'gsrlimit' prop under 'generator=search' changes the order of the search results [01:09:39] brb [02:21:05] I think the suggestions are triggered by a ~ prefix [10:30:32] hello good people. I've got a wiki where the databases have been made already and use a non-wiki prefix for their names. For security reasons, the mediawiki.org documentation recommends using wiki-prefixes for the tables. The wiki has been in use for almost a year now. Would it be disastrous at all to just rename them? [10:31:07] Does it? [10:31:21] if MySQL is used on the server for more than just MediaWiki [10:31:57] What prefix are you using now? [10:32:04] none [10:32:23] the idea is to limit the mediawiki MySQL user for maintenance scripts [10:32:58] We do have a maintenance script to help with renaming -- maintenance/renameDbPrefix.php [10:33:13] oh, nice [10:33:32] that's perfect :D [10:33:34] thanks [10:34:03] hello, I am from Wikipedia, I want to introduce you a user that knows stuff about creating 3D images and video [10:34:07] he is galopax [10:34:26] NedScott: "* Run this script to after changing $wgDBprefix on a wiki." [10:34:30] we were wondering about contacting the mediawiki tech team [10:35:46] he may be helpful to help, for example, he is interested into attach 360 panoramics directly to wikipedia articles [10:36:04] we have now just an external tool at wmflabs [10:37:32] in case you are interested, may you please tell us if this is the channel for that topic= [10:37:34] ? [10:38:34] ("may be helpful to help", hahahaha) [11:34:57] My articlecount is not working? Content page have stopped working? I cannot figure out why? anyhelp? [11:39:42] blueHawk: can you please distinguish facts from questions in your message? [11:40:16] The usual method is to avoid putting "?" after something you know is true [11:40:34] But we're open to different communication styles if you share the decoding standard with us [11:42:07] Oh it was a copy paste sorry did not see that [11:44:26] If I make an article, it do not show up in content pages and article count do not count it also, but it is created and accessed. [11:58:43] blueHawk: what do you mean by "show up in content pages"? [11:59:57] and you can try php updateArticleCount.php --update [12:00:37] Special:AllPages I mean [12:01:07] I do not have access to command line, in phpMyAdmin I cannot see those pages either [12:21:12] I have done a fresh install of 1.27.1 on a different domain, and I get this error at login : [12:21:14] There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again. [12:42:06] hi [12:42:18] how to render "sometext" by mediawiki in case when
sometext
? [14:45:01] Hello [15:08:02] Hi, I have copied a Template from Wikipedia which uses #Invoke but I am using an older version of MediaWiki and have no Scribuntu. What do I need to do to make the template work? [15:08:53] https://en.wikipedia.org/wiki/Template:PAGENAMEBASE [15:10:38] saint_jut: you can write your own without using scribunto [15:10:46] saint_jut: for example with parser functions [15:10:48] Not easily [15:11:01] there is https://www.mediawiki.org/wiki/Extension:RegexParserFunctions for example [15:11:18] It would take me hours where someone else might do it in 1 minute [15:13:06] That link is not going to help me. An example could. [15:13:34] hello, i have case sensitivity enabled on my wiki, how would i be able to make my searches not have to be case-sensitive? [15:14:28] saint_jut: you can search with a regexp like "^(.*)\(.*\)$" and replace with the first match "$1" [15:14:59] I don't know how to read that [15:16:24] {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}} [15:17:46] saint_jut: https://en.wikipedia.org/wiki/Module:String#replace [15:18:42] That page only use #invoke which doesn't work on my wiki [15:19:17] saint_jut: if you don't want to install scribunto try to implement the same function in some other way as I said [15:20:15] I can't install it. Is there no easy way to remove the #invoke part? [15:20:58] saint_jut: no [15:21:06] That sucks. [15:22:22] This way only experts can work on templates. [15:23:12] saint_jut: not if you install scribunto [15:23:32] Then you have to learn Scribunto. [15:24:07] if all you want is copy templates from wikimedia you don't need to learn much [15:24:41] if you want to write templates on your own, you can use extensions like parser functions [15:25:39] ParserFunctions is installed. [15:26:02] I have received the following message whilst trying to update/edit our (previously fine) wiki:'Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service.' Can anyone offer any solutions/advice? Thanks [15:28:12] OK, I am going to look in the history of the Wikipedia template, maybe I can find an older version without Scribunto [15:29:14] saint_jut: good idea [15:29:34] Thanks for trying to help [15:29:44] np [15:31:37] heh, new Apple 5K monitors lack EM shielding [15:33:13] ooops, wrong channel, sorry [15:39:30] Unfortunately there isn't one. Older versions use other templates that no longer exist. :( [17:02:38] hey, if i have $wgCapitalLinks set to false, would I be able to make search results case-insensitive? [20:24:52] I am trying to debug Module:Sidebar because I am having some problems using it [20:25:05] but then I dont know how to debug it, so i am at a bit of a loss [20:28:38] what "problems"? [20:29:52] oh,well,whenI preview the template,I end up with a literal [20:29:59] on the page [20:32:04] this is kind of a trip [20:32:09] with Lua and all