[pmwiki-users] Formatting search results

ABClf languefrancaise at gmail.com
Thu Apr 15 01:14:19 CDT 2010


2010/4/14 Steve G. <wordz2u at gmail.com>:
> 1. Thanks, editing site.search did the trick.
>
> 2. I am not sure where to change it so that search on the top right covers
> all groups. Would it be in site.search, where I have a :searchresults: (not
> changed as in 1)?

I guess, yes.
PmWiki will use Site.Search if there is not any other searchresults
directive in the page.
It looks like it is the case you want now : on your home page, when
searching with top right search engine, result are given for all
groups.

> Here is how I do it: On group home page(s), I have a search box. For
> example, look at:
> http://www.words2u.net/pmwiki/?n=Photographs.HomePage
>
> It has the usual top right box, which comes with the skin, and a second box
> which I create with the following lines, for the local group only:
>
> (:searchbox:)
>
> (:searchresults group=Photographs:)
>
> I would like to change the top right to search all groups, while the one in
> the page will be limited to the local group.

In that page, you have the top right skin search engine, plus a second
search engine created using (:searchbox:) and a dedicated
(:searchresults:) limited to current group.
So, whatever search engine you run, PmWiki will show the results
according to the page's (:searchresult:)

I don't know if it is possible to have two searchengines using
different params : one for all the wiki ; another one for the current
group.

In PmWiki, several pages have a special searchengine (plus the top
right search field) : in all these pages, both give results according
to the (:searchresults:) param.
See :
http://www.pmwiki.org/wiki/PmWiki/Search
http://www.pmwiki.org/wiki/Test/SearchByTitle

In my little knowledge, I can't tell you any solution to get in the
same page two search engines working differently.
Maybe a conditional if ?? if searchengine1 then pageresults1 ; if
searchengine2, then pageresults2 ? Could this be done ? I don't know.

Gilles.


> Thanks,
>
> Z.
>
> On Fri, Apr 9, 2010 at 6:57 AM, ABClf <languefrancaise at gmail.com> wrote:
>>
>> 1. you need to format your search results by using a #fmt ; it is easy.
>> For the default search, edit site.search and write something as
>> (:searchresults fmt=#description:) instead of (:searchresults:) to
>> format the results with #description format so that every search that
>> use the defaut search will use that format.
>> (use a default template or create a new one if needed)
>>
>> 2. There is something that says PmWiki to search in current Group ; so
>> you need to delete this filter or to say PmWiki to use the default
>> search page (which isn't restricted to current Group).
>> Have a look in your config and in your tmpl file at search variables.
>>
>> From doc :
>> $PageSearchForm
>> The page to be used to format search results for ?action=search
>> (unless the current page has a "searchresults" directive in it). This
>> variable can be an array, in which case the first page found from the
>> array is used.
>> # Use Search page in current group if it exists, otherwise use Site.Search
>> $PageSearchForm = array('$Group.Search', '[=$[$SiteGroup/Search]=]');
>>
>> http://www.pmwiki.org/wiki/PmWiki/Search
>> http://www.pmwiki.org/wiki/Cookbook/SearchResults
>>
>> Gilles.
>>
>> ps : source isn't viewable in your site (for site.search).
>>
>>
>> 2010/4/9 Steve G. <wordz2u at gmail.com>:
>> > There is probably a trivial answer to each question, but it is not known
>> > to
>> > me.
>> >
>> > 1. When I run a search on any of my wikifarm's wiki, I get the results
>> > in
>> > camel print. Is there a way to format the search results with spaces
>> > between
>> > the words? I set the rest of the site like that, (a setting of space
>> > wiki
>> > words in config.php), but it does not seem to apply to search results.
>> >
>> > 2. Also, is there a way to set it so that the search functionality at
>> > the
>> > top right, which is part of the standard skin, searches the whole wiki,
>> > rather than the current group only?
>> >
>> > Thanks,
>> >
>> > Z.
>> >
>> > --
>> > Check out my web site - www.words2u.net
>> >
>> > _______________________________________________
>> > pmwiki-users mailing list
>> > pmwiki-users at pmichaud.com
>> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>> >
>> >
>>
>>
>>
>> --
>> ---------------------------------------
>> | A | de la langue française
>> | B | http://www.languefrancaise.net/
>> | C | languefrancaise at gmail.com
>> ---------------------------------------
>
>
>
> --
> Check out my web site - www.words2u.net
>



-- 
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------



More information about the pmwiki-users mailing list