News:

Wondering if this will always be free?  See why free is better.

Main Menu

Search Focus Dropdown

Started by Brettflan, February 14, 2009, 02:34:48 PM

Previous topic - Next topic

Brettflan

Quote from: Draffi on February 02, 2012, 03:42:15 PM
One question:

I use this mod on my SMF 2 RC5 Board, default theme (Curve).

It is possible to show the google search result on a page that looks exactly like my forum?

e.g. exactly like this:
http://www.tystips.com/archives/66/how2-create-a-google-search-results-page-template-for-wordpress-27/
http://www.vbseo.com/f34/how-create-custom-google-search-custom-result-page-your-site-using-vbulletin-template-46319/

Thank you!
The method this mod uses is the standard Google-hosted site-search method. The method you've linked to uses special Google Search API integration which also requires an AdSense account. It would take a fair bit of work on my part to implement that option, and would require further configuration on your part.
I don't really have time to work on something like that at the moment, and for that matter I don't relish the idea of offering support for people having trouble getting an AdSense account set up and configured.
Sorry.

madman71

Brett,


Am i SOL with my theme?
http://custom.simplemachines.org/themes/index.php?lemma=2509

I search this whole thread and searching keyword "search" only appears like 4 times and none of the code that you say to remove/add exists.  I think i just might have one of those themes that doesnt have this search function.

Brettflan

Does it have the standard quick search form on every page, normally in the upper right corner like the forum here has? That's what this mod package works on.

Rehash D Internet

When attempting to install this on 2.0.2 using emulator for 2.0 I'm getting 'Test Failed' on search.template.php. Any ideas why?

Many thanks

Brettflan

You shouldn't need to use an emulator; 1.6.1 installs directly in SMF 2.0.2.

Is the "Test Failed" notice under the "Install in Other Themes" section, or is it above that in the main installation? If it's in the upper section, which is very very unlikely, it's on the default theme and presumably another mod has changed that particular tiny target piece of code.
If it's in the lower section as I suspect, it's for a custom theme you have installed which uses a custom Search.template.php file that doesn't have the target code. In that case, you can still install this package, but it won't work in that particular theme without additional modification.

gisfreak

hello my friend

I use extreme6 themes by fussilet :

http://custom.simplemachines.org/themes/index.php?lemma=1078

and failed on

Add Before    ./Themes/extreme6_2_0_texture/index.template.php

how should I insert additional line , since I cant find the :

Quote<input type="submit" name="submit" value="', $txt['search']

index.template attached
Me fail English? That's unpossible.

Brettflan

With that theme's customized search box, it would fit in after this (somewhere between lines 281 to 291):
<input class="inputbox" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" />';

You'll also want to add some extra CSS styling to make it fit in better with the theme, I expect.

DBAllTerrain

I have this installed on my custom theme and the dropdown appears and contains the correct options depending on the page. However, when searching, it ignores the dropdown and always searches based on where I am, ie-search only current topic if I'm in a topic. Where do I begin to troubleshoot this?

Sorry, I should mention I'm using TinyPortal, downloads system, custom board sort and custom forms mod.

Brettflan

Quote from: DBAllTerrain on October 12, 2012, 08:19:10 PM
I have this installed on my custom theme and the dropdown appears and contains the correct options depending on the page. However, when searching, it ignores the dropdown and always searches based on where I am, ie-search only current topic if I'm in a topic. Where do I begin to troubleshoot this?

Sorry, I should mention I'm using TinyPortal, downloads system, custom board sort and custom forms mod.
Something else has presumably changed how the search focus is determined. Check your other packages for one which modifies "/Sources/Search.php" and has also modified the search form in the index.template.php theme file. At a guess it's probably TinyPortal.

DBAllTerrain

My apologies. It was my own fault. I was using a custom theme and the search form at the top of the page had no ID. Set it up as search_form and it's now working. Thanks for the reply and for making a very useful mod that makes the search feature much more clear for my users.

Skaty

#290
Quote from: DBAllTerrain on October 13, 2012, 12:13:53 AM
My apologies. It was my own fault. I was using a custom theme and the search form at the top of the page had no ID. Set it up as search_form and it's now working. Thanks for the reply and for making a very useful mod that makes the search feature much more clear for my users.

i have the same problem but i don't understand how you fix this.

i add some codes to SearchFocus.turkish-utf8.php  like

$txt['search_focus_all'] = 'Bütün forumda';
$txt['search_focus_ps-vita-teknik-destek'] = 'PS Vita Sorunlarınız ve Teknik Destek'; 

but it is not work properly.

Skaty

i'm using the Zentoa theme by DzinerStudio and here is my index.template.  where do i have to add the code exactly ?


Badboy

Quote from: Skaty on December 29, 2012, 07:53:06 PM
i'm using the Zentoa theme by DzinerStudio and here is my index.template.  where do i have to add the code exactly ?



The code is already added to your file. However, you need to make the following fix to work properly.

Code (FIND) Select
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

Code (REPLACE) Select
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
Nothing is true, everything is permitted.

Skaty

Quote from: Badboy on December 29, 2012, 08:16:07 PM
Quote from: Skaty on December 29, 2012, 07:53:06 PM
i'm using the Zentoa theme by DzinerStudio and here is my index.template.  where do i have to add the code exactly ?
The code is already added to your file. However, you need to make the following fix to work properly.
Code (FIND) Select
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
Code (REPLACE) Select
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

Aha! thank you, now is ok :)

Still no fix for child board search ?

Brettflan

Quote from: Skaty on December 30, 2012, 05:06:39 AM
Still no fix for child board search ?
For starters, what problem are you actually having with it?

Skaty

Quote from: Brettflan on January 03, 2013, 12:17:13 AM
Quote from: Skaty on December 30, 2012, 05:06:39 AM
Still no fix for child board search ?
For starters, what problem are you actually having with it?

For example, i wanna search in games board but there is a child boards like A-C, D-F etc...  so when i search in games there is no results that i want.

Brettflan

Quote from: Skaty on January 03, 2013, 07:02:24 AM
Quote from: Brettflan on January 03, 2013, 12:17:13 AM
Quote from: Skaty on December 30, 2012, 05:06:39 AM
Still no fix for child board search ?
For starters, what problem are you actually having with it?
For example, i wanna search in games board but there is a child boards like A-C, D-F etc...  so when i search in games there is no results that i want.
Ah, I think I see what you mean. "This board" indeed only works on the current board, it doesn't include any child boards. That could potentially be changed with a bit of work, but what of people who would expect the current behavior? It could be argued either way, with certain people confused or dissatisfied with either way of handling it (including child boards or not). I think including child boards might actually be a bit more confusing and would make it impossible to limit a search to a single board if it has children, without resorting to the full advanced search form.
Another option in the dropdown could be added for the current board and child boards, but I'm not convinced it would be all that useful for most people.

Skaty

maybe there can be such options:

[  ]  search just main board
[  ]  include child boards

iain sherriff

#298
Hi.
I fear this may be too complicated for me to explain  :-\

On my own forum (2.0.3) i have installed this mod and FacebookSMF theme and it works without fault  :)

On a forum I am a Global Mod on (2.0.2) it doesnt work.............. (does work faultlessly with core theme on this forum)
The forum has a modified (css I think) Facebook SMF and your mod doesnt work with this. See screen shot of board view.

Is there any way that is enough information for you to point me to the error?
The forum is member only controlled access so I cant show you it that way........

from error log...............

Apply Filter: Only show the error messages of this URL
http://xxxx.com/index.php?topic=3700.0;topicseen
Apply Filter: Only show the errors with the same message
8: Undefined index: search_scope_board
Apply Filter: Only show the errors from this file
File: /home/turbopb1/public_html/xxxx.com/Themes/default/languages/Faq.english.php (body_above sub template - eval?)
Line: 253


does that point to a clash with the FAQ mod ?
SMF 2.0.12

Brettflan

What that points to is the language files for this mod not being loaded properly (the "Undefined index: search_scope_board" bit). Those files should be in the default theme's "languages" folder as "SearchFocus.[LANGUAGE].php" if you installed the mod correctly. Since the language file is loaded by the SearchFocus.template.php file which you clearly have in place, unless you've modified that file, pretty much the only explanation should be those language files missing.

Advertisement: