Example #1
0
     $forumpost->setUid($uid);
 }
 $subject = xoops_trim(@$_POST['subject']);
 $subject = $subject ? $subject : _NOTITLE;
 $icon = preg_match('/^icon[1-7]\\.gif$/', @$_POST['icon']) ? $_POST['icon'] : 'icon7.gif';
 $solved = empty($_POST['solved']) ? 0 : 1;
 $forumpost->setSubject($subject);
 $forumpost->setText(@$_POST['message']);
 $forumpost->setNohtml(@$_POST['nohtml']);
 $forumpost->setNosmiley(@$_POST['nosmiley']);
 $forumpost->setIcon($icon);
 if (!empty($xoopsModuleConfig['xhnewbb_use_solved']) && $isadminormod) {
     $forumpost->setSolved(@$_POST['solved']);
 }
 if ($forumdata['allow_sig']) {
     $forumpost->setAttachsig(@$_POST['attachsig']);
 } else {
     $forumpost->setAttachsig(0);
 }
 // insert
 if (!($post_id = $forumpost->store())) {
     die('Could not insert forum post');
 }
 // increment post
 if (is_object(@$xoopsUser) && $mode != 'edit') {
     $xoopsUser->incrementPost();
 }
 // set u2t_marked
 $uid = is_object(@$xoopsUser) ? $xoopsUser->getVar('uid') : 0;
 $topic_id = $forumpost->topic();
 $u2t_marked = empty($_POST['u2t_marked']) ? 0 : 1;
Example #2
0
     }
     if (!empty($topic_id)) {
         $forumpost->setTopicId($topic_id);
         $isreply = 1;
     }
     $forumpost->setIp($HTTP_SERVER_VARS['REMOTE_ADDR']);
     $forumpost->setUid($uid);
 }
 $subject = xoops_trim($HTTP_POST_VARS['subject']);
 $subject = $subject == '' ? _NOTITLE : $subject;
 $forumpost->setSubject($subject);
 $forumpost->setText($HTTP_POST_VARS['message']);
 $forumpost->setNohtml($HTTP_POST_VARS['nohtml']);
 $forumpost->setNosmiley($HTTP_POST_VARS['nosmiley']);
 $forumpost->setIcon($HTTP_POST_VARS['icon']);
 $forumpost->setAttachsig($HTTP_POST_VARS['attachsig']);
 if (!($postid = $forumpost->store())) {
     include_once XOOPS_ROOT_PATH . '/header.php';
     xoops_error('Could not insert forum post');
     include_once XOOPS_ROOT_PATH . '/footer.php';
     exit;
 }
 if (is_object($xoopsUser) && !empty($isnew)) {
     $xoopsUser->incrementPost();
 }
 // RMV-NOTIFY
 // Define tags for notification message
 $tags = array();
 $tags['THREAD_NAME'] = $HTTP_POST_VARS['subject'];
 $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id=' . $postid . '&topic_id=' . $forumpost->topic();
 $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid;
Example #3
0
     }
     if (!empty($topic_id)) {
         $forumpost->setTopicId($topic_id);
         $isreply = 1;
     }
     $forumpost->setIp($_SERVER['REMOTE_ADDR']);
     $forumpost->setUid($uid);
 }
 $subject = xoops_trim($_POST['subject']);
 $subject = $subject == '' ? _NOTITLE : $subject;
 $forumpost->setSubject($subject);
 $forumpost->setText($_POST['message']);
 $forumpost->setNohtml($_POST['nohtml']);
 $forumpost->setNosmiley($_POST['nosmiley']);
 $forumpost->setIcon($_POST['icon']);
 $forumpost->setAttachsig($_POST['attachsig']);
 if (!($postid = $forumpost->store())) {
     include_once XOOPS_ROOT_PATH . '/header.php';
     xoops_error('Could not insert forum post');
     include_once XOOPS_ROOT_PATH . '/footer.php';
     exit;
 }
 if (is_object($xoopsUser) && !empty($isnew)) {
     $xoopsUser->incrementPost();
 }
 // RMV-NOTIFY
 // Define tags for notification message
 $tags = array();
 $tags['THREAD_NAME'] = $_POST['subject'];
 $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id=' . $postid . '&topic_id=' . $forumpost->topic();
 $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid;