Loading...
I want ban some words
X
7 answers
Unpublished
M
MinitekPosted 8 years agoModerator
Hi Xavier,
No I am afraid this is not possible at the moment as it would require many code changes in many files.
No I am afraid this is not possible at the moment as it would require many code changes in many files.
Unpublished
X
xavierPosted 8 years ago
Hi Yannis,
Sorry for the delay .. It's work, thank you very much !!
Is it possible to change the code also for this topic : https://www.minitek.gr/support/feature-requests/8-minitek-live-search/134-how-to-add-sections-in-results-link-description ?
There will be no updates
Thank you very much again.
Bes regards,
Sorry for the delay .. It's work, thank you very much !!
Is it possible to change the code also for this topic : https://www.minitek.gr/support/feature-requests/8-minitek-live-search/134-how-to-add-sections-in-results-link-description ?
There will be no updates
Thank you very much again.
Bes regards,
Unpublished
M
MinitekPosted 8 years agoModerator
Try this:
Before line:
add:
After line:
add:
Please note that this code is provided without support and you will have to debug any possible problems by yourself.
Before line:
foreach ($words as $word)
{add:
$badwords = array('word1', 'word2', 'word3'); // This is an array that contains all excluded wordsAfter line:
foreach ($words as $word)
{add:
if (in_array($word, $badwords)) { continue; }Please note that this code is provided without support and you will have to debug any possible problems by yourself.
Unpublished
X
xavierPosted 8 years ago
Hi Yannis,
Sorry..
In fpbutilities.php at line number : 129
Sorry..
In fpbutilities.php at line number : 129
// Filter by search word
if (array_key_exists('fbp_questions_page_limit', $faqbookpro_type))
{
// Component
$phrase = isset($faqbookpro_type['fbp_questions_c_search_for']) ? $faqbookpro_type['fbp_questions_c_search_for'] : 'all';
switch ($phrase)
{
case 'exact':
$text = $db->quote('%' . $db->escape($word, true) . '%', false);
$wheres2 = array();
if ($faqbookpro_type['fbp_questions_c_search_in_title'])
{
$wheres2[] = 'a.title LIKE ' . $text;
}
if ($faqbookpro_type['fbp_questions_c_search_in_introtext'])
{
$wheres2[] = 'a.introtext LIKE ' . $text;
}
if ($faqbookpro_type['fbp_questions_c_search_in_fulltext'])
{
$wheres2[] = 'a.fulltext LIKE ' . $text;
}
$where = '(' . implode(') OR (', $wheres2) . ')';
$query->where($where);
break;
case 'all':
case 'any':
default:
$words = explode(' ', $word);
$wheres = array();
foreach ($words as $word)
{
$word = $db->quote('%' . $db->escape($word, true) . '%', false);
$wheres2 = array();
if ($faqbookpro_type['fbp_questions_c_search_in_title'])
{
$wheres2[] = 'LOWER(a.title) LIKE LOWER(' . $word . ')';
}
if ($faqbookpro_type['fbp_questions_c_search_in_introtext'])
{
$wheres2[] = 'LOWER(a.introtext) LIKE LOWER(' . $word . ')';
}
if ($faqbookpro_type['fbp_questions_c_search_in_fulltext'])
{
$wheres2[] = 'LOWER(a.fulltext) LIKE LOWER(' . $word . ')';
}
$wheres[] = implode(' OR ', $wheres2);
}
$where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
$query->where($where);
break;
}
}
else
{ Unpublished
M
MinitekPosted 8 years agoModerator
Hi Xavier,
In which file exactly?
In which file exactly?
Unpublished
X
xavierPosted 8 years ago
Hi Yannis,
Thank you for your reply.
but.. i see that in the code ("search.php") :
"// Check for words to ignore.
$aterms = explode(' ', JString::strtolower($searchword));"
Is it possible to insert words here?
Thank you for your reply.
but.. i see that in the code ("search.php") :
"// Check for words to ignore.
$aterms = explode(' ', JString::strtolower($searchword));"
Is it possible to insert words here?
Unpublished
M
MinitekPosted 8 years agoModerator
Hi Xavier,
There is no way to ban words in current version.
You can add this as a feature request at:
https://www.minitek.gr/support/feature-requests
There is no way to ban words in current version.
You can add this as a feature request at:
https://www.minitek.gr/support/feature-requests
Search - Powered by Minitek Live Search
© 2011 - 2024 Minitek.gr. All Rights Reserved.
Minitek.gr is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.
The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.