DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:fulltext_snippet_create

FULLTEXT_SNIPPET_CREATE

Description:
Search result snippet creation
DefaultAction:
Creates a snippet using some regexp magic created from the given search string
Preventable:
yes
Added:
2009-10-26

This event wraps the creation of a search result snippet extracted from the raw page source matching the keywords the user searched for.

Passed Data

The data is passed the following array:

[
    'id'        => $id,
    'text'      => &$text,
    'highlight' => &$highlight,
    'snippet'   => '',
];

text and highlight can be modified from within the BEFORE event. snippet will be filled with the final HTML snippet in the AFTER event or can be set on your own in the BEFORE event.

See also

devel/event/fulltext_snippet_create.txt · Last modified: 2022-09-17 01:31 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