[CDB] Navbar Search

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Mon Mar 09, 2015 10:45 am

I am not clear as to what you mean.

In normal prosilver, when you view the forum in a phone, the searchbar goes, and the magnifier appears.

All this Ext does if to move the searchbar, it does not effect the magnifier.

If you are wanting the searchbar totally removed and just have the magnifier, that should not pose a problem. If you could take a screenshot and mark what you want and where I should be able to sort something for you.

EDIT:- After lots of re reading I think I know what you are asking for.

At the moment, my extension removes the small magnifier from the resized version. (something I didn't realise until now) I will do a quick re write and hopefully it will give what you want. Please let me know if this is what you meant or not.
Last edited by HiFiKabin on Mon Mar 09, 2015 5:55 pm, edited 1 time in total.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Mon Mar 09, 2015 5:50 pm

v 1.0.2 Search icon added when viewed on Mobile Devices

Update from previous version:
  • Download the latest release and unzip it.
  • Disable NavBar Search in the ACP
  • Delete navbarsearch folder from the server
  • Upload the the folder navbarsearch to root/ext/hifikabin/
  • Enable it in the ACP

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: [RC] Navbar Search

Post by Dragosvr92 » Mon Mar 09, 2015 6:17 pm

I tried to use the responsive-hide class over the box but it doesnt seem to show it after its being hidden. I thought it was just being overlayed... But maybe it is just removed by the php setting that removes the box all together....? Yes... that was it.... i just tested by removing the php template setting that removes it. It also removes the icon :( I guess there is no way of having it in. Unless we remove the box by css only.. :?
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Mon Mar 09, 2015 6:31 pm

OK, so you would like the search box always to be hidden. with just the icon showing.

Try this. Disable the extension, and upload the attached file to ext/hifikabin/navbarsearch/styles/all/template/event overwriting the existing file, then enable the extension again.

http://s000.tinyupload.com/?file_id=038 ... 7552584679

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: [RC] Navbar Search

Post by Dragosvr92 » Mon Mar 09, 2015 7:45 pm

Oh, no mate... I like the extension as it is. I dont want to change it that much.
But on small resolutions, i would like the box to disappear and be replaced by only the magnifier.

Please do this to fully understand what i am looking for.....
Leave your extension as it is... seems the responsive class isnt needed.
Just Change 'S_IN_SEARCH' => true, to false.

Now resize your browser window... You will see how when resizing it, the search area disappears and the magnifier icon replaces it.

EDIT:
Oh... nevermind... I see your 1.0.2 version does exactly that ! Thanks :D
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Mon Mar 09, 2015 8:05 pm

PHEW! Glad its all OK now. Crossing languages does get a bit confusing at times.

Holger
Registered User
Posts: 1756
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [RC] Navbar Search

Post by Holger » Tue Mar 10, 2015 8:50 am

VERY nice, thanks a lot!
The search was very hidden!

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [RC] Navbar Search

Post by javiexin » Tue Mar 24, 2015 8:30 pm

Thanks a lot for the extension.

I have some suggested changes: replace the content of overall_header_breadcrumbs_after.html by:

Code: Select all

<!-- IF S_DISPLAY_SEARCH -->
<li class="rightside responsive-hide">
	<div id="search-box" class="search-box" style="margin-top:2px">
		<form action="{U_SEARCH}" method="get" id="search">
		<fieldset>
			<input name="keywords" id="keywords" type="search" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search tiny" size="20" value="{SEARCH_WORDS}" placeholder="{L_SEARCH_MINI}" >
			<button class="button icon-button search-icon" type="submit" title="{L_SEARCH}">{L_SEARCH}</button>
			<a href="{U_SEARCH}" class="button icon-button search-adv-icon" title="{L_SEARCH_ADV}">{L_SEARCH_ADV}</a>
			{S_SEARCH_HIDDEN_FIELDS}
		</fieldset>
		</form>
	</div>
</li>
<li class="rightside responsive-search" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">{L_SEARCH}</a></li>
<!-- ENDIF -->
This will adjust the margins to go in line with Google Searchbar extension of your own as well, and include a cleaner, parallel structure in both extensions; also, removing some unneeded CSS.

One behaviour that I do not like is the one of the breadcrumbs when both extensions are used at the same time and the window is narrow (but not as much as to make responsive take over). There is something, probably in some JS file, that is not interacting correctly with these extensions... Could you take a look?

Again, thanks for the extension(s), and I hope this helps.
-javiexin

PD: I would suggest moving this file from the all styles folder to the prosilver folder, as these apply to prosilver styles only (not to subsilver2 or others).

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Tue Mar 24, 2015 8:50 pm

javiexin wrote:Thanks a lot for the extension.

I have some suggested changes: replace the content of overall_header_breadcrumbs_after.html by:

<snip>
Thanks, I'll check that out

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [RC] Navbar Search

Post by javiexin » Tue Mar 24, 2015 11:32 pm

Another suggested change.

To avoid messing with variables that may be used in unexpected ways, I would suggest to remove completely the files config/services.yml and event/listener.php.

To achieve the same functionality, add the following content to styles/prosilver/template/event/overall_header_head_append.html:

Code: Select all

<style type="text/css" media="screen">
.headerbar #search-box { display: none !important;}
</style>
That achieves the same (hiding the searchbox in the headerbar), without messing with variables, and without additional code (just template adjustments).

Hope this helps,
-javiexin

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Wed Mar 25, 2015 8:18 am

Now that looks a better way of doing it. Far more simple to implement as you say.

Many thanks

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [RC] Navbar Search

Post by javiexin » Wed Mar 25, 2015 6:39 pm

javiexin wrote:Another suggested change.

To avoid messing with variables that may be used in unexpected ways, I would suggest to remove completely the files config/services.yml and event/listener.php.

To achieve the same functionality, add the following content to styles/prosilver/template/event/overall_header_head_append.html:

Code: Select all

<style type="text/css" media="screen">
.headerbar #search-box { display: none !important;}
</style>
That achieves the same (hiding the searchbox in the headerbar), without messing with variables, and without additional code (just template adjustments).

Hope this helps,
-javiexin
Sorry, I forgot: if you make this change, you have to remove the following from overall_header_breadcrumbs_after.html:

Code: Select all

<li class="rightside responsive-search" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">{L_SEARCH}</a></li>
Otherwise, the search appears twice when the "responsive" style kicks in.

Thanks,
-javiexin

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [RC] Navbar Search

Post by javiexin » Wed Mar 25, 2015 6:51 pm

javiexin wrote:One behaviour that I do not like is the one of the breadcrumbs when both extensions are used at the same time and the window is narrow (but not as much as to make responsive take over). There is something, probably in some JS file, that is not interacting correctly with these extensions... Could you take a look?
For the record, this is what I meant (an image is worth a thousand words ;) )
Image

Personally, I would remove the Google search (or replace by an icon) as soon as needed, and would reduce the advanced search to an icon as well even before responsive behavior kicking in.

Alternatively, the breadcrumbs could be replaced by a dropdown menu (like the Quick Links above it).

Thanks a lot,
-javiexin

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21608
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: [RC] Navbar Search

Post by Mick » Fri Mar 27, 2015 2:10 pm

Yes, icons may be a better route as was used in the original KB, but it would be better being configurable in the ACP so you can have it either way.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4019
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Navbar Search

Post by HiFiKabin » Fri Mar 27, 2015 4:38 pm

I'll have a look into that sometime later

Locked

Return to “Extensions in Development”