} else { $dohtml = 0; } } $p_comment =& $myts->previewTarea($com_text, $dohtml, $dosmiley, $doxcode, $doimage, $dobr); $com_icon = isset($com_icon) ? $com_icon : ''; $noname = isset($noname) ? intval($noname) : 0; $com_text = $myts->htmlSpecialChars($myts->stripSlashesGPC($com_text)); if ($xoopsModule->getVar('dirname') != 'system') { include XOOPS_ROOT_PATH . '/header.php'; themecenterposts($com_title, $p_comment); include XOOPS_ROOT_PATH . '/include/comment_form.php'; include XOOPS_ROOT_PATH . '/footer.php'; } else { xoops_cp_header(); themecenterposts($com_title, $p_comment); include XOOPS_ROOT_PATH . '/include/comment_form.php'; xoops_cp_footer(); } break; case "post": $doimage = 1; $comment_handler =& xoops_gethandler('comment'); $add_userpost = false; $call_approvefunc = false; $call_updatefunc = false; // RMV-NOTIFY - this can be set to 'comment' or 'comment_submit' $notify_event = false; if (!empty($com_id)) { $comment =& $comment_handler->get($com_id); $accesserror = false;
} $comment_handler = icms::handler('icms_data_comment'); $comment =& $comment_handler->get($com_id); $r_name = icms_member_user_Object::getUnameFromId($comment->getVar('com_uid')); $r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong> ' . _CM_POSTED . ': <strong>' . formatTimestamp($comment->getVar('com_created')) . '</strong><br /><br />' . $comment->getVar('com_text'); $com_title = $comment->getVar('com_title', 'E'); if (!preg_match("/^(Re|" . _CM_RE . "):/i", $com_title)) { $com_title = _CM_RE . ": " . icms_core_DataFilter::icms_substr($com_title, 0, 56); } $com_pid = $com_id; $com_text = ''; $com_id = 0; $dosmiley = 1; $groups = is_object(icms::$user) ? icms::$user->getGroups() : ICMS_GROUP_ANONYMOUS; $gperm_handler = icms::handler('icms_member_groupperm'); if ($icmsConfig['editor_default'] != 'dhtmltextarea' && $gperm_handler->checkRight('use_wysiwygeditor', 1, $groups, 1, false)) { $dohtml = 1; $dobr = 0; } else { $dohtml = 0; $dobr = 1; } $doxcode = 1; $doimage = 1; $com_icon = ''; $com_rootid = $comment->getVar('com_rootid'); $com_itemid = $comment->getVar('com_itemid'); include ICMS_ROOT_PATH . '/header.php'; themecenterposts($comment->getVar('com_title'), $r_text); include ICMS_INCLUDE_PATH . '/comment_form.php'; include ICMS_ROOT_PATH . '/footer.php';
} $html = empty($nohtml) ? 1 : 0; if (isset($nosmiley) && intval($nosmiley) > 0) { $nosmiley = 1; $smiley = 0; } else { $nosmiley = 0; $smiley = 1; } $p_message = $myts->makeTareaData4Preview($message, $html, $smiley, 1); $subject = $myts->makeTboxData4PreviewInForm($subject); $message = $myts->makeTareaData4PreviewInForm($message); $noname = isset($noname) ? intval($noname) : 0; $notifypub = isset($notifypub) ? intval($notifypub) : 0; $p_message = $xt->topic_imgurl() != '' ? '<img src="images/topics/' . $xt->topic_imgurl() . '" align="right" alt="" />' . $p_message : $p_message; themecenterposts($p_subject, $p_message); include 'include/storyform.inc.php'; include XOOPS_ROOT_PATH . '/footer.php'; break; case "post": $nohtml_db = 1; if ($xoopsUser) { $uid = $xoopsUser->getVar('uid'); if ($xoopsUser->isAdmin($xoopsModule->mid())) { $nohtml_db = empty($nohtml) ? 0 : 1; } } else { if ($xoopsModuleConfig['anonpost'] == 1) { $uid = 0; } else { redirect_header("index.php", 3, _NOPERM);
} include XOOPS_ROOT_PATH . '/header.php'; include_once 'class/class.forumposts.php'; $forumpost = new ForumPosts($post_id); $r_message = $forumpost->text(); $r_date = formatTimestamp($forumpost->posttime()); $r_name = $forumpost->uid() != 0 ? XoopsUser::getUnameFromId($forumpost->uid()) : $xoopsConfig['anonymous']; $r_content = _MD_BY . " " . $r_name . " " . _MD_ON . " " . $r_date . "<br /><br />"; $r_content .= $r_message; $r_subject = $forumpost->subject(); if (!preg_match("/^Re:/i", $r_subject)) { $subject = 'Re: ' . $myts->htmlSpecialChars($r_subject); } else { $subject = $myts->htmlSpecialChars($r_subject); } $q_message = $forumpost->text("Quotes"); $hidden = "[quote]\n"; $hidden .= sprintf(_MD_USERWROTE, $r_name); $hidden .= "\n" . $q_message . "[/quote]"; $message = ""; themecenterposts($r_subject, $r_content); echo "<br />"; $pid = $post_id; unset($post_id); $topic_id = $forumpost->topic(); $forum = $forumpost->forum(); $isreply = 1; $istopic = 0; include 'include/forumform.inc.php'; include XOOPS_ROOT_PATH . '/footer.php'; }
// Load message resource // $t_root =& XCube_Root::getSingleton(); $t_root->mLanguageManager->loadModuleMessageCatalog("legacy"); require_once XOOPS_ROOT_PATH . '/include/comment_constants.php'; if ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) { exit; } $t_root->mLanguageManager->loadPageTypeMessageCatalog('comment'); ///< Is this must? $com_itemid = isset($_GET['com_itemid']) ? (int) $_GET['com_itemid'] : 0; if ($com_itemid > 0) { include XOOPS_ROOT_PATH . '/header.php'; if (isset($com_replytitle)) { if (isset($com_replytext)) { themecenterposts($com_replytitle, $com_replytext); } $myts =& MyTextSanitizer::getInstance(); $com_title = $myts->htmlSpecialChars($com_replytitle); if (!preg_match("/^re:/i", $com_title)) { $com_title = "Re: " . xoops_substr($com_title, 0, 56); } } else { $com_title = ''; } $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : ''; if ($com_mode == '') { if (is_object($xoopsUser)) { $com_mode = $xoopsUser->getVar('umode'); } else { $com_mode = $xoopsConfig['com_mode'];
$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']); } } else {