1

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

Using PunBB since 2006 at Forex Forum

2

Re: How to add Search Box in Header

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!

3

Re: How to add Search Box in Header

Thank you. Excellent answer.

Using PunBB since 2006 at Forex Forum