$story['morelink'] = ''; $story['adminlink'] = ''; unset($isadmin); if (is_object($xoopsUser)) { if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || news_getmoduleoption('authoredit') && $article->uid() == $xoopsUser->getVar('uid')) { $isadmin = true; $story['adminlink'] = $article->adminlink(); } } $story['topicid'] = $article->topicid(); $story['topic_color'] = '#' . $myts->displayTarea($article->topic_color); $story['imglink'] = ''; $story['align'] = ''; if ($article->topicdisplay()) { $story['imglink'] = $article->imglink(); $story['align'] = $article->topicalign(); } $story['hits'] = $article->counter(); $story['mail_link'] = 'mailto:?subject=' . sprintf(_NW_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . XOOPS_URL . '/modules/news/article.php?storyid=' . $article->storyid(); $xoopsTpl->assign('lang_printerpage', _NW_PRINTERFRIENDLY); $xoopsTpl->assign('lang_sendstory', _NW_SENDSTORY); $xoopsTpl->assign('lang_pdfstory', _NW_MAKEPDF); $xoopsTpl->assign('lang_on', _ON); $xoopsTpl->assign('lang_postedby', _POSTEDBY); $xoopsTpl->assign('lang_reads', _READS); $xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_NW_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . XOOPS_URL . '/modules/news/article.php?storyid=' . $article->storyid()); if (xoops_trim($article->picture()) != '') { $xoopsTpl->assign('articlePicture', XOOPS_URL . '/modules/news/images/topics/' . $article->picture()); } else { $xoopsTpl->assign('articlePicture', ''); }
$hometext = $story->hometext('InForm'); if ($approveprivilege) { $bodytext = $story->bodytext('InForm'); $ihome = $story->ihome(); $description = $story->description('E'); $keywords = $story->keywords('E'); } //Display post preview $newsauthor = $story->uid(); $p_title = $story->title('Preview'); $p_hometext = $story->hometext('Preview'); if ($approveprivilege) { $p_bodytext = $story->bodytext('Preview'); $p_hometext .= '<br /><br />' . $p_bodytext; } $topicalign2 = isset($story->topicalign) ? 'align="' . $story->topicalign() . '"' : ''; $p_hometext = $xt->topic_imgurl() != '' && $topicdisplay ? '<img src="images/topics/' . $xt->topic_imgurl() . '" ' . $topicalign2 . ' alt="" />' . $p_hometext : $p_hometext; themecenterposts($p_title, $p_hometext); //Display post edit form $returnside = intval($_POST['returnside']); include_once XOOPS_ROOT_PATH . '/modules/news/include/storyform.inc.php'; break; case 'post': $nohtml_db = isset($_POST['nohtml']) ? $_POST['nohtml'] : 1; if (is_object($xoopsUser)) { $uid = $xoopsUser->getVar('uid'); if ($approveprivilege) { $nohtml_db = empty($_POST['nohtml']) ? 0 : 1; } if (isset($_POST['author']) && ($approveprivilege || $xoopsUser->isAdmin($xoopsModule->mid()))) { $uid = intval($_POST['author']);
$hometext = $story->hometext("Edit"); $bodytext = $story->bodytext("Edit"); $nohtml = $story->nohtml(); $nosmiley = $story->nosmiley(); $ihome = $story->ihome(); $topicid = $story->topicid(); if ($story->published() != 0) { $published = $story->published(); } if ($story->expired() != 0) { $expired = $story->expired(); } // $notifypub = $story->notifypub(); $type = $story->type(); $topicdisplay = $story->topicdisplay(); $topicalign = $story->topicalign(false); $isedit = 1; include "storyform.inc.php"; echo "</td></tr></table>"; break; case "newarticle": xoops_cp_header(); echo "<h4>" . _AM_CONFIG . "</h4>"; include_once XOOPS_ROOT_PATH . "/class/module.textsanitizer.php"; // $xoopsModule->printAdminMenu(); // echo "<br />"; newSubmissions(); autoStories(); lastStories(); expStories(); echo "<br />";