if (!$_REQUEST['id']) { die('missing post-ID!'); } $postinfo = post_info($_REQUEST['id']); if (!$postinfo['postid'] || $postinfo['del']) { message($apx->lang->get('MSG_POSTNOTEXIST')); } $threadinfo = thread_info($postinfo['threadid']); if (!$threadinfo['threadid'] || $threadinfo['del']) { message($apx->lang->get('MSG_THREADNOTEXIST')); } $foruminfo = forum_info($threadinfo['forumid']); if (!$foruminfo['forumid']) { message($apx->lang->get('MSG_FORUMNOTEXIST')); } if (!forum_access_editpost($foruminfo, $threadinfo, $postinfo)) { tmessage('noright', array(), false, false); } //Ist der Beitrag der erste Beitrag im Thema? if ($threadinfo['firstpost'] == $postinfo['postid']) { $firstpost = true; } else { $firstpost = false; } //VORSCHAU if ($_POST['preview']) { $preview = $_POST['text']; if ($_POST['transform_links']) { $preview = transform_urls($preview); } $preview = forum_replace($preview, $_POST['allowcodes'], $_POST['allowsmilies']);
$postdata[$i]['LINK_SENDPM'] = mklink('user.php?action=newpm&touser='******'userid'], 'user,newpm,' . $res['userid'] . '.html'); } $postdata[$i]['CONTACT_ICQ'] = replace($userdat['icq']); $postdata[$i]['CONTACT_MSN'] = replace($userdat['msn']); $postdata[$i]['CONTACT_AIM'] = replace($userdat['aim']); $postdata[$i]['CONTACT_YIM'] = replace($userdat['yim']); $postdata[$i]['CONTACT_SKYPE'] = replace($userdat['skype']); //Optionen if ($res['userid']) { $postdata[$i]['LINK_USERPOSTS'] = HTTPDIR . $set['forum']['directory'] . '/search.php?send=1&author=' . urlencode($res['username']); if (!$user->is_buddy($res['userid'])) { $postdata[$i]['LINK_ADDBUDDY'] = mklink('user.php?action=addbuddy&id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html'); } } //Rechte $postdata[$i]['RIGHT_EDITPOST'] = forum_access_editpost($foruminfo, $threadinfo, $res); $postdata[$i]['RIGHT_DELPOST'] = forum_access_delpost($foruminfo, $threadinfo, $res); $postdata[$i]['RIGHT_DELTHREAD'] = forum_access_delthread($foruminfo, $threadinfo); } } //Bewertungen if ($apx->is_module('ratings') && $set['forum']['ratings']) { require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php'; $rate = new ratings('forum', $threadinfo['threadid']); $rate->assign_ratings(); } //Optionen-Links $printlink = mkrellink('thread.php?id=' . $threadinfo['threadid'] . '&p=' . $_REQUEST['p'] . '&print=1', 'thread,' . $threadinfo['threadid'] . ',' . $_REQUEST['p'] . urlformat($threadinfo['title']) . '.html?print=1'); $telllink = 'tell.php?id=' . $threadinfo['threadid']; if ($user->info['userid'] && !is_thread_subscr($threadinfo['threadid'])) { $subscribelink = HTTPDIR . mkrellink('user.php?action=subscribe&option=addthread&id=' . $threadinfo['threadid'], 'user,subscribe.html?option=addthread&id=' . $threadinfo['threadid']);