| 2 | | <MTSetVarBlock name="page_title"><__trans phrase="Search Results"></MTSetVarBlock> |
| 3 | | <MTSetVarBlock name="title"><$MTBlogName encode_html="1"$>: <$MTVar name="page_title"$></MTSetVarBlock> |
| | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| | 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | 4 | <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard"> |
| | 5 | <head> |
| | 6 | <title><$MTBlogName encode_html="1"$>: <__trans phrase="Search Results"></title> |
| | 7 | <$mt:include module="<__trans phrase="HTML Head">"$> |
| | 8 | <MTIgnore>Below Javascript adds ajax search capability</MTIgnore> |
| | 9 | <script type="text/javascript"> |
| | 10 | <!-- |
| | 11 | <MTIfMoreResults> |
| | 12 | function getXmlHttp() { |
| | 13 | if ( !window.XMLHttpRequest ) { |
| | 14 | window.XMLHttpRequest = function() { |
| | 15 | var types = [ |
| | 16 | "Microsoft.XMLHTTP", |
| | 17 | "MSXML2.XMLHTTP.5.0", |
| | 18 | "MSXML2.XMLHTTP.4.0", |
| | 19 | "MSXML2.XMLHTTP.3.0", |
| | 20 | "MSXML2.XMLHTTP" |
| | 21 | ]; |
| 34 | | function getResults(page) { |
| 35 | | page = parseInt(page); |
| 36 | | if (timer) window.clearTimeout(timer); |
| 37 | | var xh = getXmlHttp(); |
| 38 | | if (!xh) return false; |
| 39 | | var res = results[page]; |
| 40 | | if (!res) return; |
| 41 | | var url = res['next_url']; |
| 42 | | if (!url) return; |
| 43 | | |
| 44 | | xh.open('GET', url + '&format=js', true); |
| 45 | | xh.onreadystatechange = function() { |
| 46 | | if ( xh.readyState == 4 ) { |
| 47 | | if ( xh.status && ( xh.status != 200 ) ) { |
| 48 | | // error - ignore |
| 49 | | } else { |
| 50 | | try { |
| 51 | | var page_results = eval("(" + xh.responseText + ")"); |
| 52 | | if ( page_results['error'] == null ) |
| 53 | | results[page + 1] = page_results['result']; |
| 54 | | } catch (e) { |
| | 46 | xh.open('GET', url + '&format=js', true); |
| | 47 | xh.onreadystatechange = function() { |
| | 48 | if ( xh.readyState == 4 ) { |
| | 49 | if ( xh.status && ( xh.status != 200 ) ) { |
| | 50 | // error - ignore |
| | 51 | } else { |
| | 52 | try { |
| | 53 | var page_results = eval("(" + xh.responseText + ")"); |
| | 54 | if ( page_results['error'] == null ) |
| | 55 | results[page + 1] = page_results['result']; |
| | 56 | } catch (e) { |
| | 57 | } |
| 62 | | function swapContent(direction) { |
| 63 | | if ( direction == undefined ) direction = 1; |
| 64 | | var page_span = document.getElementById('current-page'); |
| 65 | | if (!page_span) return true; |
| 66 | | var next_page = direction + parseInt(page_span.innerHTML); |
| 67 | | var res = results[next_page]; |
| 68 | | if (!res) return true; |
| 69 | | var content = res['content']; |
| 70 | | if (!content) return true; |
| 71 | | var div = document.getElementById('search-results'); |
| 72 | | if (!div) return true; |
| 73 | | div.innerHTML = content; |
| 74 | | timer = window.setTimeout("getResults(" + next_page + ")", 1*1000); |
| 75 | | window.scroll(0, 0); |
| 76 | | return false; |
| 77 | | } |
| 78 | | <MTElse><MTIfPreviousResults> |
| 79 | | function swapContent(direction) { |
| 80 | | return true; |
| 81 | | }</MTIfPreviousResults> |
| 82 | | </MTIfMoreResults> |
| 83 | | //--> |
| 84 | | </script> |
| 85 | | </MTSetVarBlock> |
| | 64 | function swapContent(direction) { |
| | 65 | if ( direction == undefined ) direction = 1; |
| | 66 | var page_span = document.getElementById('current-page'); |
| | 67 | if (!page_span) return true; |
| | 68 | var next_page = direction + parseInt(page_span.innerHTML); |
| | 69 | var res = results[next_page]; |
| | 70 | if (!res) return true; |
| | 71 | var content = res['content']; |
| | 72 | if (!content) return true; |
| | 73 | var div = document.getElementById('search-results'); |
| | 74 | if (!div) return true; |
| | 75 | div.innerHTML = content; |
| | 76 | timer = window.setTimeout("getResults(" + next_page + ")", 1*1000); |
| | 77 | window.scroll(0, 0); |
| | 78 | return false; |
| | 79 | } |
| | 80 | <MTElse><MTIfPreviousResults> |
| | 81 | function swapContent(direction) { |
| | 82 | return true; |
| | 83 | }</MTIfPreviousResults> |
| | 84 | </MTIfMoreResults> |
| | 85 | //--> |
| | 86 | </script> |
| | 87 | </head> |
| | 88 | <body class="mt-search-results <$MTVar name="page_layout"$>"> |
| | 89 | <div id="container"> |
| | 90 | <div id="container-inner"> |
| 105 | | </div><div class="autopagerize_insert_before"></div> |
| 106 | | <MTIgnore>Used with the ajax search capability of the new search class</MTIgnore> |
| 107 | | <div class="content-nav"> |
| 108 | | <MTIfPreviousResults><a href="<MTPreviousLink>" rel="prev" onclick="return swapContent(-1);">< <__trans phrase="Previous"></a> </MTIfPreviousResults><MTPagerBlock><MTIfCurrentPage><MTVar name="__value__"><MTElse><a href="<MTPagerLink>"><MTVar name="__value__"></a></MTIfCurrentPage><mt:unless name="__last__"> </mt:unless></MTPagerBlock><MTIfMoreResults> <a href="<MTNextLink>" rel="next" onclick="return swapContent();"><__trans phrase="Next"> ></a></MTIfMoreResults> |
| 109 | | </div> |
| 110 | | </div> |
| | 121 | </div><div class="autopagerize_insert_before"></div> |
| | 122 | |
| | 123 | <MTIgnore><!-- Used with the ajax search capability of the new search class --></MTIgnore> |
| | 124 | <div class="content-nav"> |
| | 125 | <MTIfPreviousResults><a href="<MTPreviousLink>" rel="prev" onclick="return swapContent(-1);">< <__trans phrase="Previous"></a> </MTIfPreviousResults><MTPagerBlock><MTIfCurrentPage><MTVar name="__value__"><MTElse><a href="<MTPagerLink>"><MTVar name="__value__"></a></MTIfCurrentPage><mt:unless name="__last__"> </mt:unless></MTPagerBlock><MTIfMoreResults> <a href="<MTNextLink>" rel="next" onclick="return swapContent();"><__trans phrase="Next"> ></a></MTIfMoreResults> |
| | 126 | </div> |
| | 127 | </div> |
| 127 | | <h1 id="page-title" class="search-results-header"><__trans phrase="Instructions"></h1> |
| 128 | | <p><__trans phrase="By default, this search engine looks for all words in any order. To search for an exact phrase, enclose the phrase in quotes:"></p> |
| 129 | | <blockquote> |
| 130 | | <p><code>"<__trans phrase="movable type">"</code></p> |
| 131 | | </blockquote> |
| 132 | | <p><__trans phrase="The search engine also supports AND, OR, and NOT keywords to specify boolean expressions:"></p> |
| 133 | | <blockquote> |
| 134 | | <p><code><__trans phrase="personal OR publishing"></code></p> |
| 135 | | <p><code><__trans phrase="publishing NOT personal"></code></p> |
| 136 | | </blockquote> |
| | 148 | <h1 id="page-title" class="search-results-header"><__trans phrase="Instructions"></h1> |
| | 149 | <p><__trans phrase="By default, this search engine looks for all words in any order. To search for an exact phrase, enclose the phrase in quotes:"></p> |
| | 150 | <blockquote> |
| | 151 | <p><code>"<__trans phrase="movable type">"</code></p> |
| | 152 | </blockquote> |
| | 153 | <p><__trans phrase="The search engine also supports AND, OR, and NOT keywords to specify boolean expressions:"></p> |
| | 154 | <blockquote> |
| | 155 | <p><code><__trans phrase="personal OR publishing"></code></p> |
| | 156 | <p><code><__trans phrase="publishing NOT personal"></code></p> |
| | 157 | </blockquote> |