Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2009, 04:31 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default second searchbox in navbar

S O L V E D


Hello together,

after some time absense from the vB-code (obviusly too long absense ) I am working now a little bit on the vB4.

What I want to do is to place a second search box in the navbar, to do direct from there membersearch. (See attached screenshot, that's how i want it).

I tried a little bit this and that, but nothing really works. Don't get me wrong, I don't ask for a complete coded solution, but maybe someone can "bring me on the way" and give me some hints. (The searchobx itself is working, but the position is not correct)

Thanks for your help.


Best regards

J?rg



Edit

I attached a second screenshot, where you can see, what my best result was. The problem is, I can't get the second searchbox left of the original search-box. Currently I add the code for "my" searchbox here:

Template "navbar"

above

Code:
<div id="globalsearch">

Edit 2

O.k., leave me alone with the problem and I will solve it

No, seriously, I nearly made it. After creating additionaly CSS-entries, it's working. The only thing is, that the position is now in a fixed distance to the last menu-button. I would like it more, to have it fixed with a special distance to the right searchbox. But that's a small detail without priority.

If someone is interested, I can post how to make the change.
Attached Images
File Type: jpg Searchbox.jpg (18.9 KB, 0 views)
File Type: jpg overlaying_searchbox.jpg (10.6 KB, 0 views)
Reply With Quote
  #2  
Old 11-16-2009, 09:21 PM
milsirhc's Avatar
milsirhc milsirhc is offline
 
Join Date: Jan 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm interested!
Reply With Quote
  #3  
Old 11-17-2009, 07:17 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by milsirhc View Post
I'm interested!

O.k., here we go.

In template "navbar"

find

Code:
<div id="globalsearch">
add above

Code:
 <div id="globalsearchmbr">
  <form action="memberlist.php?do=process" method="post" id="navbar_member_search">
   <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
   <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
   <input type="hidden" name="do" value="getall" />
   <span class="textboxcontainer"><span><input type="text" value="" name="ausername" class="textbox" /></span></span>
   <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="submit" onclick="document.getElementById('navbar_member_search').submit;" /></span></span>
  </form>
  <ul class="navbar_advanced_search">
   <li><a href="memberlist.php?{vb:raw session.sessionurl}do=search">{vb:rawphrase advanced_search}</a></li>
  </ul>
 </div>

In template "vbulletin-chrome.css"

find

Code:
#globalsearch {
add above

Code:
#globalsearchmbr {
 position:absolute;
 width:180px;
 left:550px;
 {vb:stylevar right}: {vb:math {vb:stylevar padding}*2};
 bottom: 0;
 float: {vb:stylevar right};
 clear: {vb:stylevar left};
 text-align:{vb:stylevar right};
 line-height: 1.0em;
 display:block;
}
 
#globalsearchmbr .textboxcontainer {
 height: {vb:stylevar navbar_tab_size.height}px;
 border-{vb:stylevar left}:{vb:stylevar navbar_tab_border};
 display:inline-block;
 float: {vb:stylevar left};
 text-align:center;
}
#globalsearchmbr .textboxcontainer span {
 border-top: {vb:stylevar navbar_tab_bevel};
 border-{vb:stylevar left}: {vb:stylevar navbar_tab_bevel};
 display: inline-block;
 height: {vb:math {vb:stylevar navbar_tab_size.height}-4}px;
 padding-{vb:stylevar left}: 2px;
 padding-{vb:stylevar right}: 2px;
 padding-top: 3px;
 margin-bottom: 1px;
 width: 147px;
        _width:140px; /* ie6 hack */
}
#globalsearchmbr input.textbox {
 width: 120px;
}
#toplinks form input.loginbutton {
 font-size: {vb:math {vb:stylevar font.fontSize}-2}px;
 padding: 0 {vb:math {vb:stylevar padding}/2};
 background-color:  {vb:stylevar toplinks_input_login_backgroundColor};
 border:solid 1px {vb:stylevar heavy_border.borderColor};
}
#globalsearchmbr .buttoncontainer {
 height: {vb:stylevar navbar_tab_size.height}px;
 border-{vb:stylevar left}:{vb:stylevar navbar_tab_border};
 display:inline-block;
 border-{vb:stylevar right}:{vb:stylevar navbar_tab_border};
 width: 25px;
 overflow: hidden;
 float: {vb:stylevar right};
}
#globalsearchmbr .buttoncontainer span{
 border-top: {vb:stylevar navbar_tab_bevel};
 border-{vb:stylevar left}: {vb:stylevar navbar_tab_bevel};
 height: {vb:math {vb:stylevar navbar_tab_size.height}-3}px;
 padding-{vb:stylevar left}: 4px;
 padding-top: {vb:math {vb:math {vb:stylevar navbar_tab_size.height}-21}/2}px;
 display:inline-block;
}
#globalsearchmbr .searchbutton {
 border: 0;
 padding: 0;
 width: 22px;
 margin-top: -2px;
 margin-{vb:stylevar left}: -2px;
}

To change the position of the new box change more left or right, change the parameter width here:

Code:
#globalsearchmbr {
 position:absolute;
 width:180px;





Known issues:
  • New searchbox is fixed to the left menu-buttons, not to the right searchbox. That has the effect, when you resize your browser-window and make it very small, there is a point that the original searchbox and the new searchbox are overlayed.
  • In the CMS the white input-box for member-search is bigger (some pixels higher) than in the forum. But that's probably a beta-problem of vb4 and will disappear when we come closer to vb4 gold
Suggestions how to fix the box relative to the right searchbox are welcome


J?rg
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03957 seconds
  • Memory Usage 2,214KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (2)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete