- phpBB2 had a method to filter some unwanted word in its search system, phpBB3 has the same type of system, but unfortunately, it is not used.
- Code: Select all
'check_ignore' => false,- Code: Select all
'check_ignore' => true,
Re-activating the system has some great advantages such as running lighter search tables and outputting a lot more relevant meta keyword tags with our phpBB SEO meta tag mod (0.2.6 and above), without any impact on the display process.
However, this filter system can only be re-enable for the Fulltext native indexing.
People using the Fulltext mysql indexing will still be able to activate the check_ignore option of the phpBB SEO meta tag mod, by replacing :
with :
in includes/functions.php.
Doing this will activate the stop word filtering when generating the meta tags, but will not change anything in the search tables.
This being said, here is the method.
Activate search_ignore_words.php in Fulltext native indexing
- Open :
- Code: Select all
includes/search/fulltest_native.php- Code: Select all
// Split old and new post/subject to obtain array of 'words'
$split_text = $this->split_message($message);
$split_title = $this->split_message($subject);- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - Enable search_ignore_words
$this->filter_nums($split_text);
$this->filter_nums($split_title);
$this->get_ignore_words();
$split_text = array_diff($split_text, $this->ignore_words);
$split_title = array_diff($split_title, $this->ignore_words);
// www.phpBB-SEO.com SEO TOOLKIT END - Enable search_ignore_words- Code: Select all
}
?>- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - Enable search_ignore_words
/**
* Get rid of integers values in $input array
*/
function filter_nums(&$input) {
foreach ($input as $key => $word) {
if (preg_match('`^[0-9]+$`', $word)) {
unset($input[$key]);
}
}
}
// www.phpBB-SEO.com SEO TOOLKIT END - Enable search_ignore_words
Find :
After add :
Find :
Before add :
Once done, go to ACP, "MAINTENANCE" tab, "Search Index " menu, and start the Fulltext native index creation, after you eventually deleted it if required.
This code will exclude all integers as well as all words listed in language/yourlang/search_ignore_words.php from the search index, and thus from your topic meta keywords tags.
Notes :
- Please note that you'll have to use the boards default language as your profile language in order to use the proper search_ignore_words.php file.
It is useless to put integers in search_ignore_words.php, as well a words composed of less or more characters than the limits set in the phpBB search settings.
By default, phpBB is excluding words of less than 3 and more than 14 characters.
As well, only use lower case, the index is not case sensitive, so everything needs to be lower-case to be taken into account during the comparisons.
Support for this trick will be provided in this thread.
French speaking version.

English |
French



