[pmwiki-users] Excluding anything but Main group from searches

Hans design5 at softflow.co.uk
Thu May 10 12:27:37 CDT 2007


Thursday, May 10, 2007, 2:48:34 PM, Patrick R. Michaud wrote:

> I would've done the above as:

>   if (!CondAuth($pagename, 'edit')) {
>     $SearchPatterns['default']['main'] = '/^Main\./';
>     $SearchPatterns['default']['sandbox'] = '!^Main\.WikiSandbox$!';
>     $SearchPatterns['default']['pagetopmenu'] = '!^Main\.PageTopMenu$!';
>     $SearchPatterns['default']['sidebar'] = '!^Main\.SideBar$!';
>   }    

> In other words, limit the search only if the person doesn't have
> edit permissions.

Thanks!

One other thing:

How do I customise the searchresults string

   "xxx pages found out of yyy pages searched".

If the search does not show pages from Pmwiki and Site, I don't want
the total number displayed.

A small site with  a dozen or so pages shows over a hundred pages
searched. May make a visitor wonder what are all those pages?


  ~Hans




More information about the pmwiki-users mailing list