Loading...
 
Features / Usability

Features / Usability


Uncheck the exact match in search module

posts: 35
How do I set the exact match checkbox in the search_wiki_page module to be unchecked by default?
posts: 400
jstotz wrote:
How do I set the exact match checkbox in the search_wiki_page module to be unchecked by default?


Currently no way to do that. Committed a change to allow that option with the next version of Tiki (version 8). If you know how to code, see revision 36158 to the modules/mod-func-search_wiki_page.php file for changes you can make to allow this option.

Regards,
lindon


posts: 35
lindon wrote:
If you know how to code, see revision 36158 to the modules/mod-func-search_wiki_page.php file for changes you can make to allow this option.


I'll take a look, where do I find that?


posts: 35
jstotz wrote:
jstotz wrote:
How do I set the exact match checkbox in the search_wiki_page module to be unchecked by default?


Here's the link showing the change: http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/modules/mod-func-search_wiki_page.php?r1=33195&r2=36158&pathrev=36158

I've been asked to make it to where the default is to have it unchecked - I'll make that change later today.
Regards,
lindon


Should I be able to replace my current file with the new one and have this functionality in my copy of v7? I'm asking because I tried that and it didn't seem to work. Or will that only work in v8?

And thanks for making the change. I think I agree that having the default set to unchecked would be the better choice.


posts: 400
jstotz wrote:
Should I be able to replace my current file with the new one and have this functionality in my copy of v7? I'm asking because I tried that and it didn't seem to work.


That should work. Did you clear all of your caches, quit your browser, etc.?

posts: 35
jstotz wrote:
jstotz wrote:
Should I be able to replace my current file with the new one and have this functionality in my copy of v7? I'm asking because I tried that and it didn't seem to work.


That should work. Did you clear all of your caches, quit your browser, etc.?


Yes I did. I restarted Apache and PHP, cleared the Safari cache, used the clear cache button on the Admin Modules page, and switched to Firefox. I'm assuming that I should see an new field in the "Basic" area of the module edit area?

I am getting these two PHP errors I don't know if they are related:

PHP (5.3.1) ERROR (E_USER_WARNING):
File: C:\xampp\htdocs\tiki\tiki-current\lib\smarty\libs\Smarty.class.php
Line: 1093
Type: Smarty error: assign: missing parameter: help (url desc)|crumb

PHP (5.3.1) NOTICE (E_NOTICE):
File: C:\xampp\htdocs\tiki\tiki-current\lib\smarty_tiki\block.textarea.php
Line: 271
Type: Undefined index: comments

posts: 400

I've tested on 7.0 and 7.1 and it works for me if I clear the temp/cache directory (in particular the files that start with "module"). A new tab titled "Module" pops up after the "Basic" tab.

The lines marked below is the code I added, just to make sure it's clear:

Copy to clipboard
function module_search_wiki_page_info() { return array( 'name' => tra('Search for Wiki Page'), 'description' => tra('Search for a wiki page by name.'), 'prefs' => array('feature_wiki'), ////////start of new code//////////// 'params' => array( 'exact_match' => array( 'name' => tra('Exact Match'), 'description' => tra('Exact match checkbox checked by default if set to "y".') . " " . tr('Default: "n".'), 'filter' => 'alpha' ), ), //////////end of new code////////// ); } function module_search_wiki_page( $mod_reference, $module_params ) { ////////start of new code//////////// global $smarty; $smarty->assign('exact_match', isset($module_params['exact_match']) ? $module_params['exact_match'] : 'n'); //////////end of new code////////// }


I have the same two PHP errors you have but they don't seem to have an impact. Did you use a code editor when you made the change? Sorry, running out of ideas. Let me know whether any of this helped.
Regards,
lindon

posts: 35
lindon wrote:
I've tested on 7.0 and 7.1 and it works for me if I clear the temp/cache directory (in particular the files that start with "module"). A new tab titled "Module" pops up after the "Basic" tab.


That worked! I had to manually delete those cache files. I guess the Clear Cache button on the Admin Modules page didn't work.

Thanks.



Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting