Re: total number of search results (prior to pagination)? Reply #15 – May 22, 2017, 07:33:41 pm Re: SearchThere are a handful of situations where two search <form>s are in the same page (search page), the quicksearch and the advanced search. I'm adding a conditional statement to remove the quicksearch when the advanced is loaded. I'm going to double-check all the semantic markup i've added to make sure everything is pointing to the right <form> under the right condition. Perhaps a little eye-candy for the user here, something like, idk, a faux-quicksearch <form> shrinking on the page until it disappears while the advanced-search <form> expands open. And of course the real quicksearch <form> will need a transformation reappearing when the user leaves the search-form page. idk it'd be kewl.
Re: total number of search results (prior to pagination)? Reply #16 – May 23, 2017, 07:02:38 pm Re: Search (update)updated again, i think this includes all instances of two search <form>sthemes/default/index.template.phpCode: [Select]if((($context['current_action'] == 'search') && (!isset($context['get_topics'][1]))) || (($context['current_action'] == 'search') && (isset($context['did_you_mean']) || empty($context['topics'])))){ }else{echo 'HTML for the quicksearch <form>';}
Re: total number of search results (prior to pagination)? Reply #17 – May 23, 2017, 08:39:41 pm I added a dimension of time to my search results. This is what a cached Search Results Page should look like, methinks. Of course, page 2 would have a different query date and so on, which means you could actually animate search-results browsing in real-time with this design. That's all just bonus though, i like this design because it implies the very nature of a search-results-page, that it is a dated-result that needs to be reevaluated for accuracy.
Re: total number of search results (prior to pagination)? Reply #18 – May 24, 2017, 04:47:21 pm My regex for the query-input pattern property isn't quite right, anyone care to take a hack at it?view hereCurrently, I have this, it says it ignores spaces, accepts input between two and 100 characters, but it also needs to say each space-delimited word must be two characters long.Code: [Select]/[^\s]{2,100}$/
Re: total number of search results (prior to pagination)? Reply #19 – May 24, 2017, 06:20:34 pm A bit more details may help, it may be it's quite late at night, but I'm not sure what you want to do, sorry...
Re: total number of search results (prior to pagination)? Reply #20 – May 24, 2017, 11:31:36 pm It's not critical or anything, just my perfectionism showing. I'll explain though, schema.org offers a feature to annotate <form> elements with constraints for the expected values. So the SearchAction's query property contains our search-term, and the query-input property contains the annotation. Here's the annotation thus far. Code: [Select]<span property="schema:query-input" typeof="schema:PropertyValueSpecification"> <meta property="schema:valueName" content="search" /> <meta property="schema:valuePattern" content="/[^\s]{2,100}$/" /> <meta property="schema:valueMinLength" content="2" /> <meta property="schema:valueMaxLength" content="100" /> <link property="schema:valueRequired" href="http://schema.org/True" /> <link property="schema:multipleValues" href="http://schema.org/True" /></span>Note the valuePattern property, this value is a regular expression pattern for "search=term". Currently, my regex states the <input name="search" /> accepts 2-100 characters and ignores spaces. For this to be more accurate, it should state that it accepts 2-100 characters, ignores spaces but each "word" needs to be at least 2 characters long.The corrected regex should match like so:t - no matchth 1 matchth r 1 match 1 failth re 2 matchesOn Second ThoughtNevermind, i was way too focused on that regex that i didn't consider the multipleValues=true accomplishes what i intended in concert with the existing regex. So i was right and thought i was wrong and now it's all nevermind.