Topic: How to add Search Box in Header
Hello,
Do you have any examples of how to add a search box in forum header?
In what format to refer to search.php in order to show search results?
Thank you
You are not logged in. Please login or register.
PunBB Forums → Discussions → How to add Search Box in Header
Hello,
Do you have any examples of how to add a search box in forum header?
In what format to refer to search.php in order to show search results?
Thank you
create file search_form.php with this code:
<div style="float:right">
<form id="search_form" class="frm-form" method="get" accept-charset="utf-8" action="<?php echo forum_link($forum_url['search']) ?>">
<div class="hidden">
<input type="hidden" name="action" value="search" />
</div>
<div class="sf-box text">
<input type="text" id="fld1" name="keywords" size="10" maxlength="100" />
<input type="submit" name="search" value="<?php echo $lang_common['Search'] ?>" />
</div>
</form>
</div>
place file into include/user/
open include/template/main.tpl (or styled tpl in style folder) and add after:
<!-- forum_skip -->
this:
<!-- forum_include "search_form.php" -->
profit!
Thank you. Excellent answer.
PunBB Forums → Discussions → How to add Search Box in Header
Powered by PunBB, supported by Informer Technologies, Inc.