DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:fulltext_phrase_match

FULLTEXT_PHRASE_MATCH

Description:
Allow phrase matching with content from plugins
DefaultAction:
Does phrase matching with the wiki text
Preventable:
yes
Added:
2014-03-02

This event is signalled by _ft_pageSearch() in inc/fulltext.php when phrases are matched with the page content, handlers can use it to match their own page related content with the phrase as well.

Passed Data

The $event->data is passed the following array:

[
    'id' => $id, // string, page id
    'phrase' => $phrase, //string, phrase to match with the content
    'text' => rawWiki($id) //string, raw content of the wiki article
];

If the phrase matches the content, then $evt->result must be set to true. If already true, no further processing is needed.

See also

devel/event/fulltext_phrase_match.txt · Last modified: 2022-09-17 01:30 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki