[pmwiki-users] Excluding anything but Main group from searches
Patrick R. Michaud
pmichaud at pobox.com
Thu May 10 12:31:36 CDT 2007
On Thu, May 10, 2007 at 06:27:37PM +0100, Hans wrote:
> 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?
$SearchResultsFmt = "<div class='wikisearch'>$[SearchFor]
<div class='vspace'></div>\$MatchList</div>";
You can also provide a custom $[SearchFound] translation.
Pm
More information about the pmwiki-users
mailing list