[Pmwiki-users] extended search-function
Patrick R. Michaud
Thu Sep 2 06:56:10 CDT 2004
On Thu, Sep 02, 2004 at 01:25:52PM +0200, Knut Alboldt wrote:
> The result now is quite ok but I need to strip the wiki-tags from the text.
> Is there a simple possibility (function call etc) to do this (pmwiki v1 /
> v2) ?
It's not so simple in v1. In v2 the MarkupToHTML function can be called
to convert the markup text into HTML, and then you could strip out the
HTML tags to get just the resulting text. If this becomes an important
enough feature, we might be able to generate an alternate translation
table that is used to convert markup text into "plain text".
> Another question is: is there already a function in pmwiki parsing a
> pages text into paragraphs ?
Nope. Basically you can do a preg_split on blank lines to get the
> When finally implemented, I think I've to include the feature described in
> http://www.pmwiki.org/wiki/Development/SearchPermissions otherwise
> "restricted" information can simply be shown with an extended search.
Indeed, while working on v2's search function I noticed this bug as well.
I'll probably change the search to use RetrieveAuthPage instead of ReadPage
to get the pages to be searched.
More information about the pmwiki-users