[pmwiki-users] Redirect search results to SearchResults page.

Waylan Limberg waylan at gmail.com
Mon Oct 24 10:34:59 CDT 2005


On 10/21/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Oct 21, 2005 at 03:44:34PM -0400, Waylan Limberg wrote:
> > I've been trying to get my search to work the way I want, and for the
> > most part I have. One thing I don't really care for is that the search
> > results are displayed with the URL of the page they originated from.
> > Seeing every page has a search box, I don't like this. IMO all results
> > should come under a single URL, so when I run a search, PmWiki
> > redirects to Site.Search (or perhaps $Group.Search - if search is
> > restricted to said group) and displays the results there.
>
> This is in fact how PmWiki 2 *used* to do things, but people requested
> that it remain in the same page so that any per-group customizations
> and skins would remain in effect.
>
> > I considered changing the format of the search form so that it
> > submitted to Site.Search, instead of the current page, but wasn't sure
> > exactly how to do this.
>
> Oooooops!  I meant for this to be something that is easy to configure,
> but apparently I didn't actually write it that way.  Don't worry,
> in 2.1.0 there will be an option to make searches all go to a
> standard search page rather than remain in the current page.
>
I'll look forward to this fix. Thanks.

> > But then I wondered about those groups that
> > are set to only search on that group (via groupname.php). How would
> > Site.Search now which group its searching in?
>
> The group to be searched can be passed as a parameter to the
> search; indeed, it can be done by specifying the searchbox markup as
>
>    (:searchbox group={$Group}:)

Thanks. this is helpful.
>
> > As an aside. I also want to not search that one group when in any
> > other group, but I can't seem to override the restriction in
> > config.php from groupname.php
>
> A groupname.php file is only loaded when viewing a page in that
> group; it's not loaded when accessing a page from another group.
> However, it can be done using a custom list= option to (:pagelist:),
> set list=default to exclude the group, then use a different list=
> parameter when searching from the group.
>
Yes, I know, but this doesn't address my problem (Ok maybe is does,
but I'd rather do this in the config file). In the default config.php
I am restricting search from including one group and I don't want to
do this in groupname.php files for each group. Then in the
RestrictedGroup.php I want to override that and only search in that
group. However, seeing I'm using $SearchPatterns['default'[] = ...
there isn't any easy way to override that.


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list