当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_article::getArticle方法代码示例

本文整理汇总了PHP中rex_article::getArticle方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_article::getArticle方法的具体用法?PHP rex_article::getArticle怎么用?PHP rex_article::getArticle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex_article的用法示例。


在下文中一共展示了rex_article::getArticle方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: rex_newsletter_sendmail

function rex_newsletter_sendmail($userinfo, $aid, $mail_reply, $mail_subject)
{
    global $REX;
    $tmp_redaxo = $REX['REDAXO'];
    $REX['REDAXO'] = true;
    // ***** HTML VERSION KOMPLETT
    $REX_ARTICLE = new rex_article();
    $REX_ARTICLE->setCLang(0);
    $REX_ARTICLE->setArticleId($aid);
    $REX_ARTICLE->getContentAsQuery(TRUE);
    // $REX_ARTICLE->setTemplateId(xx);
    $REX['ADDON']['NEWSLETTER_TEXT'] = FALSE;
    $html_body = $REX_ARTICLE->getArticleTemplate();
    // ***** TEXT VERSION
    $REX_ARTICLE = new rex_article();
    $REX_ARTICLE->setCLang(0);
    $REX_ARTICLE->setArticleId($aid);
    $REX_ARTICLE->getContentAsQuery(TRUE);
    // $REX_ARTICLE->setTemplateId(xx);
    $REX['ADDON']['NEWSLETTER_TEXT'] = TRUE;
    // FILTERN VERSION KOMPLETT
    $text_body = $REX_ARTICLE->getArticle();
    $text_body = str_replace("<br />", "<br />", $text_body);
    $text_body = str_replace("<p>", "\n\n</p>", $text_body);
    $text_body = str_replace("<ul>", "\n\n</ul>", $text_body);
    $text_body = preg_replace("#(\\<)(.*)(\\>)#imsU", "", $text_body);
    $text_body = html_entity_decode($text_body);
    $REX['REDAXO'] = true;
    // ***** MAIL VERSAND
    // Allgemeine Initialisierung
    // $mail = new PHPMailer();
    $mail = new rex_mailer();
    $mail->AddAddress($userinfo["email"]);
    $mail->From = $mail_reply;
    $mail->FromName = $mail_reply;
    $subject = $mail_subject;
    // Subject
    // Bodies
    // html
    foreach ($userinfo as $k => $v) {
        $subject = str_replace("###" . $k . "###", $v, $subject);
        $html_body = str_replace("###" . $k . "###", $v, $html_body);
        $text_body = str_replace("###" . $k . "###", $v, $text_body);
        $subject = str_replace("###" . strtoupper($k) . "###", $v, $subject);
        $html_body = str_replace("###" . strtoupper($k) . "###", $v, $html_body);
        $text_body = str_replace("###" . strtoupper($k) . "###", $v, $text_body);
    }
    // text
    // echo "<pre>$text_body</pre>";
    $mail->Subject = $subject;
    $mail->AltBody = $text_body;
    $mail->Body = $html_body;
    $mail->Send();
    $REX['REDAXO'] = $tmp_redaxo;
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:55,代码来源:config.inc.php

示例2: matchArticle

 /**
  * Wert für die Ausgabe
  */
 function matchArticle($content)
 {
     $var = 'REX_ARTICLE';
     $matches = $this->getArticleInputParams($content, $var);
     foreach ($matches as $match) {
         list($param_str, $article_id, $clang) = $match;
         $article = new rex_article($article_id, $clang);
         $content = str_replace($var . '[' . $param_str . ']', $article->getArticle(), $content);
     }
     return $content;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:14,代码来源:class.rex_var_article.inc.php

示例3: getArticle

 public function getArticle($articleId, $clangId = null)
 {
     global $REX;
     // set rex vars for this website
     $this->switchRexVars();
     // get article content
     $article = new rex_article($articleId, $clangId);
     $articleContent = $article->getArticle();
     // restore rex vars for current website
     $REX['WEBSITE_MANAGER']->getCurrentWebsite()->switchRexVars();
     return $articleContent;
 }
开发者ID:olien,项目名称:website_manager,代码行数:12,代码来源:class.rex_website.inc.php

示例4: eval

            ';
        if ($mode == 'edit') {
            // ------------------------------------------ START: MODULE EDITIEREN/ADDEN ETC.
            echo '
                  <!-- *** OUTPUT OF ARTICLE-CONTENT-EDIT-MODE - START *** -->
                  <div class="rex-cnt-editmode">
                  ';
            $CONT = new rex_article();
            $CONT->message = $message;
            $CONT->setArticleId($article_id);
            $CONT->setSliceId($slice_id);
            $CONT->setMode($mode);
            $CONT->setCLang($clang);
            $CONT->setEval(TRUE);
            $CONT->setFunction($function);
            eval("?>" . $CONT->getArticle($ctype));
            echo '
                  </div>
                  <!-- *** OUTPUT OF ARTICLE-CONTENT-EDIT-MODE - END *** -->
                  ';
            // ------------------------------------------ END: MODULE EDITIEREN/ADDEN ETC.
        } elseif ($mode == 'meta') {
            // ------------------------------------------ START: META VIEW
            echo '
    	  <div class="rex-cnt-metamode">
          <form action="index.php" method="post" enctype="multipart/form-data" id="REX_FORM">
            <fieldset>
              <legend class="rex-lgnd">' . $I18N->msg('general') . '</legend>

				      <div class="rex-fldst-wrppr">
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:30,代码来源:content.inc.php

示例5: indexColumn


//.........这里部分代码省略.........
     $sql->flush();
     $sql->setTable($_table);
     $where = '1 ';
     if (is_string($_idcol) and $_id) {
         $where .= sprintf(' AND (%s = %d)', $_idcol, $_id);
     }
     if (!empty($_where) and is_string($_where)) {
         $where .= ' AND (' . $_where . ')';
     }
     if (is_numeric($_start) and is_numeric($_count)) {
         $where .= ' LIMIT ' . $_start . ',' . $_count;
     }
     $sql->setWhere($where);
     $count = false;
     if ($sql->select('*')) {
         $this->beginFrontendMode();
         $count = 0;
         $keywords = array();
         foreach ($sql->getArray() as $value) {
             if (!empty($value[$_column]) and ($this->indexOffline or $this->tablePrefix . 'article' != $_table or $value['status'] == '1') and ($this->tablePrefix . 'article' != $_table or !in_array($value['id'], $this->excludeIDs))) {
                 $insert = new rex_sql();
                 $indexData = array();
                 $indexData['texttype'] = 'db_column';
                 $indexData['ftable'] = $_table;
                 $indexData['fcolumn'] = $_column;
                 if (array_key_exists('clang', $value)) {
                     $indexData['clang'] = $value['clang'];
                 } else {
                     $indexData['clang'] = NULL;
                 }
                 $indexData['fid'] = NULL;
                 if (is_string($_idcol) and array_key_exists($_idcol, $value)) {
                     $indexData['fid'] = $value[$_idcol];
                 } elseif ($_table == $this->tablePrefix . 'article') {
                     $indexData['fid'] = $value['id'];
                 } elseif (count($primaryKeys) == 1) {
                     $indexData['fid'] = $value[$primaryKeys[0]];
                 } elseif (count($primaryKeys)) {
                     $fids = array();
                     foreach ($primaryKeys as $pk) {
                         $fids[$pk] = $value[$pk];
                     }
                     $indexData['fid'] = json_encode($fids);
                 }
                 if (is_null($indexData['fid'])) {
                     $indexData['fid'] = $this->getMinFID();
                 }
                 if (array_key_exists('re_id', $value)) {
                     $indexData['catid'] = $value['re_id'];
                     if ($_table == $this->tablePrefix . 'article') {
                         $indexData['catid'] = intval($value['startpage']) ? $value['id'] : $value['re_id'];
                     }
                 } elseif (array_key_exists('category_id', $value)) {
                     $indexData['catid'] = $value['category_id'];
                 } else {
                     $indexData['catid'] = NULL;
                 }
                 $additionalValues = array();
                 foreach ($this->includeColumns[$_table] as $col) {
                     $additionalValues[$col] = $value[$col];
                 }
                 $indexData['values'] = $insert->escape(serialize($additionalValues));
                 $indexData['unchangedtext'] = $insert->escape((string) $value[$_column]);
                 $indexData['plaintext'] = $insert->escape($plaintext = $this->getPlaintext($value[$_column]));
                 foreach (preg_split($this->encodeRegex('~[[:punct:][:space:]]+~ism'), $plaintext) as $keyword) {
                     if ($this->significantCharacterCount <= mb_strlen($keyword, 'UTF-8')) {
                         $keywords[] = array('search' => $keyword, 'clang' => is_null($indexData['clang']) ? false : $indexData['clang']);
                     }
                 }
                 $indexData['teaser'] = '';
                 if ($this->tablePrefix . 'article' == $_table) {
                     $rex_article = new rex_article(intval($value['id']), intval($value['clang']));
                     $teaser = true;
                     $article_content_file = $this->generatedPath . '/articles/' . intval($value['id']) . '.' . intval($value['clang']) . '.content';
                     if (!file_exists($article_content_file)) {
                         include_once $this->includePath . "/functions/function_rex_generate.inc.php";
                         $generated = rex_generateArticleContent(intval($value['id']), intval($value['clang']));
                         if ($generated !== true) {
                             $teaser = false;
                             continue;
                         }
                     }
                     if (file_exists($article_content_file) and preg_match($this->encodeRegex('~(header\\s*\\(\\s*["\']\\s*Location\\s*:)|(rex_redirect\\s*\\()~is'), rex_get_file_contents($article_content_file))) {
                         $teaser = false;
                     }
                     $indexData['teaser'] = $teaser ? $insert->escape($this->getTeaserText($this->getPlaintext($rex_article->getArticle()))) : '';
                 }
                 $insert->setTable($this->tablePrefix . '587_searchindex');
                 $insert->setValues($indexData);
                 $insert->insert();
                 $count++;
             }
         }
         $this->storeKeywords($keywords, false);
         $this->endFrontendMode();
     } else {
         return false;
     }
     return $count;
 }
开发者ID:olien,项目名称:rexsearch,代码行数:101,代码来源:class.rexsearch.inc.php

示例6: getSlice

 function getSlice()
 {
     // TODO:: ------------------- .' AND revision='.$this->revision
     $art = new rex_article();
     $art->setArticleId($this->getArticleId());
     $art->setClang($this->getClang());
     $art->getSlice = $this->getId();
     $art->setEval(true);
     return @$art->replaceLinks($art->getArticle());
 }
开发者ID:eaCe,项目名称:redaxo4,代码行数:10,代码来源:class.ooarticleslice.inc.php

示例7: rex_generateArticle

/**
 * Generiert alle *.article u. *.content Dateien eines Artikels/einer Kategorie
 *
 * @param $id ArtikelId des Artikels, der generiert werden soll
 * @param $refreshall Boolean Bei True wird der Inhalte auch komplett neu generiert, bei False nur die Metainfos
 */
function rex_generateArticle($id, $refreshall = true)
{
    global $REX, $I18N;
    // artikel generieren
    // vorraussetzung: articel steht schon in der datenbank
    //
    // -> infos schreiben -> abhaengig von clang
    // --> artikel infos / einzelartikel metadaten
    // --> artikel content / einzelartikel content
    // --> listen generieren // wenn startpage = 1
    // ---> artikel liste
    // ---> category liste
    // --------------------------------------------------- generiere generated/articles/xx.article
    foreach ($REX['CLANG'] as $clang => $clang_name) {
        $MSG = '';
        $CONT = new rex_article();
        $CONT->setCLang($clang);
        $CONT->getContentAsQuery();
        $CONT->setMode("generate");
        // keine Ausgabe als eval(CONTENT) sondern nur speichern in datei
        if (!$CONT->setArticleId($id)) {
            return false;
        }
        // --------------------------------------------------- Artikelparameter speichern
        $params = array('article_id' => $id, 'last_update_stamp' => time());
        $class_vars = OORedaxo::getClassVars();
        unset($class_vars[array_search('id', $class_vars)]);
        $db_fields = $class_vars;
        foreach ($db_fields as $field) {
            $params[$field] = $CONT->getValue($field);
        }
        $content = '<?php' . "\n";
        foreach ($params as $name => $value) {
            $content .= '$REX[\'ART\'][' . $id . '][\'' . $name . '\'][' . $clang . '] = \'' . rex_addslashes($value, '\\\'') . '\';' . "\n";
        }
        $content .= '?>';
        if ($fp = @fopen($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.article", "w")) {
            fputs($fp, $content);
            fclose($fp);
            @chmod($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.article", 0777);
        } else {
            $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX['INCLUDE_PATH'] . "/generated/articles/";
        }
        // --------------------------------------------------- Artikelcontent speichern
        if ($refreshall) {
            if ($fp = @fopen($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.content", "w")) {
                $article_content = "?>" . $CONT->getArticle();
                fputs($fp, $article_content);
                fclose($fp);
                @chmod($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.content", 0777);
            } else {
                $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX['INCLUDE_PATH'] . "/generated/articles/";
            }
        }
        // ----- EXTENSION POINT
        $MSG = rex_register_extension_point('CLANG_ARTICLE_GENERATED', '', array('id' => $id, 'clang' => $clang, 'article' => $CONT));
        if ($MSG != '') {
            echo rex_warning($MSG);
        }
        // --------------------------------------------------- Listen generieren
        if ($CONT->getValue("startpage") == 1) {
            rex_generateLists($id);
            rex_generateLists($CONT->getValue("re_id"));
        } else {
            rex_generateLists($CONT->getValue("re_id"));
        }
    }
    // ----- EXTENSION POINT
    $MSG = rex_register_extension_point('ARTICLE_GENERATED', '', array('id' => $id));
}
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:76,代码来源:function_rex_generate.inc.php

示例8: enterObject

 function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
 {
     $artikel = new rex_article();
     $artikel->setArticleId($this->elements[1]);
     $form_output[] = '<div class="article">' . $artikel->getArticle() . '</div>';
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:6,代码来源:class.xform.article.inc.php

示例9:

            $error[] = "Bitte prüfen Sie ob alle Infos eingetragen sind";
        } else {
            $tmp_redaxo = $REX['REDAXO'];
            // ***** HTML VERSION KOMPLETT
            $REX['REDAXO'] = true;
            $REX_ARTICLE = new rex_article($redaxo_nl_article_id, 0);
            $REX_ARTICLE->getContentAsQuery(TRUE);
            $REX['ADDON']['NEWSLETTER_TEXT'] = FALSE;
            $nl_body_html = $REX_ARTICLE->getArticleTemplate();
            // ***** TEXT VERSION
            $REX['REDAXO'] = true;
            $REX_ARTICLE = new rex_article($redaxo_nl_article_id, 0);
            $REX_ARTICLE->getContentAsQuery(TRUE);
            $REX['ADDON']['NEWSLETTER_TEXT'] = TRUE;
            // FILTERN VERSION KOMPLETT
            $nl_body_text = $REX_ARTICLE->getArticle();
            $nl_body_text = str_replace("<br />", "<br />", $nl_body_text);
            $nl_body_text = str_replace("<p>", "\n\n</p>", $nl_body_text);
            $nl_body_text = str_replace("<ul>", "\n\n</ul>", $nl_body_text);
            $nl_body_text = preg_replace("#(\\<)(.*)(\\>)#imsU", "", $nl_body_text);
            $nl_body_text = html_entity_decode($nl_body_text);
            $REX['REDAXO'] = $tmp_redaxo;
            $send = TRUE;
        }
    }
}
// ---------- Testversand
if ($method == "start" && $method_all != "all" && count($error) == 0 && $send) {
    if ($test_user_id == 0) {
        $error[] = "User existiert nicht";
    } else {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:index.inc.php

示例10: getSlice

 /**
  * Gibt den Slice formatiert zurück
  */
 function getSlice()
 {
     $art = new rex_article();
     $art->setArticleId($this->getArticleId());
     $art->setClang($this->getClang());
     $art->getSlice = $this->getId();
     return $art->getArticle();
 }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:11,代码来源:class.ooarticleslice.inc.php

示例11: elseif

                  <!-- *** OUTPUT OF ARTICLE-CONTENT-EDIT-MODE - START *** -->
                  <div class="rex-content-editmode">
                  ';
            $CONT = new rex_article();
            $CONT->getContentAsQuery();
            $CONT->info = $info;
            $CONT->warning = $warning;
            $CONT->template_attributes = $template_attributes;
            $CONT->setArticleId($article_id);
            $CONT->setSliceId($slice_id);
            $CONT->setMode($mode);
            $CONT->setCLang($clang);
            $CONT->setEval(TRUE);
            $CONT->setSliceRevision($slice_revision);
            $CONT->setFunction($function);
            echo $CONT->getArticle($ctype);
            echo '
                  </div>
                  <!-- *** OUTPUT OF ARTICLE-CONTENT-EDIT-MODE - END *** -->
                  ';
            // ------------------------------------------ END: MODULE EDITIEREN/ADDEN ETC.
        } elseif ($mode == 'meta') {
            // ------------------------------------------ START: META VIEW
            echo '
    	  <div class="rex-form" id="rex-form-content-metamode">
          <form action="index.php" method="post" enctype="multipart/form-data" id="REX_FORM">
            <fieldset class="rex-form-col-1">
              <legend><span>' . $I18N->msg('general') . '</span></legend>

								<input type="hidden" name="page" value="content" />
								<input type="hidden" name="article_id" value="' . $article_id . '" />
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例12: article

<?php

// title: REDAXO-Artikel mit Artikel-ID bereitstellen
/**
 * Beispielmodul Artikel mit Artikel-ID bereitstellen
 */
// Include der Textile-Klasse
include $REX['INCLUDE_PATH'] . '/addons/textile/config.inc.php';
// Artikel-ID
$artid = rex_request('article_id', 'int');
$content = '';
// Artikel bereitstellen
if ($artid != 0) {
    if (class_exists('article')) {
        $art = new article();
    } else {
        $art = new rex_article();
    }
    if ($art->setArticleID($artid)) {
        $content = $art->getArticle('1');
    }
}
// Ausgabe, evtl. mit Header / Fehlermeldung
header('Content-Type: text/html; charset=utf-8');
if (trim($content) == '') {
    echo 'Artikel nicht gefunden!';
} else {
    echo $content;
}
开发者ID:crono,项目名称:_rex_ajax,代码行数:29,代码来源:article.inc.php

示例13: rex_generateArticleContent

/**
 * Generiert den Artikel-Cache des Artikelinhalts.
 * 
 * @param $article_id Id des zu generierenden Artikels
 * @param [$clang ClangId des Artikels]
 * 
 * @return TRUE bei Erfolg, FALSE wenn eine ungütlige article_id übergeben wird, sonst eine Fehlermeldung
 */
function rex_generateArticleContent($article_id, $clang = null)
{
    global $REX, $I18N;
    foreach ($REX['CLANG'] as $_clang => $clang_name) {
        if ($clang !== null && $clang != $_clang) {
            continue;
        }
        $CONT = new rex_article();
        $CONT->setCLang($_clang);
        $CONT->getContentAsQuery();
        // Content aus Datenbank holen, no cache
        $CONT->setEval(FALSE);
        // Content nicht ausführen, damit in Cachedatei gespeichert werden kann
        if (!$CONT->setArticleId($article_id)) {
            return FALSE;
        }
        // --------------------------------------------------- Artikelcontent speichern
        $article_content_file = $REX['INCLUDE_PATH'] . "/generated/articles/{$article_id}.{$_clang}.content";
        $article_content = "?>" . $CONT->getArticle();
        // ----- EXTENSION POINT
        $article_content = rex_register_extension_point('GENERATE_FILTER', $article_content, array('id' => $article_id, 'clang' => $_clang, 'article' => $CONT));
        if (rex_put_file_contents($article_content_file, $article_content) === FALSE) {
            return $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX['INCLUDE_PATH'] . "/generated/articles/";
        }
    }
    return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:35,代码来源:function_rex_generate.inc.php

示例14: array

 function rex_indexSite()
 {
     global $REX, $DB;
     $SQL = 'SELECT id,clang FROM rex_article ';
     $WHERE = '';
     // ----- diese artikel filtern
     /*
     $WHERE = " where status=1";
     
     $artikelidfilter = array(1,2,3,4,5,6);
     foreach($artikelidfilter as $key => $val)
     {
     	$WHERE .= " and id<>'".$key."'";
     }
     */
     $LIMIT = "";
     $db2 = new rex_sql();
     $stop = false;
     $oldstart = rex_request('oldstart', 'int');
     $start = rex_request('start', 'int');
     if ($oldstart == $start && $start !== 0) {
         $stop = true;
     }
     if ($start) {
         $LIMIT = "LIMIT {$start}, 4000";
         $oldstart = $start;
     } else {
         // Index erst nach den Daten einfügen,
         // da in eine Tabelle mit schon bestehendem Index, der Insert viel länger dauert
         $db2->setQuery('ALTER TABLE `' . $this->indexTable() . '` DROP INDEX `full_content`');
         $db2->setQuery('ALTER TABLE `' . $this->indexTable() . '` DROP INDEX `full_name`');
         // Tabelle leeren
         $db2->setQuery('TRUNCATE TABLE `' . $this->indexTable() . '`');
         // kopiere alle Metadaten
         $db2->setQuery('INSERT INTO `' . $this->indexTable() . '` (`id`,`path`,`clang`,`status`,`name`,`keywords`)
                   SELECT `id`,`path`,`clang`,`status`,`name`,`art_keywords`
                   FROM `rex_article`');
     }
     if ($stop) {
         $error_id = rex_request('errorid');
         $error_clang = rex_request('errorclang');
         return "Bei der Indexgenerieung ist ein Fehler unterlaufen. Das kann an eventuell fehlerhaften Artikeln liegen.\n      \t\tBei folgendem Artikel kam ein Fehler. <a href=index.php?page=content&article_id=" . $error_id . "&mode=edit&clang=" . $error_clang . ">-> Artikel</a>";
     } else {
         $i = $start;
         $db2->setQuery($SQL . ' ' . $WHERE . ' ' . $LIMIT);
         $CONTENT = ob_get_contents();
         ob_end_clean();
         for ($t = 0; $t < $db2->getRows(); $t++) {
             $art_id = $db2->getValue('id');
             $art_clang = $db2->getValue('clang');
             ob_end_clean();
             ob_start();
             echo "<html><head><title>REX SEARCH</title></head><body bgcolor=#fffff3>\n        \t\t\tScriptlaufzeit war zu kurz, der Prozess wird sofort\n        \t\t\tweitergeführt. Sollten Sie dennoch abbrechen wollen dann <a href=index.php?page=search_index>hier</a>.\n        \t\t\t<br><br>\n        \t\t\tSollte das Script sich nicht erneut aufrufen, dann <a href=index.php?page=search_index&subpage=gen_index&start=" . $i . "&oldstart=" . $oldstart . "&errorid=" . $art_id . "&errorclang=" . $art_clang . ">hier</a> klicken um den Prozess weiterzuführen.\n\n        \t\t\t<br><br><a href=index.php?page=content&article_id=" . $art_id . "&mode=edit&clang=" . $art_clang . ">Bei diesem Artikel wurde abgebrochen</a>\n\n        \t\t\t<br><br><br><br>";
             $REX['GG'] = true;
             $REX['REDAXO'] = false;
             $article = new rex_article($art_id, $art_clang);
             $artcache = $article->getArticle();
             // Da dieser Prozess recht speicherintensiv ist, variable manuell löschen
             unset($article);
             $artcache = rex_register_extension_point('OUTPUT_FILTER', $artcache);
             $artcache = rex_register_extension_point('SEARCH_ARTICLE_GENERATED', $artcache);
             $REX['REDAXO'] = true;
             $REX['GG'] = false;
             if ($this->striptags) {
                 $artcache = strip_tags($artcache, $this->allowable_tags);
             }
             $sql = "UPDATE `" . $this->indexTable() . "` SET content='" . mysql_escape_string($artcache) . "' WHERE id=" . $art_id . " AND clang=" . $art_clang;
             // falls im artikel eine andere datnebank aufgerufen wurde
             $db_insert = new rex_sql();
             $db_insert->setQuery($sql);
             $i++;
             $db2->next();
         }
         // Index erst nach den Daten einfügen,
         // da in eine Tabelle mit schon bestehendem Index, der Insert viel länger dauert
         $db2->setQuery('ALTER TABLE `' . $this->indexTable() . '` ADD FULLTEXT `full_content` (`name` ,`keywords` ,`content`)');
         $db2->setQuery('ALTER TABLE `' . $this->indexTable() . '` ADD FULLTEXT `full_name` (`name`)');
         ob_end_clean();
         echo $CONTENT;
         return "Suchindex wurde erneuert!";
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:82,代码来源:class.search_index.inc.php


注:本文中的rex_article::getArticle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。