[pmwiki-users] Fix for: SearchExtensions broken in beta33
John Rankin
john.rankin at affinity.co.nz
Thu May 26 20:59:25 CDT 2005
On Friday, 27 May 2005 1:19 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Mon, May 02, 2005 at 09:51:31AM +1200, John Rankin wrote:
>> I have got SearchExtensions working again. However, we need a patch
>> to scripts/pagelist.php function FmtPageList please, Patrick:
>>
>> - the 3 $GLOBALS statements that set SearchIncl, SearchExcl and
>> SearchGroup need to move *above* the call to $fmtfn (I put them
>> right above the $matches = array(); statement)
>
>Done for beta37. Of course, this means that if the $fmtfn makes
>any changes to SearchIncl, SearchExcl, or SearchGroup then it
>needs to (re-)set the globals appropriately.
Thank you and noted.
>
>> I had to do a few fixes because local fmtfm code no longer knows
>> the $MatchCount.
>
>In the new design of pagelist, each of the $fmtfn functions is
>supposed to set any formatting-specific options, then call
>MakePageList(). After calling MakePageList the function can then
>determine and set the $MatchCount if it needs it.
Yup.
Well now... is there a way for a fmtfn to determine whether it
is being executed in a side bar or on the main body??
Consider a page with ?action=links and a (:linkslist HomePage:)
in the side bar. The action lists all the links on the current
page; the (:linkslist ... :) lists all the links on HomePage.
Now suppose that I want to "Publish-button" the links on the
current page -- generate a report of all the topics associated
with the current page. I need to re-format the main page list
as a form with check boxes, while preserving the side bar format.
It seems a shame to have to create 2 fmtfn functions, when the
only difference is the format, which is all controlled in
Fmt variables.
I could pass another parameter through (:linkslist ... :)
of course, but this seems a poor solution. Any suggestions?
I hope this question makes sense.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list