function &art_displayTarea(&$text, $html = 1, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
{
    $myts =& MyTextSanitizer::getInstance();
    if ($html != 1) {
        // html not allowed
        $text = art_htmlSpecialChars($text);
    }
    $text = $myts->codePreConv($text, $xcode);
    $text = $myts->makeClickable($text);
    if ($smiley != 0) {
        // process smiley
        $text = $myts->smiley($text);
    }
    if ($xcode != 0) {
        // decode xcode
        $text = $myts->xoopsCodeDecode($text, $image);
    }
    if ($br != 0) {
        $text = $myts->nl2Br($text);
    }
    $text = $myts->codeConv($text, $xcode, $image);
    return $text;
}
Example #2
0
 /**
  * get text content of a specified page of the article
  *
  * @param int $page page no
  * @param string $format text format
  * @return array
  */
 function &getText($page = -1, $format = "s")
 {
     global $xoopsModuleConfig;
     $format = strtolower($format);
     $text = $this->_getText($page, $format);
     if (empty($text)) {
         return $text;
     }
     if ($format == "e" || $format == "edit" || $format == "n" || $format == "none") {
         return $text;
     }
     if ($format == "raw") {
         mod_loadFunctions("render", $GLOBALS["artdirname"]);
         $ret = array("title" => art_htmlSpecialChars($text["title"]), "body" => art_displayTarea($text["body"]));
         return $ret;
     }
     $body =& $text["body"];
     $body = $this->parseNotes($body);
     $body = $this->parseHeadings($body);
     $ret = array("title" => $text["title"], "body" => $body);
     return $ret;
 }