The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How to add Search Box?

View previous topic View next topic Go down

Solved How to add Search Box?

Post by monarchco on April 19th 2015, 12:25 am

Technical Details


Forum version : phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : http://i.imgur.com/U1zNZ9J.png
Who the problem concerns : All members
Forum link : http://www.VFGaming.net

Description of problem

I'd like to know how to add a search box to my forum that is visible on all threads and sections?
I'd like to have it where the blue box I put on the image is. Right above the page numbers.

How would I add this into my forum?

I'd like to have it look like the one used on this forum:

except with red( #FF0000 ) instead of the blue.


Last edited by monarchco on April 19th 2015, 6:45 pm; edited 1 time in total

monarchco
New Member

Posts : 9
Reputation : 1
Language : English

http://www.VFGaming.net

Back to top Go down

Solved Re: How to add Search Box?

Post by Darkel on April 19th 2015, 6:06 am

Hi @monarchco,

Add this to your CSS stylesheet,

Admin Panel >> Colors >> CSS stylesheet:

Code:
#search-box input.search { transition:750ms }
#search-box input.search:focus { width:250px !important }

Darkel
Hyperactive

Male Posts : 2186
Reputation : 272
Language : English, Tagalog
Location : Philippines

Back to top Go down

Solved Re: How to add Search Box?

Post by monarchco on April 19th 2015, 7:16 am

I added it but I see no change.

I even double checked to make sure it was added.

monarchco
New Member

Posts : 9
Reputation : 1
Language : English

http://www.VFGaming.net

Back to top Go down

Solved Re: How to add Search Box?

Post by Darkel on April 19th 2015, 12:19 pm

Try this code,replace what I gave you with this :

Code:
#search-box input#keywords {
  -webkit-transition:750ms;
    -moz-transition:750ms;
      -o-transition:750ms;
          transition:750ms;
}
#search-box input#keywords:focus { width:250px }

Darkel
Hyperactive

Male Posts : 2186
Reputation : 272
Language : English, Tagalog
Location : Philippines

Back to top Go down

Solved Re: How to add Search Box?

Post by Ange Tuteur on April 19th 2015, 3:16 pm

Hi,

By default, phpbb2 does not have a search box. ( the version you see here is phpbb3 ) So, you'll need to make some modifications to the templates. Go to Administration Panel > Display > Templates > General > overall_header Edit

Find :
Code:
            <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}">
               <tr>
                  <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
               </tr>
            </table>

Replace by :
Code:
            <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}">
               <tr>
                  <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
               </tr>
                                        <tr>
                                          <td align="right">
         <!-- BEGIN switch_search_box -->
         <div id="search-box">
            <form method="get" action="{ACTION_SEARCH}" id="search">
               <p class="nomargin"><input type="text" name="search_keywords" id="keywords" maxlength="128" class="inputbox search" value="{L_SEARCH}..." onclick="if (this.value == '{L_SEARCH}...') this.value = '';" onblur="if (this.value == '') this.value = '{L_SEARCH}...';" />
               {JS_SESSION_ID_INPUT}
               <input class="button2" type="submit" value="{L_SEARCH}" /></p>
            </form>
         </div>
         <!-- END switch_search_box -->
                                          </td>
                                        </tr>
            </table>

save and publish. Add


Note : You must be logged into the founder account to modify the templates.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to add Search Box?

Post by rockzkie on April 19th 2015, 3:26 pm

does this work on invision?

rockzkie
Forumember

Male Posts : 58
Reputation : 3
Language : Tagalog & English (a little bit)
Location : Philippines

http://darkgamers.forumtl.com

Back to top Go down

Solved Re: How to add Search Box?

Post by monarchco on April 19th 2015, 5:52 pm

Cool thanks @'Ange Tuteur'

How can I get it to align to the right side of the page?

right above:
"View posts since last visit
View your posts
View unanswered posts"


monarchco
New Member

Posts : 9
Reputation : 1
Language : English

http://www.VFGaming.net

Back to top Go down

Solved Re: How to add Search Box?

Post by Ange Tuteur on April 19th 2015, 6:20 pm

@rockzkie wrote:does this work on invision?
Please open your own topic.

Thanks. Smile

@monarchco wrote:Cool thanks @'Ange Tuteur'

How can I get it to align to the right side of the page?

right above:
"View posts since last visit
View your posts
View unanswered posts"

No problem. Smile

I forgot about that. Reopen the overall_header and find the this part of the table :
Code:
<table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}">

adding width="100%" should fix it.
Code:
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}">

Then just save and publish your template. Wink

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to add Search Box?

Post by monarchco on April 19th 2015, 6:45 pm

Thanks Smile Fixed it.

monarchco
New Member

Posts : 9
Reputation : 1
Language : English

http://www.VFGaming.net

Back to top Go down

Solved Re: How to add Search Box?

Post by Ange Tuteur on April 19th 2015, 7:33 pm

You're welcome Mr. Green

Topic archived

Have a nice day. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum