Difference between revisions of "Template:Find"

From Organic Design wiki
(fixing search)
 
(89 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#form:name=findForm|class=find|
+
{{#form:name=findForm|class=find|action=/wiki/index.php|
{{#input:name=title|type=hidden}}
+
<h5>Find articles [[Find articles|(more...)]]</h5>
{{#input:
+
{{#input:name=content|id=query|type=hidden}}
name   = findInput
+
{{#input:name=search|id=s|type=hidden}}
|type   = text
+
{{#input:name=q|id=q|type=hidden}}
|value   = Title or DPL-query
+
{{#input:name=pagename|type=hidden|value=Search results}}
|onClick = findForm.findInput.value = '';
+
{{#input:name=go|id=input|type=text|value={{#request:go}}}}
}}
 
 
{{#input:
 
{{#input:
 
type    = image
 
type    = image
|src    = /www/images/1/1b/Go-icon.png
+
|src    = /files/1/1b/Go-icon.png
 
|alt    = Title or DPL-query
 
|alt    = Title or DPL-query
|title  = Title or DPL-query
+
|onClick = i=document.getElementById('input').value;s=document.getElementById('s');s.parentNode.removeChild(s);if (0>i.indexOf('=')) i='titlematch='+i;document.getElementById('query').setAttribute('value','{'+'{#dpl:'+i+'}'+'}');
|onClick = if (findForm.findInput.indexOf('=')<0) findForm.title = findForm.findInput;
+
}}{{#input:
            else findForm.content = '{'+'{#dpl:'+findForm.findInput+'}'+'}';
 
}}
 
{{#input:
 
 
type    = image
 
type    = image
|src    = /www/images/1/14/Search-icon.png
+
|src    = /files/1/14/Search-icon.png
 
|alt    = Full text search
 
|alt    = Full text search
|title  = Full text search
+
|onClick = findForm.action='/Special:Search';document.getElementById('s').setAttribute('value',document.getElementById('input').value);
|onClick = (findForm.action='/wiki/index.php') && (findForm.fulltext = findForm.findInput) && (findForm.title = 'Special:Search')
+
}}{{#input:
}}
 
{{#input:
 
 
type    = image
 
type    = image
|src    = /www/images/4/4f/Favicon_pedia.png
+
|src    = /files/4/4f/Favicon_pedia.png
 
|alt    = Wikipedia
 
|alt    = Wikipedia
|title  = Wikipedia
+
|onClick = findForm.action='http'+'://en.wikipedia.org/wiki/Special:Search';document.getElementById('s').setAttribute('value',document.getElementById('input').value);
|onClick = (findForm.action='http://en.wikipedia.org/wiki/index.php') && (findForm.title = findForm.findInput)
+
}}{{#input:
}}
 
{{#input:
 
 
type    = image
 
type    = image
|src    = /www/images/3/3a/Favicon_google.png
+
|src    = /files/3/3a/Favicon_google.png
 
|alt    = Google
 
|alt    = Google
|title  = Google
+
|onClick = findForm.action='http'+'://google.com/search';document.getElementById('q').setAttribute('value',document.getElementById('input').value);
|onClick = (findForm.action='http://www.google.com/search') && (findForm.q = findForm.findInput)
 
 
}}
 
}}
 
}}
 
}}

Latest revision as of 22:11, 6 October 2007

{{#form:name=findForm|class=find|action=/wiki/index.php|

Find articles (more...)

{{#input:name=content|id=query|type=hidden}} {{#input:name=search|id=s|type=hidden}} {{#input:name=q|id=q|type=hidden}} {{#input:name=pagename|type=hidden|value=Search results}} {{#input:name=go|id=input|type=text|value={{#request:go}}}} {{#input: type = image |src = /files/1/1b/Go-icon.png |alt = Title or DPL-query |onClick = i=document.getElementById('input').value;s=document.getElementById('s');s.parentNode.removeChild(s);if (0>i.indexOf('=')) i='titlematch='+i;document.getElementById('query').setAttribute('value','{'+'{#dpl:'+i+'}'+'}'); }}{{#input: type = image |src = /files/1/14/Search-icon.png |alt = Full text search |onClick = findForm.action='/Special:Search';document.getElementById('s').setAttribute('value',document.getElementById('input').value); }}{{#input: type = image |src = /files/4/4f/Favicon_pedia.png |alt = Wikipedia |onClick = findForm.action='http'+'://en.wikipedia.org/wiki/Special:Search';document.getElementById('s').setAttribute('value',document.getElementById('input').value); }}{{#input: type = image |src = /files/3/3a/Favicon_google.png |alt = Google |onClick = findForm.action='http'+'://google.com/search';document.getElementById('q').setAttribute('value',document.getElementById('input').value); }} }}