I found a solution
made the following changes to FullTextSearch
if ($exclude) $exclude = explodePageList($exclude);
if ($include) $include = explodePageList($include);
while ($page = $pages->next() and (!$limit or ($count < $limit))) {
$name = $page->getName();
if ($exclude and in_array($name,$exclude)) continue;
if ($include and in_array($name,$include))
{
$count++;
$list->pushContent(HTML::dt(WikiLink($name)));
if ($hilight_re)
$list->pushContent($this->showhits($page, $hilight_re));
}
if (!$include)
{
$count++;
$list->pushContent(HTML::dt(WikiLink($name)));
if ($hilight_re)
$list->pushContent($this->showhits($page, $hilight_re));
}
}
Regards Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how can i make a fulltextsearch on specific pages?
there is a parameter exclude pages but no include pages.
any idea?
regards Stefan
I found a solution
made the following changes to FullTextSearch
if ($exclude) $exclude = explodePageList($exclude);
if ($include) $include = explodePageList($include);
while ($page = $pages->next() and (!$limit or ($count < $limit))) {
$name = $page->getName();
if ($exclude and in_array($name,$exclude)) continue;
if ($include and in_array($name,$include))
{
$count++;
$list->pushContent(HTML::dt(WikiLink($name)));
if ($hilight_re)
$list->pushContent($this->showhits($page, $hilight_re));
}
if (!$include)
{
$count++;
$list->pushContent(HTML::dt(WikiLink($name)));
if ($hilight_re)
$list->pushContent($this->showhits($page, $hilight_re));
}
}
Regards Stefan
Do you have a name for this new plugin?
Or should we just add it to the default?
forgot this part of code
function getDefaultArguments() {
return array('s' => false,
'noheader' => false,
'include' => false,
'exclude' => false, //comma-seperated list of glob
'limit' => false,
'quiet' => false); // be less verbose
}
You can put it to the default if its usefull
Regards Stefan