MediaWiki talk:Searchmenu-new

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
MediaWiki:Searchmenu-new forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to MediaWiki:Searchmenu-new, add {{Edit request}} to this talk page, followed by a description of your request.
This interface message or skin may be documented on mediawiki.org or translatewiki.net.

Add the former Mediawiki:Searchresulttext here[edit]

{{editprotected}}

New code[edit]

{{hidden
|headercss=font-size: 1.1; background-color: #f6f8fc;
|1= Other tools
|2= {{Mediawiki:Searchresulttext}}
}}<!--

-->'''Create the page "[[:$1]]" on this wiki!'''

Rendering[edit]

Other tools
Help
  • Phrases in double quotes: For example, "holly dolly" returns very few results as opposed to holly dolly.
  • Exclusion: Terms can be excluded with -, for example windows -system (note there is no space between "-" and the excluded term).
  • Wildcard search: Wildcards (symbols representing unknown text) can be prefixed and suffixed, for example, the search *stan will produce results like Kazakhstan and Afghanistan.
For more details, including fuzzy search, Boolean operators, and keywords intitle:, incategory: and prefix:, see Search Help on English Wikipedia.
Browse
Search

Create the page "$1" on this wiki!

See also[edit]

Teofilo (talk) 14:32, 14 July 2009 (UTC)[reply]

✓ Done --Mormegil (talk) 15:44, 14 July 2009 (UTC)[reply]

Category link[edit]

{{Editprotected}}

Please see MediaWiki_talk:Searchmenu-exists#Category_link. The same change should be done here. -- User:Docu at 15:19, 13 April 2010 (UTC)[reply]

{{editprotected}} Please insert <span class="plainlinks"> and </span> (perhaps like this |1= <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}} Categories] • Other tools</span>) because the link is an internal link. Teofilo (talk) 15:41, 30 July 2011 (UTC)[reply]

Please add verbs (search, show...) the same way as requested at MediaWiki talk:Searchmenu-exists. Teofilo (talk) 11:18, 31 July 2011 (UTC)[reply]
Done. Killiondude (talk) 18:45, 1 August 2011 (UTC)[reply]

Missing translation in MediaWiki:Searchmenu-new/de[edit]

The last sentence should be translated to German: Erstelle die Seite „$1“ in diesem Wiki! --TMg 12:51, 16 August 2012 (UTC)[reply]

✓ Done Raymond 13:02, 16 August 2012 (UTC)[reply]

Quotes get destroyed[edit]

Do a search with quotes like "red and blue". Click “Search categories”. This will search for “&#34;red and blue&#34;”. I'm not sure how to fix this. This also applies to MediaWiki:Searchmenu-new/de and all other languages. --TMg 12:51, 16 August 2012 (UTC)[reply]

I’m afraid this is a problem directly in MediaWiki; SpecialSearch::showCreateLink() passes the searched phrase/page title to this message (via $1) only after calling wfEscapeWikiText on it, so there is not much this message could do about that. I created bugzilla:39456. --Mormegil (talk) 11:54, 17 August 2012 (UTC)[reply]

Russian version[edit]

{{Editprotected}}

Please create MediaWiki:Searchmenu-new/ru with text:

{{hidden
|headercss=font-size: 1.1; background-color: #f6f8fc;
|1= <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}} Поищите среди категорий]</span> • Посмотрите другие инструменты
|2= {{MediaWiki:Searchresulttext/ru|1=$1}}
}}<!--

-->'''Создать страницу «[[:$1]]» в этом вики-проекте!'''

Thanks! --Kaganer (talk) 10:36, 16 August 2014 (UTC)[reply]

PS: These messages should be created for all languages, for which exists translations MediaWiki:Searchresulttext/.... Maybe also can be made ​​more systematic, leaving all of the code in the main message, and to make translatable text strings in the template, integrated into the new translation system (through mw:Extension:Translate)? --Kaganer (talk) 10:36, 16 August 2014 (UTC)[reply]

PPS: Maybe also in main message be replace {{MediaWiki:Searchresulttext|1=$1}} into {{int:Searchresulttext|1=$1}}? --Kaganer (talk) 10:40, 16 August 2014 (UTC)[reply]

✓ Done for the ru subpage. --Steinsplitter (talk) 11:19, 29 October 2014 (UTC)[reply]

Skip pdfs[edit]

{{Editprotected}}

<span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1 -filemime:pdf}}&fulltext=Search&advanced=1}} skip pdfs]</span> •

Can you add this after "Search categories"? Frequently hits are in pdfs, but users might not be interested in those, "-filemime:pdf" provides a way to skip those. See Commons:Village_pump/Archive/2020/07#Deselect_pdfs_when_searching for some discussion. --- Jura1 (talk) 12:07, 16 November 2021 (UTC)[reply]

✓ Done Awesome! Thank you! —‍Mdaniels5757 (talk • contribs) 17:37, 29 October 2022 (UTC)[reply]

if we change -filemime:pdf to -filetype:OFFICE we can skip both pdf and djvu. accordingly change "skip pdfs" to "skip pdf & djvu".--RZuo (talk) 08:33, 28 December 2022 (UTC)[reply]

to resolve https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&oldid=783795488#Search_/_Skip_PDFs_/_Filemime , here's my solution:

change line 3 to

|1= <span class="plainlinks">[{{fullurl:Special:Search|search={{PAGENAMEE:$1}}&ns14=1&fulltext=Search&advanced=1}} Search categories]</span> • <span class="plainlinks">[{{fullurl:Special:Search|search={{PAGENAMEE:$1}}+-filetype:OFFICE&fulltext=Search&advanced=1}} Skip pdf & djvu]</span> • View other tools

--RZuo (talk) 16:45, 16 July 2023 (UTC)[reply]

I don’t know how the percent-encoded HTML entity-encoded quotation marks appear (maybe MediaWiki is buggy/doesn’t work as we expect it to?), but both {{urlencode:"foo bar"}} (%22foo+bar%22) and {{PAGENAMEE:"foo bar"}} (%22foo_bar%22) encode quotation marks directly, so I doubt switching to the latter would fix anything. On the other hand, as you can see, PAGENAMEE replaces spaces with underscores, and it also strips the eventual namespace (if I want to search only for files, regardless of the namespaces selected in the namespace selector: File:"foo bar" gets transformed to %22foo_bar%22 rather than File%3A%22foo+bar%22). —Tacsipacsi (talk) 00:32, 19 July 2023 (UTC)[reply]
you're right. when i was testing it in Commons:Sandbox i didnt pay attention.
indeed, the same code here copypasted into sandbox would not convert the double quotes in keywords to wrong encoding.
when i saw it converts " to & #34; i assumed urlencode behaving like {{PAGENAME}}. RZuo (talk) 07:13, 19 July 2023 (UTC)[reply]
i thought it was similar to Template_talk:Wikidata_Infobox/Archive_5#Percent_encoding_problem. RZuo (talk) 07:26, 19 July 2023 (UTC)[reply]
maybe we can learn from en:MediaWiki:Searchmenu-new and do some complicated stuff. RZuo (talk) 12:08, 19 July 2023 (UTC)[reply]
probably with en:Module:Urldecode we can convert the percent encoding back to chars. RZuo (talk) 12:21, 19 July 2023 (UTC)[reply]
Module:Urldecode would be of no help, as the problem is not with the percent-encoding (URL encoding), but the entity encoding (HTML/XML encoding) preceding it. The percent-encoding is actually useful: it prevents ampersands and maybe some other characters from being misinterpreted by Special:Search. —Tacsipacsi (talk) 11:34, 20 July 2023 (UTC)[reply]
@RZuo and Tacsipacsi: I’m disabling the edit request since it doesn’t sound like you’re done debugging yet… please reenable it when you’re done (or decided the broken encoding can be tolerated, if it only happens sometimes) --Lucas Werkmeister (talk) 19:16, 30 September 2023 (UTC)[reply]

Edit request[edit]

It is requested that an edit or modification be made to this protected page.
Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

Pppery

Please change

|1= <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}} Search categories]</span> • <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1 -filemime:pdf}}&fulltext=Search&advanced=1}} Skip PDFs]</span> • View other tools

to

|1= <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}} Search categories]</span> • <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:$1 -filemime:pdf -filemime:djvu}}&fulltext=Search&advanced=1}} Skip PDFs and DjVus]</span> • View other tools

Per phab:T364161. * Pppery * it has begun... 00:28, 5 May 2024 (UTC)[reply]

i think "-filetype:OFFICE" is simpler than "-filemime:pdf -filemime:djvu". RZuo (talk) 08:34, 5 May 2024 (UTC)[reply]