ich verwende diese Aktion in REDAXO 4 erfolgreich. Folgender code ist beim Feld Postsave-Action eingetragen:
- Code: Alles auswählen
<?php
$REX['GG'] = true;
$REX['REDAXO'] = false;
$a = new article;
$a->setArticleId($_REQUEST['article_id']);
$a->setClang($_REQUEST['clang']);
$content = $a->getArticle();
$content = strip_tags($content);
$content = mysql_real_escape_string($content);
$sql = new sql;
$sql->setQuery('DELETE FROM rex_tmp_12_search_index
WHERE id = '.$_REQUEST['article_id'].' AND clang = '.$_REQUEST['clang']);
$qry = 'INSERT INTO rex_tmp_12_search_index
(id, path, status, clang, name, keywords, content)
VALUES ('.$a->getValue('article_id').',
"'.$a->getValue('path').'",
'.(int)$a->getValue('status').',
'.$_REQUEST['clang'].',
"'.$a->getValue('name').'",
"'.$a->getValue('keywords').'", "'.$content.'")';
//$sql->debugsql = true;
$sql->setQuery($qry);
unset($a);
$REX['REDAXO'] = true;
$REX['GG'] = false;
?>
HTH
Simon

