Skip to main content
Request: Search Focus Dropdown Started by overscan · · Read 3939 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Request: Search Focus Dropdown

I find this pretty essential on my SMF forum:

http://custom.simplemachines.org/mods/index.php?mod=1634

How easy to port to Elkarte?

Description:
This mod adds a dropdown to the search field at the top of the page, similar to the one on the official SMF community forum.
When viewing a topic, the dropdown options will be "this topic" (default), "this board", "entire forum", or "Google".
When viewing a board, the dropdown options will be "this board" (default), "entire forum", or "Google".
On any other page, the dropdown options will be "entire forum" (default) or "Google".

The "Google" site-search option can be disabled in the Admin panel by going to Forum->Search->Settings and unchecking the new option there. Similarly, there is another option to enable "Bing" site-search in the same place.
You will also see a list of all your forum's boards there for possible inclusion in the dropdown as choices. These board choices will shown everywhere, just above the "entire forum" option. You can use this to add your "FAQ" or "Support" board (or whatever you like) to the dropdown for easy searching from anywhere in the forum.

Re: Request: Search Focus Dropdown

Reply #1

Actually everything you describe is already present in the core, no need for addons. ;D

The forum/board/topic dropdown can be enabled in admin > forum > search > search settings ticking "Enable the Quick Search dropdown".

Then, in the same page, just a bit below you'll find the block "Additional search engines" where you can configure any search engine you want.
For google you can use the following settings.
* Name:
Code: [Select]
Google
* URL:
Code: [Select]
http://www.google.com/?q=
* Words separator:
Code: [Select]
+

HTH!
Bugs creator.
Features destroyer.
Template killer.

Re: Request: Search Focus Dropdown

Reply #2

it works but the search is made on google, not on forum using google. Is there a way to make the search with google only on my forum?
sorry for my bad english

Re: Request: Search Focus Dropdown

Reply #3

Arg!
Actually, the previous url is also wrong... :(

Okay, the fact that is not focused is a but I'd say, but it can be workaround'ed.
The following settings should do the trick better than before. ;D
* Name:
Code: [Select]
Google
* URL:
Code: [Select]
https://www.google.com/search?q=site:domainname.tld+
* Words separator:
Code: [Select]
+
and of course, instead of "domainname.tld" you should put the domain of your site. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Request: Search Focus Dropdown

Reply #4

thanks emanuele, that works!
sorry for my bad english