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


PHP article::setArticleId方法代码示例

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


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

示例1: rex_generateArticle

function rex_generateArticle($id, $refresh = 0)
{
    global $PHP_SELF, $module_id, $FORM, $REX_USER, $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
    // --> cache loeschen
    // --------------------------------------------------- generiere generated/articles/xx.article
    $CL = $REX[CLANG];
    reset($CL);
    for ($i = 0; $i < count($CL); $i++) {
        $clang = key($CL);
        $REX[RC] = true;
        // keine Ausgabe als eval(CONTENT) sondern nur speichern in datei
        $CONT = new article();
        $CONT->setCLang($clang);
        $CONT->setArticleId($id);
        $article_content = "?>" . $CONT->getArticle();
        // --------------------------------------------------- Artikelparameter speichern
        $article = "<?\n" . "\n\$REX[ART][{$id}][article_id][{$clang}] = \"{$id}\";" . "\n\$REX[ART][{$id}][re_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("re_id")) . "\";" . "\n\$REX[ART][{$id}][name][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][catname][{$clang}] = \"" . rex_addslashes($CONT->getValue("catname")) . "\";" . "\n\$REX[ART][{$id}][cattype][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][alias][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][description][{$clang}] = \"" . rex_addslashes($CONT->getValue("description")) . "\";" . "\n\$REX[ART][{$id}][attribute][{$clang}] = \"" . rex_addslashes($CONT->getValue("attribute")) . "\";" . "\n\$REX[ART][{$id}][file][{$clang}] = \"" . rex_addslashes($CONT->getValue("file")) . "\";" . "\n\$REX[ART][{$id}][type_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("type_id")) . "\";" . "\n\$REX[ART][{$id}][teaser][{$clang}] = \"" . rex_addslashes($CONT->getValue("teaser")) . "\";" . "\n\$REX[ART][{$id}][startpage][{$clang}] = \"" . rex_addslashes($CONT->getValue("startpage")) . "\";" . "\n\$REX[ART][{$id}][prior][{$clang}] = \"" . rex_addslashes($CONT->getValue("prior")) . "\";" . "\n\$REX[ART][{$id}][path][{$clang}] = \"" . rex_addslashes($CONT->getValue("path")) . "\";" . "\n\$REX[ART][{$id}][status][{$clang}] = \"" . rex_addslashes($CONT->getValue("status")) . "\";" . "\n\$REX[ART][{$id}][online_from][{$clang}] = \"" . rex_addslashes($CONT->getValue("online_from")) . "\";" . "\n\$REX[ART][{$id}][online_to][{$clang}] = \"" . rex_addslashes($CONT->getValue("online_to")) . "\";" . "\n\$REX[ART][{$id}][createdate][{$clang}] = \"" . rex_addslashes($CONT->getValue("createdate")) . "\";" . "\n\$REX[ART][{$id}][updatedate][{$clang}] = \"" . rex_addslashes($CONT->getValue("updatedate")) . "\";" . "\n\$REX[ART][{$id}][keywords][{$clang}] = \"" . rex_addslashes($CONT->getValue("keywords")) . "\";" . "\n\$REX[ART][{$id}][template_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("template_id")) . "\";" . "\n\$REX[ART][{$id}][createuser][{$clang}] = \"" . rex_addslashes($CONT->getValue("createuser")) . "\";" . "\n\$REX[ART][{$id}][updateuser][{$clang}] = \"" . rex_addslashes($CONT->getValue("updateuser")) . "\";" . "\n\$REX[ART][{$id}][last_update_stamp][{$clang}] = \"" . time() . "\";" . "\n?>";
        if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.article", "w")) {
            fputs($fp, $article);
            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 ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.content", "w")) {
            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/";
        }
        if ($MSG != "") {
            echo "<table border=0 cellpadding=5 cellspacing=1 width=770><tr><td class=warning>{$MSG}</td></tr></table>";
        }
        $REX[RC] = false;
        // --------------------------------------------------- Listen generieren
        if ($CONT->getValue("startpage") == 1) {
            rex_generateLists($id);
            rex_generateLists($CONT->getValue("re_id"));
        } else {
            rex_generateLists($CONT->getValue("re_id"));
        }
        next($CL);
    }
    // --------------------------------------------------- recache all
    $Cache = new Cache();
    $Cache->removeAllCacheFiles();
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:58,代码来源:function_rex_generate.inc.php

示例2: 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 $PHP_SELF, $module_id, $FORM, $REX_USER, $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
    $CL = $REX['CLANG'];
    reset($CL);
    for ($i = 0; $i < count($CL); $i++) {
        $clang = key($CL);
        $REX['RC'] = true;
        // keine Ausgabe als eval(CONTENT) sondern nur speichern in datei
        $CONT = new article();
        $CONT->setCLang($clang);
        $CONT->setArticleId($id);
        // --------------------------------------------------- Artikelparameter speichern
        $article = "<?php\n" . "\n\$REX['ART']['{$id}']['article_id']['{$clang}'] = \"{$id}\";" . "\n\$REX['ART']['{$id}']['re_id']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("re_id")) . "\";" . "\n\$REX['ART']['{$id}']['name']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX['ART']['{$id}']['catname']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("catname")) . "\";" . "\n\$REX['ART']['{$id}']['cattype']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX['ART']['{$id}']['alias']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX['ART']['{$id}']['description']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("description")) . "\";" . "\n\$REX['ART']['{$id}']['attribute']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("attribute")) . "\";" . "\n\$REX['ART']['{$id}']['file']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("file")) . "\";" . "\n\$REX['ART']['{$id}']['type_id']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("type_id")) . "\";" . "\n\$REX['ART']['{$id}']['teaser']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("teaser")) . "\";" . "\n\$REX['ART']['{$id}']['startpage']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("startpage")) . "\";" . "\n\$REX['ART']['{$id}']['prior']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("prior")) . "\";" . "\n\$REX['ART']['{$id}']['path']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("path")) . "\";" . "\n\$REX['ART']['{$id}']['status']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("status")) . "\";" . "\n\$REX['ART']['{$id}']['online_from']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("online_from")) . "\";" . "\n\$REX['ART']['{$id}']['online_to']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("online_to")) . "\";" . "\n\$REX['ART']['{$id}']['createdate']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("createdate")) . "\";" . "\n\$REX['ART']['{$id}']['updatedate']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("updatedate")) . "\";" . "\n\$REX['ART']['{$id}']['keywords']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("keywords")) . "\";" . "\n\$REX['ART']['{$id}']['template_id']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("template_id")) . "\";" . "\n\$REX['ART']['{$id}']['createuser']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("createuser")) . "\";" . "\n\$REX['ART']['{$id}']['updateuser']['{$clang}'] = \"" . rex_addslashes($CONT->getValue("updateuser")) . "\";" . "\n\$REX['ART']['{$id}']['last_update_stamp']['{$clang}'] = \"" . time() . "\";" . "\n?>";
        if ($fp = @fopen($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.article", "w")) {
            fputs($fp, $article);
            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/";
            }
        }
        if (isset($MSG) and $MSG != "") {
            echo "<table border=0 cellpadding=5 cellspacing=1 width=770><tr><td class=warning>{$MSG}</td></tr></table>";
        }
        $REX['RC'] = false;
        // --------------------------------------------------- Listen generieren
        if ($CONT->getValue("startpage") == 1) {
            rex_generateLists($id);
            rex_generateLists($CONT->getValue("re_id"));
        } else {
            rex_generateLists($CONT->getValue("re_id"));
        }
        next($CL);
    }
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:62,代码来源:function_rex_generate.inc.php

示例3: showScripttime

                print "<br>CachedVersion<br>";
            }
            if ($REX[CACHING_DEBUG]) {
                print "Script time: " . showScripttime();
            }
            $SHOWARTICLE = false;
        } else {
            // start caching
            $Cache->startCacheFile();
        }
    }
}
if ($SHOWARTICLE) {
    $REX_ARTICLE = new article();
    $REX_ARTICLE->setCLang($clang);
    if ($REX_ARTICLE->setArticleId($article_id)) {
        $REX_ARTICLE->getArticleTemplate();
    } elseif ($REX_ARTICLE->setArticleId($REX[STARTARTIKEL_ID])) {
        $REX_ARTICLE->getArticleTemplate();
    } else {
        echo "Kein Startartikel selektiert / No starting Article selected. Please click here to enter <a href=redaxo/index.php>redaxo</a>";
        $REX[STATS] = 0;
    }
    //////////////////////////////////////////////
    // advanced caching
    //////////////////////////////////////////////
    if ($Cache->makeCacheFile) {
        $Cache->writeCacheFile();
        if ($REX[CACHING_DEBUG]) {
            print "<br>MadeCache<br>";
        }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:index.php

示例4: article

// Wenn $REX[GG] = true; dann wird der
// Content aus den redaxo/include/generated/
// genommen
$REX['GG'] = true;
// setzte pfad und includiere klassen und funktionen
$REX['HTDOCS_PATH'] = "./";
include "./redaxo/include/master.inc.php";
// Starte einen neuen Artikel und setzte die aktuelle
// artikel id. wenn nicht vorhanden, nimm einen
// speziellen artikel. z.b. fehler seite oder home seite
if (!isset($article_id) or $article_id == '') {
    $article_id = $REX['START_ARTICLE_ID'];
}
$REX_ARTICLE = new article();
$REX_ARTICLE->setCLang($clang);
if ($REX_ARTICLE->setArticleId($article_id)) {
    echo $REX_ARTICLE->getArticleTemplate();
} elseif ($REX_ARTICLE->setArticleId($REX['NOTFOUND_ARTICLE_ID'])) {
    echo $REX_ARTICLE->getArticleTemplate();
} else {
    echo 'Kein Startartikel selektiert / No starting Article selected. Please click here to enter <a href="redaxo/index.php">redaxo</a>';
    $REX['STATS'] = 0;
}
// ----- caching end für output filter
$CONTENT = ob_get_contents();
ob_end_clean();
// ----- EXTENSION POINT
$CONTENT = rex_register_extension_point('OUTPUT_FILTER', $CONTENT);
// ----- EXTENSION POINT - keine Manipulation der Ausgaben ab hier (read only)
rex_register_extension_point('OUTPUT_FILTER_CACHE', $CONTENT, '', true);
// ----- inhalt endgueltig ausgeben
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:index.php

示例5: article

     echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16 vspace=4></td><td class=warning>&nbsp;&nbsp;{$message}</td><td class=lgrey>&nbsp;</td></tr>";
 }
 if (isset($_REQUEST["msg"]) and $_REQUEST["msg"] != "") {
     echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16 vspace=4></td><td class=warning>&nbsp;&nbsp;" . $_REQUEST["msg"] . "</td><td class=lgrey>&nbsp;</td></tr>";
 }
 echo "  <tr>\n          <td class=lgrey>&nbsp;</td>\n          <td valign=top class=lblue>";
 if ($mode == "edit") {
     if (!isset($slice_id)) {
         $slice_id = '';
     }
     if (!isset($function)) {
         $function = '';
     }
     // ------------------------------------------ START: MODULE EDITIEREN/ADDEN ETC.
     $CONT = new article();
     $CONT->setArticleId($article_id);
     $CONT->setSliceId($slice_id);
     $CONT->setMode($mode);
     $CONT->setCLang($clang);
     $CONT->setCType($ctype);
     $CONT->setEval(TRUE);
     $CONT->setFunction($function);
     eval("?>" . $CONT->getArticle());
     // ------------------------------------------ END: MODULE EDITIEREN/ADDEN ETC.
 } elseif ($mode == "meta") {
     // ------------------------------------------ START: META VIEW
     $extens = "";
     if (isset($save) and $save == "1") {
         $meta_sql = new sql();
         $meta_sql->setTable($REX['TABLE_PREFIX'] . "article");
         // $meta_sql->debugsql = 1;
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php

示例6: generateArticle

function generateArticle($id)
{
    global $PHP_SELF, $module_id, $FORM, $REX_USER, $REX, $I18N;
    // --------------------------------------------------- generiere generated/articles/xx.article
    $REX[RC] = true;
    // Generiere Content
    $CONT = new article();
    $CONT->setArticleId($id);
    $REX[TEMP] = $REX[BF];
    $REX[BF] = false;
    $article_content = "?>" . $CONT->getArticle();
    $REX[BF] = true;
    $article_bcontent = "?>" . $CONT->getArticle();
    $REX[BF] = $REX[TEMP];
    $article = "<?\r\n\r\n\$REX[ART][{$id}][name] = \"" . addslashes($CONT->getValue("name")) . "\";\r\n\$REX[ART][{$id}][beschreibung] = \"" . addslashes($CONT->getValue("beschreibung")) . "\";\r\n\$REX[ART][{$id}][suchbegriffe] = \"" . addslashes($CONT->getValue("suchbegriffe")) . "\";\r\n\$REX[ART][{$id}][category_id] = \"" . addslashes($CONT->getValue("category_id")) . "\";\r\n\$REX[ART][{$id}][article_id] = \"{$id}\";\r\n\$REX[ART][{$id}][type_id] = \"" . addslashes($CONT->getValue("type_id")) . "\";\r\n\$REX[ART][{$id}][file] = \"" . addslashes($CONT->getValue("file")) . "\";\r\n\$REX[ART][{$id}][startpage] = \"" . addslashes($CONT->getValue("startpage")) . "\";\r\n\$REX[ART][{$id}][prio] = \"" . addslashes($CONT->getValue("prio")) . "\";\r\n\$REX[ART][{$id}][path] = \"" . addslashes($CONT->getValue("path")) . "\";\r\n\$REX[ART][{$id}][online_von] = \"" . addslashes($CONT->getValue("online_von")) . "\";\r\n\$REX[ART][{$id}][online_bis] = \"" . addslashes($CONT->getValue("online_bis")) . "\";\r\n\$REX[ART][{$id}][erstelldatum] = \"" . addslashes($CONT->getValue("erstelldatum")) . "\";\r\n\$REX[ART][{$id}][template_id] = \"" . addslashes($CONT->getValue("template_id")) . "\";\r\n\$REX[ART][{$id}][status] = \"" . addslashes($CONT->getValue("status")) . "\";\r\n\r\n?>";
    // Artikelparameter speichern
    if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/" . $id . ".article", "w")) {
        fputs($fp, $article);
        fclose($fp);
    } else {
        $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "/generated/articles/";
    }
    // Artikelcontent speichern
    if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/" . $id . ".content", "w")) {
        fputs($fp, $article_content);
        fclose($fp);
    } else {
        $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "/generated/articles/";
    }
    // Artikel B content speichern [BARRIEREFREI]
    if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/" . $id . ".bcontent", "w")) {
        fputs($fp, $article_bcontent);
        fclose($fp);
    } else {
        $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "generated/articles/";
    }
    if ($MSG != "") {
        echo "\t<table border=0 cellpadding=5 cellspacing=1 width=770>\r\n\t\t\t<tr><td class=warning>{$MSG}</td></tr>\r\n\t\t\t</table>";
    }
    $REX[RC] = false;
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:41,代码来源:function_rex_generate.inc.php

示例7: article

 // $mail_reply
 // $mail_subject
 // $mail_aid
 // $test_email
 // $test_name
 // $test_firstname
 // $content
 $to_email = $test_email;
 $to_name = $test_name;
 $to_firstname = $test_firstname;
 // Testmail verschicken..
 $REX['GG'] = true;
 $REX['REDAXO'] = true;
 $REX_ARTICLE = new article();
 $REX_ARTICLE->setCLang(0);
 $REX_ARTICLE->setArticleId($mail_aid);
 // $REX_ARTICLE->setTemplateId(xx);
 $content = $REX_ARTICLE->getArticleTemplate();
 $REX['GG'] = false;
 $REX['REDAXO'] = true;
 // Allgemeine Initialisierung
 $mail = new MyMailer();
 $mail->AddAddress($to_email);
 $mail->From = $mail_reply;
 $mail->FromName = $mail_reply;
 // Subject
 $subject = $mail_subject;
 $subject = str_replace("###EMAIL###", "{$to_email}", $subject);
 $subject = str_replace("###NAME###", "{$to_name}", $subject);
 $subject = str_replace("###FIRSTNAME###", "{$to_firstname}", $subject);
 // Bodies
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:newsletter.inc.php


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