[pmwiki-devel] Pages hidden in search, but allowed to view by every user.

Patrick R. Michaud pmichaud at pobox.com
Wed Feb 21 17:46:20 CST 2007


On Wed, Feb 21, 2007 at 09:34:52PM +0000, Hans wrote:
> for instance adding this to config.php will exclude any GroupHeader,
> GroupFooter and GroupAttributes pages from the default search results:
> 
> $SearchPatterns['normal'][] = '!\.GroupHeader$!';
> $SearchPatterns['normal'][] = '!\.GroupFooter$!';
> $SearchPatterns['normal'][] = '!\.GroupAttributes$!';

Actually, to have it exclude from the =>default<= search
results one would use:

  $SearchPatterns['default'][] = '!\.GroupHeader$!';
  $SearchPatterns['default'][] = '!\.GroupFooter$!';
  $SearchPatterns['default'][] = '!\.GroupAttributes$!';

One can also add options to the (:searchresults:) directive
in Site.Search to change what is displayed in the default
search results.

    (:searchresults list=normal:)    # to use SearchPatterns['normal'] above

    (:searchresults name=-*.GroupHeader,-*.GroupFooter,-*.GroupAttributes :)

Pm



More information about the pmwiki-devel mailing list