Exemple #1
0
         $articletag['poster'] = $user->getvar('uname');
     }
     $articletag['poster'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('uid') . "'>" . $articletag['poster'] . "</a>";
 } else {
     $articletag['poster'] = $xoopsConfig['anonymous'];
 }
 // $datetime
 if (isset($article->published)) {
     $articletag['datetime'] = formatTimestamp($article->published, $wfsConfig['timestamp']);
 }
 // $title
 $articletag['title'] = $article->category->textLink() . ": ";
 $articletag['title'] .= $article->title();
 //Counter
 $counter = $article->counter;
 $pagenum = $article->maintextPages() - 1;
 if ($page > $pagenum) {
     $page = $pagenum;
 }
 if ($page == -2) {
     $page = 0;
 }
 $articletag['maintext'] = $article->maintextWithFile("S", $page);
 if ($article->ishtml != '0' && $article->htmlpage()) {
     $maintextfile = XOOPS_ROOT_PATH . '/' . $wfsConfig['htmlpath'] . '/' . $article->htmlpage;
     if (file_exists($maintextfile) && false !== ($fp = fopen($maintextfile, 'r'))) {
         $articletag['maintext'] = fread($fp, filesize($maintextfile));
         fclose($fp);
     }
 }
 // Setup URL link for article