How To Make Your Own Windex

- 03.22

I Will Never Buy Windex Again! Info/review on how to get started ...
photo src: www.pinterest.com


DIY Citrus Glass & Window Cleaner That Beats Windex - The Hippy ...
photo src: www.thehippyhomemaker.com


Maps, Directions, and Place Reviews



Creating a generic search link

I'm sure this has come up before, but is there a clean way to create a generic search link for a particular search term? For example: [{{SERVER}}{{ScriptPath}}iki/Special:Search?ns0=1&ns14=1&ns100=1&search=%22a%20bacteria%22&fulltext=Search a bacteria] does appear to work (a bacteria) on both the secure and unsecure interfaces, but looks very hacked. I tried using [{{SERVER}}{{Script}}?title=Special:Search&ns0=1&ns14=1&ns100=1&search=%22a%20bacteria%22&fulltext=Search a bacteria] but it appears there is a name collision with a template named "script". I thought there was some sort of "full url" template? Thanks! Plastikspork (talk) 14:38, 20 April 2009 (UTC)

Note that I had to tag on the "fulltext=Search" part to make it "search" and not "go". And the search term has to be "URL encoded", for instance spaces have to be changed to "+".
As you mentioned there is a shorter way to encode this. You can use the magic word {{fullurl}}. Then you can do like this:
  {{fullurl:Special:Search|search=New+York&fulltext=Search}}  

//en.wikipedia.org/w/index.php?title=Special:Search&search=New+York&fulltext=Search

  {{fullurl:Special:Search|search={{urlencode:New York}}&fulltext=Search}}  

//en.wikipedia.org/w/index.php?title=Special:Search&search=New+York&fulltext=Search

  [{{fullurl:Special:Search|search={{urlencode:New York}}&fulltext=Search}} Find stuff]  

Find stuff

  <span class="plainlinks"> ... </span>  

Find stuff

  <span class="plainlinks">[{{fullurl:Special:Search|search={{urlencode:New York}}&fulltext=Search&ns0=1&ns1=1}} Find stuff]</span>  

Find stuff

But it is also possible to make a template that works like this:
I think that would be easier to use. It took me some thinking to figure out how to implement that, but there is an easy solution:
Come to think of it, this might actually be easier to use:
Since then people can get the namespaces right by simply first doing an advanced search and click the namespaces they want there, and then copy and paste the namespace list from the URL they get. Of course, we can make the template understand more than one way to feed the parameters. Tell me if you need my help.
--David Göthberg (talk) 02:20, 21 April 2009 (UTC)

Thank you for encouraging me to try creating it myself (Template: search link). It looks like Template: search and Template: wpsearch have similar functions, but not exactly what I was looking for. I do like your idea of just pasting the namespace string, but it appears this would require manually adding curly braces around all the equal signs, unless there is some trick that I am missing. So, I went with the {{search link| New York | Search for New York | ns0 | ns5}} option ( Search for New York). It would be great to eventually make this flexible enough to support multiple methods for feeding the parameters and, at the same time, cover all the possible parameters. Thanks again for being so extremely helpful and feel free to modify what I have started. I was having some problems if the ns tokens were padded with spaces, but I believe I fixed this using the 'lc' parser function which strips the whitespace (and lowercases the tag). Plastikspork (talk) 04:07, 22 April 2009 (UTC)

Note that "New York" here is parameter 1, thus the namespaces are parameter 2. But we humans tend to mix the numbers up and feed "1 = ns0=1&ns5=1". So then it is better we make the template use a named parameter, like this:
And when you need to strip away whitespace from a parameter but not lower-case it, then you can do like this:
The "x" is always there, so the if-case is always true, thus it returns the parameter. And just like many other parser functions the if-case strips away whitespace around the parameter. (I just learnt that trick myself some week ago.) But yeah, in this case we want to use {{lc:}}.
Since we are now talking template programming details, I will copy this discussion to the talk page of {{search link}} and continue there.
--David Göthberg (talk) 09:50, 22 April 2009 (UTC)

End of part copied here from Wikipedia talk:Searching. --David Göthberg (talk) 09:55, 22 April 2009 (UTC)


How To Make Your Own Windex Video



Default output

Plastikspork: I see that you too prefer that a template have some kind of default output, even when it doesn't get the parameters it needs. I am thinking of several different possible default behaviours:

1: Currently this template outputs a search for its own template name, using the caption "search". Like this: search

2: It could return a link to Special:Search, with the caption "search", which would look like this: search

3: Or it could show its own basic syntax, which would look like this: {{search link|search string|link text}}

I think the template should only do this when it doesn't get parameter one. If it doesn't get parameter two then it can simply use the default caption "search" as it does now.

I think I slightly prefer option three. But the other two is okay too.

--David Göthberg (talk) 11:49, 22 April 2009 (UTC)

I changed the default output for the "link text" to be the "search string". I think this is as logical a choice as "search", but is keeps me from writing the same text twice on the "List of common misspellings" page. Thanks again. Plastikspork (talk) 23:13, 23 April 2009 (UTC)

That is, when parameter 2 is empty but defined, then we also want the search string to be the caption. Currently when feeding an empty but defined parameter 2 we get no caption, just a numbered link. I can fix it for you if you want it but don't know how to do it, but I think you know.
--David Göthberg (talk) 00:16, 24 April 2009 (UTC)

DIY Glass Cleaner - Your Mirrors Never Looked Better - KatiesKottage
photo src: katieskottage.com


Not for use in articles?

Similar search templates such as {{Google custom}} and {{Search subpages link}} contain warnings (both in the templates and their documentation pages) against using search links from articles. Wikipedia editors added these warnings after this discussion:

  • Wikipedia:Templates for deletion/Log/2006 April 19#Template:Google

indicated the need to exclude such links from article space. To avoid a repetitive nomination for deletion, someone may want to add a similar warning to this template and its documentation. I can add the warnings if you like, but since other editors are actively developing this template I hesitate to jump in and possibly break something. --Teratornis (talk) 20:06, 29 April 2009 (UTC)


HACK #5: Alcohol + vinegar + water can double as a ~DIY~ Windex ...
photo src: www.pinterest.com


Check out Template:Search subpages link

I created {{Search subpages link}} to work similarly to {{Search link}} except to use the prefix: search modifier to search subpage trees. Many issues similar to the above discussions apply (the need to urlencode the arguments, etc.). It would be nicer to put the prefix: into the URL as a separate URL parameter rather than as a modifier to the search= parameter, to keep it out of the resulting search box, but I could not find a way to make that work. I don't think it would be practical to try combining {{Search subpages link}} with {{Search link}}, since the latter is all about searching on namespaces, whereas the former searches subpage trees which are always within one namespace. --Teratornis (talk) 20:12, 29 April 2009 (UTC)


We Spoke to Lil Windex, the Best Cleaning Product-Themed Rapper ...
photo src: noisey.vice.com


wildcard

Is *wild card" broke? OR is it not? -- CpiralCpiral 21:49, 23 February 2013 (UTC)


HACK #5: Alcohol + vinegar + water can double as a ~DIY~ Windex ...
photo src: www.pinterest.com


Who is Slovene?

Why does {{sl|wp:pagename}} return "(Slovene)": wp:pagename? -- CpiralCpiral 03:59, 5 March 2013 (UTC)

  • This template, {{sl}} to directly create general search links of any and all kinds
  • {{slre}} to sandbox and develop a general regexp search, then share its search link
  • {{tlre}} to sandbox and develop a template regexp search, then share its search link

For why these sandboxes may be important, see mw:Help:CirrusSearch's insource:/regexp/ searches. To learn more about MediaWiki's Elastica regexp extension, see the documentation for slr and slt.

-- CpiralCpiral 21:42, 8 July 2015 (UTC)


DIY Glass Cleaner - Your Mirrors Never Looked Better - KatiesKottage
photo src: katieskottage.com


Insource: doesn't work

The recommended search method, when using insource:/regexp/ (mw:Help:CirrusSearch#insource:) is to layer two or three filters, but it doesn't display:

{{search link|insource:val insource:/\{val/ insource:/u=/}} ->

-- CpiralCpiral 19:09, 11 June 2015 (UTC)

Oh, I forgot to use either 1= or {{=}} if I have an "=" in my search link. Thanks. -- CpiralCpiral 21:05, 2 July 2015 (UTC)

Insource:/regex/ without a link=label so that the text=query is the label, now works with square brackets. I edited the template after testing in the sandbox. I also edited the Advanced section of the documentation, redirected links, and removed unnecessary material, replacing it with other material. Now its more usable in its important place in the {{sl}}/{{slre}}/{{tlre}} scheme. -- CpiralCpiral 10:31, 12 July 2015 (UTC)


We Spoke to Lil Windex, the Best Cleaning Product-Themed Rapper ...
photo src: noisey.vice.com


Proposed change for blank input

currently, when the input is blank, this template returns "documentation" in the form of the following nowiki string: {{search link|search string|link text}}. I would like change this to return a link to the page [1] which would then allow the user to type in a search, without having it pre-filled. any comments? Frietjes (talk) 17:33, 2 December 2014 (UTC)

  • I support this. It makes sense that omitting the parameter would give a blank search box, and we already have the documentation page. --PC-XT+ 01:27, 7 December 2014 (UTC)
    • Done? Plastikspork -OE(talk) 02:47, 8 December 2014 (UTC)
      • yes, thank you. Frietjes (talk) 17:16, 8 December 2014 (UTC)

I must be missing something. See these tests:

  • {{sl|text=}} ->
  • {{sl}} ->
  • {{sl|}} ->
  • {{sl|text=0}} -> 0

-- CpiralCpiral 11:53, 12 July 2015 (UTC)


Make your own cleaning products | Homesteading | Pinterest ...
photo src: www.pinterest.com


Default search domain

The default search domain is now article space. This change does not effect an IP who clicks on a search link that has no ns specified. But for logged in users who have set there own user preference for there own search domain at Special:Search Advanced, it will have a beneficial effect.

When someone creates a search link without specifying a search domain, limiting a default search domain to article space is beneficial for two scenarios: 1) the creator was unfamiliar with the intricacies of search behaviors, assumed the default search domain was article space, and did not read Help:Searching or this Template:Search link documentation, and the link they created is activated by a user who has set there default search domain to all namespaces or to any other combination of namespaces: the benefit is that it no longer loads the search engine while unnecessarily violating the creators intentions. 2) The advanced user doesn't want to have to specify the namespaces every time, no matter what, because it is a 3rd parameter, and parameter two is often unneeded, so setting the 3rd parameter requires naming it, and that opens up the writing of the search link to easy errors.

When the search link is tested by an advanced creator, they will probably notice the effected search domain, and change it accordingly if needed. -- CpiralCpiral 06:43, 8 August 2015 (UTC)




Search within the pages within a WikiProject

Am trying to specifically search for a url within a specific Wikiproject. Any advice on how to do this? Doc James (talk · contribs · email) 18:09, 12 March 2017 (UTC)




Searching for strings that use specific capitalization

Is it possible to specify capitalization in search strings? Also, is it possible to exclude redirects from search results? (I'm a typo hunter, and have a couple of projects in mind. E.g., fixing instances of "Sig Sauer" (SIG Sauer) and "freemason".) --DocWatson42 (talk) 10:45, 6 May 2017 (UTC)

Source of the article : Wikipedia



EmoticonEmoticon

 

Start typing and press Enter to search