Difference between revisions of "Template:Find sources multi/linkinfo"
Jump to navigation
Jump to search
Template documentation
imported>Mr. Stradivarius (add description of Template:Find sources multi/gnewspapers) |
imported>Elegie (Use HTTPS for link to Thibbs' custom Google Search) |
||
| Line 198: | Line 198: | ||
| alias3 = | | alias3 = | ||
| alias4 = | | alias4 = | ||
| − | | t_description = This template provides a search link to [[User:Thibbs|Thibbs]]' [ | + | | t_description = This template provides a search link to [[User:Thibbs|Thibbs]]' [https://www.google.com/cse/home?cx=003516479746865699832:leawcwkqifq Google RS], a [[custom Google search engine]] that limits the search to sites listed in [[Wikipedia:WikiProject Video games/Sources]]. |
| se_description = [[User:Thibbs|Thibbs]]' [http://www.google.com/cse/home?cx=003516479746865699832:leawcwkqifq Google RS], a [[custom Google search engine]] that limits the search to sites listed in [[Wikipedia:WikiProject Video games/Sources]]. | | se_description = [[User:Thibbs|Thibbs]]' [http://www.google.com/cse/home?cx=003516479746865699832:leawcwkqifq Google RS], a [[custom Google search engine]] that limits the search to sites listed in [[Wikipedia:WikiProject Video games/Sources]]. | ||
| shortcut1 = findvgrs | | shortcut1 = findvgrs | ||
Latest revision as of 23:07, 9 September 2016
This template stores data about the various search link subtemplates of {{find sources multi}}.
Usage
The template takes two positional parameters.
- The first positional parameter specifies the subtemplate for which data is requested. It may take the value of the subpage name of the link template (e.g.
gnews), a value of linkn (link1,link2, etc.), or its alias ln (l1,l2, etc.). - The second positional parameter specifies what type of data is requested. It can take the following values:
code- The main link code. This is the same as the subpage name of the link template.alias1- An alias for the main link code. The subpage of Template:Find sources multi with this value is a redirect to the link template.alias2- Another alias for the main link code.alias3- A third alias for the main link code.alias4- A fourth alias for the main link code.t_description- A short description of the template.se_description- A short description of the search engine that the template uses.shortcut1- A template shortcut for the link template.shortcut2- A second template shortcut for the link template.shortcut3- A third template shortcut for the link template.notes- Notes about of the link template.
The template will only output data if the following three conditions are all true:
- The first positional parameter has a valid value.
- The second positional parameter has a valid value.
- The data field specified by the first and second positional parameters is not empty.
Otherwise, the template will return a null value.
Examples
- Example 1
{{find sources multi/linkinfo|link1}}- produces:
- Example 2
{{find sources multi/linkinfo|link1|code}}- produces:
- g
- Example 3
{{find sources multi/linkinfo|ddg|code}}- produces:
- ddg
- Example 4
{{find sources multi/linkinfo|link1|t_description}}- produces:
- This template provides a search link to Google to help find sources for articles.
- Example 5
{{find sources multi/linkinfo|ddg|se_description}}- produces:
- DuckDuckGo, a search engine that uses information from crowd-sourced websites (such as Wikipedia) to provide its results.
- Example 6
{{find sources multi/linkinfo|link1|nonexistentvalue}}- produces:
- Example 7
{{find sources multi/linkinfo|nonexistentvalue|code}}- produces:
Adding new entries
Adding new entries should be fairly self-explanatory - just keep the format the same as previous entries. However, if you are adding link number 21, please contact User:Mr. Stradivarius (or if he's not around, someone who knows advanced template coding) as some changes will need to be made to the template's back-end before your new data can be used.
| Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |