| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard"> |
|---|
| 4 | <head> |
|---|
| 5 | <script type="text/javascript"> |
|---|
| 6 | /* <![CDATA[ */ |
|---|
| 7 | var user = <$mt:UserSessionState$>; |
|---|
| 8 | /* ]]> */ |
|---|
| 9 | </script> |
|---|
| 10 | <$mt:Include module="<__trans phrase="HTML Head">"$> |
|---|
| 11 | <title><$mt:BlogName encode_html="1"$>: <__trans phrase="Search Results"></title> |
|---|
| 12 | <mt:Ignore>Below Javascript adds ajax search capability</mt:Ignore> |
|---|
| 13 | <script type="text/javascript"> |
|---|
| 14 | /* <![CDATA[ */ |
|---|
| 15 | <mt:IfMoreResults> |
|---|
| 16 | function getResults(page) { |
|---|
| 17 | page = parseInt(page); |
|---|
| 18 | if (timer) window.clearTimeout(timer); |
|---|
| 19 | var xh = mtGetXmlHttp(); |
|---|
| 20 | if (!xh) return false; |
|---|
| 21 | var res = results[page]; |
|---|
| 22 | if (!res) return; |
|---|
| 23 | var url = res['next_url']; |
|---|
| 24 | if (!url) return; |
|---|
| 25 | |
|---|
| 26 | xh.open('GET', url + '&format=js', true); |
|---|
| 27 | xh.onreadystatechange = function() { |
|---|
| 28 | if ( xh.readyState == 4 ) { |
|---|
| 29 | if ( xh.status && ( xh.status != 200 ) ) { |
|---|
| 30 | // error - ignore |
|---|
| 31 | } else { |
|---|
| 32 | try { |
|---|
| 33 | var page_results = eval("(" + xh.responseText + ")"); |
|---|
| 34 | if ( page_results['error'] == null ) |
|---|
| 35 | results[page + 1] = page_results['result']; |
|---|
| 36 | } catch (e) { |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
| 39 | } |
|---|
| 40 | }; |
|---|
| 41 | xh.send(null); |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | function swapContent(direction) { |
|---|
| 45 | if ( direction == undefined ) direction = 1; |
|---|
| 46 | var page_span = document.getElementById('current-page'); |
|---|
| 47 | if (!page_span) return true; |
|---|
| 48 | var next_page = direction + parseInt(page_span.innerHTML); |
|---|
| 49 | var res = results[next_page]; |
|---|
| 50 | if (!res) return true; |
|---|
| 51 | var content = res['content']; |
|---|
| 52 | if (!content) return true; |
|---|
| 53 | var div = document.getElementById('search-results'); |
|---|
| 54 | if (!div) return true; |
|---|
| 55 | div.innerHTML = content; |
|---|
| 56 | timer = window.setTimeout("getResults(" + next_page + ")", 1*1000); |
|---|
| 57 | window.scroll(0, 0); |
|---|
| 58 | return false; |
|---|
| 59 | } |
|---|
| 60 | <mt:Else><mt:IfPreviousResults> |
|---|
| 61 | function swapContent(direction) { |
|---|
| 62 | return true; |
|---|
| 63 | }</mt:IfPreviousResults> |
|---|
| 64 | </mt:IfMoreResults> |
|---|
| 65 | /* ]]> */ |
|---|
| 66 | </script> |
|---|
| 67 | </head> |
|---|
| 68 | <body id="<$mt:BlogTemplateSetID$>" class="mt-search-results <$mt:Var name="page_layout"$>"> |
|---|
| 69 | <div id="container"> |
|---|
| 70 | <div id="container-inner"> |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | <$mt:Include module="<__trans phrase="Banner Header">"$> |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | <div id="content"> |
|---|
| 77 | <div id="content-inner"> |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | <div id="alpha"> |
|---|
| 81 | <div id="alpha-inner"> |
|---|
| 82 | |
|---|
| 83 | <mt:Ignore><!-- |
|---|
| 84 | Below is the block to show search results. |
|---|
| 85 | This makes an independent block to support |
|---|
| 86 | Ajax-based background retrieval of the next search results. |
|---|
| 87 | --></mt:Ignore> |
|---|
| 88 | <mt:SetVarTemplate id="search_results" name="search_results"> |
|---|
| 89 | <mt:SearchResults> |
|---|
| 90 | <mt:SearchResultsHeader> |
|---|
| 91 | <div id="search-results"> |
|---|
| 92 | <span id="current-page" class="hidden"><$mt:CurrentPage$></span> |
|---|
| 93 | <h1 id="page-title" class="search-results-header"> |
|---|
| 94 | <mt:IfStraightSearch> |
|---|
| 95 | <__trans phrase="Results matching “[_1]”" params="<$mt:SearchString$>"> |
|---|
| 96 | </mt:IfStraightSearch> |
|---|
| 97 | <mt:IfTagSearch> |
|---|
| 98 | <__trans phrase="Results tagged “[_1]”" params="<$mt:SearchString$>"> |
|---|
| 99 | </mt:IfTagSearch> |
|---|
| 100 | </h1> |
|---|
| 101 | <div class="search-results-container autopagerize_page_element"> |
|---|
| 102 | </mt:SearchResultsHeader> |
|---|
| 103 | <$mt:Include module="<__trans phrase="Entry Summary">" hide_counts="1"$> |
|---|
| 104 | <mt:SearchResultsFooter> |
|---|
| 105 | </div><div class="autopagerize_insert_before"></div> |
|---|
| 106 | |
|---|
| 107 | <mt:Ignore><!-- Used with the ajax search capability of the new search class --></mt:Ignore> |
|---|
| 108 | <div class="content-nav"> |
|---|
| 109 | <mt:IfPreviousResults><a href="<$mt:PreviousLink$>" rel="prev" onclick="return swapContent(-1);">< <__trans phrase="Previous"></a> </mt:IfPreviousResults><mt:PagerBlock><mt:IfCurrentPage><$mt:Var name="__value__"$><mt:Else><a href="<$mt:PagerLink$>"><$mt:Var name="__value__"$></a></mt:IfCurrentPage><mt:Unless name="__last__"> </mt:Unless></mt:PagerBlock><mt:IfMoreResults> <a href="<$mt:NextLink$>" rel="next" onclick="return swapContent();"><__trans phrase="Next"> ></a></mt:IfMoreResults> |
|---|
| 110 | </div> |
|---|
| 111 | </div> |
|---|
| 112 | </mt:SearchResultsFooter> |
|---|
| 113 | </mt:SearchResults> |
|---|
| 114 | </mt:SetVarTemplate> |
|---|
| 115 | <mt:Ignore><!-- Display search results constructed in the block above --></mt:Ignore> |
|---|
| 116 | <$mt:Var name="search_results"$> |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | <mt:Ignore><!-- Display no results message --></mt:Ignore> |
|---|
| 120 | <mt:NoSearchResults> |
|---|
| 121 | <h1 id="page-title" class="search-results-header"> |
|---|
| 122 | <mt:IfStraightSearch> |
|---|
| 123 | <__trans phrase="Results matching “[_1]”" params="<$mt:SearchString$>"> |
|---|
| 124 | </mt:IfStraightSearch> |
|---|
| 125 | <mt:IfTagSearch> |
|---|
| 126 | <__trans phrase="Results tagged “[_1]”" params="<$mt:SearchString$>"> |
|---|
| 127 | </mt:IfTagSearch> |
|---|
| 128 | </h1> |
|---|
| 129 | <p><__trans phrase="No results found for “[_1]”." params="<$mt:SearchString$>"></p> |
|---|
| 130 | </mt:NoSearchResults> |
|---|
| 131 | |
|---|
| 132 | |
|---|
| 133 | <mt:Ignore><!-- Display instructions for searching if search script was accessed without a query --></mt:Ignore> |
|---|
| 134 | <mt:NoSearch> |
|---|
| 135 | <h1 id="page-title" class="search-results-header"><__trans phrase="Instructions"></h1> |
|---|
| 136 | <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> |
|---|
| 137 | <blockquote> |
|---|
| 138 | <p><code>"<__trans phrase="movable type">"</code></p> |
|---|
| 139 | </blockquote> |
|---|
| 140 | <p><__trans phrase="The search engine also supports AND, OR, and NOT keywords to specify boolean expressions:"></p> |
|---|
| 141 | <blockquote> |
|---|
| 142 | <p><code><__trans phrase="personal OR publishing"></code></p> |
|---|
| 143 | <p><code><__trans phrase="publishing NOT personal"></code></p> |
|---|
| 144 | </blockquote> |
|---|
| 145 | </mt:NoSearch> |
|---|
| 146 | |
|---|
| 147 | <mt:Ignore><!-- Used with the ajax search capability of the new search class --></mt:Ignore> |
|---|
| 148 | <mt:IfMoreResults> |
|---|
| 149 | <script type="text/javascript"> |
|---|
| 150 | <!-- |
|---|
| 151 | var div = document.getElementById('search-results'); |
|---|
| 152 | var results = { |
|---|
| 153 | '<$mt:CurrentPage$>': { |
|---|
| 154 | 'content': div.innerHTML, |
|---|
| 155 | 'next_url': '<$mt:NextLink$>' |
|---|
| 156 | } |
|---|
| 157 | }; |
|---|
| 158 | var timer = window.setTimeout("getResults(" + <$mt:CurrentPage$> + ")", 1*1000); |
|---|
| 159 | //--> |
|---|
| 160 | </script> |
|---|
| 161 | </mt:IfMoreResults> |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | </div> |
|---|
| 165 | </div> |
|---|
| 166 | |
|---|
| 167 | <$mt:Include module="<__trans phrase="Sidebar">"$> |
|---|
| 168 | |
|---|
| 169 | |
|---|
| 170 | </div> |
|---|
| 171 | </div> |
|---|
| 172 | |
|---|
| 173 | |
|---|
| 174 | <$mt:Include module="<__trans phrase="Banner Footer">"$> |
|---|
| 175 | |
|---|
| 176 | |
|---|
| 177 | </div> |
|---|
| 178 | </div> |
|---|
| 179 | </body> |
|---|
| 180 | </html> |
|---|