[pmwiki-users] (:searchresults:) arguments shown on web page

Petko Yotov 5ko at 5ko.fr
Tue Oct 8 22:04:04 CDT 2013


Matt Clinton writes:
> I have changed the (:searchresults:) in the Site.Search file to the  
> following:
>
> (:searchresults group=-PmWiki,-Site name=-RecentChanges,-AllRecentChanges,- 
> GroupHeader,-GroupFooter,-GroupAttributes :)
>
> It is applying the correct filters and working great apart from the fact  
> that all of those arguments are being shown on the web page?

Instead of adding parameters to the (:searchresults:) directive, you can  
change the default list parameter for the searches. Add this near the end of  
config.php:

$SearchPatterns['default'] = array(
  'recent' => '!\.(All)?Recent(Changes|Uploads)$!',
  'group' => '!\.Group(Print)?(Header|Footer|Attributes)$!',
  'pmwiki' => '!^(PmWiki|Site)!',
  'self' => str_replace('.', '\\.', "!^$pagename$!")
);

See http://www.pmwiki.org/wiki/Cookbook/SearchPatterns .

Note that when you want to search all pages, you need to enter in the search  
field the parameter list=all after your search terms.

Petko




More information about the pmwiki-users mailing list