On Sun, Nov 16, 2008 at 3:44 PM, alinome.net <[EMAIL PROTECTED]> wrote:
>
> I have created a search form in the front page, and the search results
> are shown on another page with [results]. But I don't know how to
> format the output. I have searched into the docs and the mail list,
> and found only one reference to "[results]" in the search tutorial. I
> supposed the search command accepts the same parameters than the
> search function, but this does not work:
>
> [session search "text='{=query}'" "exclude='pedazo*,
> {site.config::systemPages}'" "fmt='<(toc {+p} leader=* sort=title)>
> [[{+p}|+]]'"]
>
> The format still is the default breadcrumb.

Ah, it should be like this:

[session search "text='{=query}'
exclude='pedazo*,{site.config::systemPages}' fmt='<(toc {+p} leader=*
sort=title)> [[{+p}|+]]'"]

Your double quotes are separating all the parameters for the search,
when it should be one string.

> I see there's a call to BOLTargs before calling the function:
>
> function BOLTXsearch($value, $field) {
>        global $query, $outarray, $pageLink, $BOLTfieldKey;
>        $args = BOLTargs($value, 'x_search');
>        $query = BOLTFsearch($args);
>        if ($args['output'] != 'escape') $query = BOLTtemplatemarkup($query,
> '');
>
> but I have not found "x_search" in the rest of the core files. It
> seems is used only by the optional function BOLTargShortcuts, called
> at the end of BOLTargs.
>
> I took a look at BOLTargs but I was not sure if the arguments were
> being passed, so I put a check in BOLTXsearch:
>
>        $args = BOLTargs($value, 'x_search');
> foreach($args as $arg) echo $arg; // CHECK POINT
>        $query = BOLTFsearch($args);
>
> And only the search terms are showed. The other parameters don't pass.
> It seems they are not accepted by the regexp in BOLTargs.

The x_search type is only used in the BOLTargShortcuts function if it
exists. Not in the returned parameter array. Other types are also
passed to it like f_include or c_exists, etc. These allow you to do
whatever you want to basically any kind of string of parameters, but
only in very specific situations. As in only command searches.

Basically it is a hidden hook that allows a lot of fine tuning of
parameter outputs, but it's not used anywhere. Only available to
developers for special fun.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to