| Versionen | |
|---|---|
| drupal7 | hook_node_update_index($node) |
The node is being indexed.
If you want additional information to be indexed which is not already visible through node "view", then you should return it here.
$node The node the action is being performed on.
Array of additional information to be indexed.
modules/
<?php
function hook_node_update_index($node) {
$text = '';
$comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
foreach ($comments as $comment) {
$text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format, '', FALSE);
}
return $text;
}
?>
Kommentare
Kommentar hinzufügen