// Subscribe the user to On Published notification, if requested if ($notifypub) { include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; $notification_handler =& xoops_gethandler('notification'); $notification_handler->subscribe('item', $newItemObj->itemid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); } // Send notifications $newItemObj->sendNotifications(array(_SS_NOT_ITEM_SUBMITTED)); $redirect_msg = _MD_SS_ITEM_RECEIVED_NEED_APPROVAL; } redirect_header("index.php", 2, $redirect_msg); exit; break; case 'form': default: global $xoopsUser, $myts; $newItemObj = $smartsection_item_handler->create(); $categoryObj = $smartsection_category_handler->create(); $xoopsOption['template_main'] = 'smartsection_submit.html'; include_once XOOPS_ROOT_PATH . "/header.php"; include_once "footer.php"; $name = $xoopsUser ? ucwords($xoopsUser->getVar("uname")) : 'Anonymous'; $notifypub = 1; $xoopsTpl->assign('module_home', ss_module_home()); $xoopsTpl->assign('categoryPath', _MD_SS_SUB_SNEWNAME); $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SS_SUB_SNEWNAME, ucwords($xoopsModule->name()))); $xoopsTpl->assign('lang_intro_text', ss_getConfig('submitintromsg')); include_once SMARTSECTION_ROOT_PATH . 'include/submit.inc.php'; include_once XOOPS_ROOT_PATH . '/footer.php'; break; }
$xoopsTpl->assign('lang_item', _MD_SS_OTHER_ITEMS); $xoopsTpl->assign('lang_postedby', _MD_SS_POSTEDBY); $xoopsTpl->assign('lang_on', _MD_SS_ON); $xoopsTpl->assign('lang_datesub', _MD_SS_DATESUB); $xoopsTpl->assign('lang_hitsdetail', _MD_SS_HITSDETAIL); $xoopsTpl->assign('lang_reads', _MD_SS_READS); $xoopsTpl->assign('lang_comments', _MD_SS_COMMENTS); $xoopsTpl->assign('lang_files_linked', _MD_SS_FILES_LINKED); $xoopsTpl->assign('lang_file_name', _MD_SS_FILENAME); $xoopsTpl->assign('lang_file_type', _MD_SS_FILE_TYPE); $xoopsTpl->assign('lang_hits', _MD_SS_HITS); $xoopsTpl->assign('lang_download_file', _MD_SS_DOWNLOAD_FILE); $xoopsTpl->assign('lang_page', _MD_SS_PAGE); $xoopsTpl->assign('lang_previous_item', _MD_SS_PREVIOUS_ITEM); $xoopsTpl->assign('lang_next_item', _MD_SS_NEXT_ITEM); $xoopsTpl->assign('module_home', ss_module_home($xoopsModuleConfig['linkedPath'])); $xoopsTpl->assign('categoryPath', $item['categoryPath'] . " > " . $item['title']); $xoopsTpl->assign('commentatarticlelevel', $xoopsModuleConfig['commentatarticlelevel']); $xoopsTpl->assign('com_rule', ss_getConfig('com_rule')); $xoopsTpl->assign('lang_items_links', _MD_SS_ITEMS_LINKS); $xoopsTpl->assign('previous_item_link', $previous_item_link); $xoopsTpl->assign('next_item_link', $next_item_link); $xoopsTpl->assign('previous_item_url', $previous_item_url); $xoopsTpl->assign('next_item_url', $next_item_url); $xoopsTpl->assign('other_items', $xoopsModuleConfig['other_items_type']); $xoopsTpl->assign('itemfooter', ss_getConfig('itemfooter')); // MetaTag Generator smartsection_createMetaTags($itemObj->title(), $categoryObj->name(), $itemObj->summary()); // Include the comments if the selected ITEM supports comments if ($itemObj->cancomment() == 1 || !$xoopsModuleConfig['commentatarticlelevel'] && ss_getConfig('com_rule') != 0) { include_once XOOPS_ROOT_PATH . "/include/comment_view.php";