/** * Print the search form * * If the first parameter is given a div with the ID 'qsearch_out' will * be added which instructs the ajax pagequicksearch to kick in and place * its output into this div. The second parameter controls the propritary * attribute autocomplete. If set to false this attribute will be set with an * value of "off" to instruct the browser to disable it's own built in * autocompletion feature (MSIE and Firefox) * */ function amdy_tpl_searchform($ajax = true, $autocomplete = true) { global $lang; global $ACT; global $QUERY; // don't print the search form if search action has been disabled if (!actionOk('search')) { return false; } print '<form action="' . wl() . '" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no">'; print '<input type="hidden" name="do" value="search" />'; print '<input type="text" '; if ($ACT == 'search') { print 'value="' . htmlspecialchars($QUERY) . '" '; } if (!$autocomplete) { print 'autocomplete="off" '; } print 'id="qsearch__in" accesskey="f" name="id" class="edit" title="[F]" />'; print '<input type="submit" value="' . $lang['btn_search'] . '" class="button" title="' . $lang['btn_search'] . '" />'; if ($ajax) { print '<div id="qsearch__out" class="ajax_qsearch JSpopup"></div>'; } print '</div></form>'; return true; }
function _tpl_output_search_bar() { //Modified from the official tpl_searchform function. global $lang; global $ACT; global $QUERY; // don't print the search form if search action has been disabled if (!actionOk('search')) { return false; } print '<form action="' . wl() . '" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no">'; print '<input type="hidden" name="do" value="search" />'; print '<input type="text" placeholder="' . $lang['btn_search'] . '" '; if ($ACT == 'search') { print 'value="' . htmlspecialchars($QUERY) . '" '; } if (!$autocomplete) { print 'autocomplete="off" '; } print 'id="qsearch__in" accesskey="f" name="id" class="edit" title="[F]" />'; print '<button type="submit" value="" class="btn btn-default" title="' . $lang['btn_search'] . '">'; print '<i class="glyphicon glyphicon-search"></i></button>'; if ($ajax) { print '<div id="qsearch__out" class="ajax_qsearch JSpopup"></div>'; } print '</div></form>'; return true; }