News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Search Focus Dropdown

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

Previous topic - Next topic

EL34

It looks just like what you described

I went and opened it when I saw the error messages.
I was confused also by the error message.

There were no less than 20+ of the same message in the error log this morning.

<?php
// SearchFocus
// encoding: ISO-8859-1

$txt['search_focus_topic'] = 'This topic';
$txt['search_focus_board'] = 'This board';
$txt['search_focus_all'] = 'Entire forum';

$txt['search_focus_google'] = 'Google';
$txt['search_focus_enable_google'] = 'Enable Google site-search as a search dropdown option';

$txt['search_focus_bing'] = 'Bing';
$txt['search_focus_enable_bing'] = 'Enable Bing site-search as a search dropdown option';

$txt['search_focus_boards'] = 'Add specific boards as search dropdown options (board search)';

?>
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

Brettflan

No idea what the deal is there, then.

EL34

If you look back at Reply #241 on: 10 September 2011, 02:25:38
I am the one who discovered the mod had problems in 1.1.14

You gave me some code to change and I reported that it worked fine
Then you changed your code.

I probably still have your patched code in place.
Do you think that could have anything to do with this?

Wondering if I should uninstall and download a fresh copy of the mod.
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

Brettflan

It shouldn't have anything to do with that inexplicable error, but uninstalling and reinstalling a fresh copy of the mod package can't hurt.

EL34

Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

beanflying

Getting exactly the same error on 2.0.1 with this mod? Nothing wrong with the search focus English file but may be a problem with one of the other changed files??

(main sub template - eval?)
Line: 293


is the error I am getting for what I assume is every page load on the forum - LOTS of Errors.
Owner of many many shiny toys.

Brettflan

If PHP is not reporting the correct filename in the error report, I don't see how to help you.
Further, if it's reporting the same index of 'view' as the other user reported, this mod package never even references a variable index of that name. So... I'm not sure what else to tell you.

beanflying

Currently have the mod un installed and have gone to a backed up css and the error has gone  ???

I also realised after I posted last night it was using a backup css sheet rather than the current one from my theme? So is there a possible issue with my current css and your mod causing it to go to another?

Anyway if you have any thoughts on where to look or ideas to try I am happy to put it back on the site and try and sort it as I really like the extra functionality it provides the members.
Owner of many many shiny toys.

Norv

beanflying,

Please when you see those "(main sub template - eval?)" messages, on SMF 2.0 you can go in Admin center > Server settings, and tick the "Disable evaluation of templates" option. That will instruct SMF to disable eval on the fly and will make it log the actual file at the origin of the respective error(s).

It will help us figure out where the problem is exactly.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

TheListener

Out of curiosity can the search box (which this mod compliments nicely) be used without the search tab on the menubar?

I would like to lose the search menu tab if so.

beanflying

Many thanks for the tips Norv  :)

Brack1 you can remove the search from the main menu or change those settings in the Source files. Open up the subs.php file and search for "$buttons = array(" will get you to the section where the buttons are done in 2.0.1 anyway  :) I removed mine when I was playing with the mod too.
Owner of many many shiny toys.

TheListener


beanflying

Ok used Norv's tips from above to find and debug the files (finished up being a problem in the display.php) and had nothing to do with this mod.

Since reinstalled this mod happily and running error free on 2.0.1. Great functionality mod  :D
Owner of many many shiny toys.

Brettflan

Good catch, Norv. I somehow didn't even pick up on it being a template eval issue even though it was right there in his message.  :P

Quote from: beanflying on November 04, 2011, 08:41:16 PM
Ok used Norv's tips from above to find and debug the files (finished up being a problem in the display.php) and had nothing to do with this mod.

Since reinstalled this mod happily and running error free on 2.0.1. Great functionality mod  :D
Cool, thanks.

beanflying

Just looking at tidying up the header section of my forum (reducing vertical height) and wondering if it is possible by modding the index.template to move the search bar to the right of the linktree as per the pic below?

All my playing (limited php skills) has been returning template parsing errors but I gather moving the lines below is part of it?

// Search Focus Dropdown
include_once($settings['default_theme_dir'] . '/SearchFocus.template.php');

echo '


Advice or guidance very welcome  :)
Owner of many many shiny toys.

Brettflan

Yes, it can be moved. You'll of course need to move the entire search form though ("<form" to "</form>"), not just the search focus dropdown addition.
I expect it will also take some HTML/CSS modification in order to make it fit in appropriately there.

Kirck

Hello, here you have an update translatation for spanish and a new translation for catalan language :)

Spanish
$txt['search_focus_topic'] = 'Este tema';
$txt['search_focus_board'] = 'Este sub-foro';
$txt['search_focus_all'] = 'Todo el foro';

$txt['search_focus_google'] = 'Google';
$txt['search_focus_enable_google'] = 'Habilitar la búsqueda de Google como opción en la lista';

$txt['search_focus_bing'] = 'Bing';
$txt['search_focus_enable_bing'] = 'Habilitar la búsqueda de Bing como opción en la lista';

$txt['search_focus_boards'] = 'Añadir sub-foros como opciones de búsqueda en la lista';


Catalan
$txt['search_focus_topic'] = 'Aquest tema';
$txt['search_focus_board'] = 'Aquest sub-fòrum';
$txt['search_focus_all'] = 'Tot el fòrum';

$txt['search_focus_google'] = 'Google';
$txt['search_focus_enable_google'] = 'Habilitar l\'opció de recerca de Google com a opció a la llista';

$txt['search_focus_bing'] = 'Bing';
$txt['search_focus_enable_bing'] = 'Habilitar l\'opció de recerca de Bing com a opció a la llista';

$txt['search_focus_boards'] = 'Afegir sub-fòrums com a opcions de recerca a la llista';

Brettflan

Thanks, I'll add those in the eventual next release. Quick question though, what character set (besides UTF-8 of course) does Catalan use? ISO-8859-1?

Kirck


Draffi

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!

Advertisement: