if (file_exists(XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php')) { include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; } else { include_once XOOPS_ROOT_PATH . '/language/english/calendar.php'; } include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php'; include_once XOOPS_ROOT_PATH . '/modules/news/config.php'; $sform = new XoopsThemeForm(_NW_SUBMITNEWS, "storyform", XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/submit.php'); $sform->setExtra('enctype="multipart/form-data"'); $sform->addElement(new XoopsFormText(_NW_TITLE, 'title', 50, 255, $title), true); // Topic's selection box if (!isset($xt)) { $xt = new NewsTopic(); } if ($xt->getAllTopicsCount() == 0) { redirect_header("index.php", 4, _NW_POST_SORRY); exit; } include_once XOOPS_ROOT_PATH . "/class/tree.php"; $allTopics = $xt->getAllTopics($xoopsModuleConfig['restrictindex'], 'news_submit'); $topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid'); $topic_select = $topic_tree->makeSelBox('topic_id', 'topic_title', '-- ', $topicid, false); $sform->addElement(new XoopsFormLabel(_NW_TOPIC, $topic_select)); //If admin - show admin form //TODO: Change to "If submit privilege" if ($approveprivilege) { //Show topic image? $sform->addElement(new XoopsFormRadioYN(_AM_TOPICDISPLAY, 'topicdisplay', $topicdisplay)); //Select image position $posselect = new XoopsFormSelect(_AM_TOPICALIGN, 'topicalign', $topicalign);