Translations of this page?:

INDEXER_PAGE_ADD

Description:
manipulate the full text indexing process
DefaultAction:
add the page data to the index
Preventable:
yes
Added:
2007-02-27

This event is signalled by idx_addPage() in inc/indexer.php before a page is added to the index. Before the 2011-05-25 “Rincewind” release this event was signalled by idx_getPageWords() in inc/indexer.php before a page was added to the fulltext index.

Passed Data

Since 2011-03-06 (included in the 2011-05-25 “Rincewind” release) the data structure is:

  • $data['page'] – the page id
  • $data['body'] – empty, can be filled by additional content to index by your plugin
  • $data['metadata'] – the metadata that shall be indexed. This is an array where the keys are the metadata indexes and the value a string or an array of strings with the values. title and relation_references will already be set.

All data you put into $data['body'] will be prepended to the real page content. If you don't want the page content to be added call preventDefault().

The old data structure (used before the 2011-05-25 “Rincewind” release) was:

  • $data[0] – the page id
  • $data[1] – empty, can be filled by additional content to index by your plugin (used in the same way as the new 'body')

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/indexer_page_add.txt · Last modified: 2011/10/02 11:43 by Michitux
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate