Ejemplo n.º 1
0
        //Thema als gelesen markieren
        thread_isread($threadinfo['threadid']);
        //Weiterleiten zum Thema
        $forwarder = 'thread.php?id=' . $threadinfo['threadid'] . '&goto=lastpost';
        message($apx->lang->get('MSG_POST_ADD_OK'), $forwarder);
        require 'lib/_end.php';
        require '../lib/_end.php';
    }
} else {
    $_POST['allowcodes'] = 1;
    $_POST['allowsmilies'] = 1;
    $_POST['allowsig'] = 1;
    $_POST['transform_links'] = 1;
    $_POST['username'] = $_COOKIE[$set['main']['cookie_pre'] . '_forum_username'];
    $_POST['hash'] = md5(microtime());
    $_POST['subscription'] = is_thread_subscr($threadinfo['threadid']);
    if ($user->info['forum_autosubscribe'] && !$_POST['subscription']) {
        $_POST['subscription'] = 'instant';
    }
}
//Zitieren
if ($_REQUEST['quote']) {
    $post = $db->first("SELECT title,text,username FROM " . PRE . "_forum_posts WHERE threadid='" . $_REQUEST['id'] . "' AND postid='" . $_REQUEST['quote'] . "' LIMIT 1");
    $post['text'] = preg_replace('#\\[(PHP|CODE|HTML)\\](.*?)\\[/\\1\\]#si', '', $post['text']);
    if ($post['title']) {
        $_POST['title'] = iif(substr($post['title'], 0, 4) == 'Re: ', $post['title'], 'Re: ' . $post['title']);
    }
    $_POST['text'] = '[QUOTE=' . $post['username'] . ']' . $post['text'] . "[/QUOTE]\n";
}
//Smilies
if (count($set['main']['smilies'])) {
Ejemplo n.º 2
0
        //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']);
}
$threadlink = mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html');
$forumlink = mkrellink('forum.php?id=' . $foruminfo['forumid'], 'forum,' . $foruminfo['forumid'] . ',1' . urlformat($foruminfo['title']) . '.html');
$apx->tmpl->assign('POST', $postdata);
$apx->tmpl->assign('CLOSED', !$threadinfo['open']);
$apx->tmpl->assign('THREADID', $threadinfo['threadid']);
$apx->tmpl->assign('THREAD_TITLE', replace($threadinfo['title']));
$apx->tmpl->assign('THREAD_LINK', $threadlink);
$apx->tmpl->assign('THREAD_DELETED', $threadinfo['del']);
$apx->tmpl->assign('FORUMID', $foruminfo['forumid']);
$apx->tmpl->assign('FORUM_TITLE', replace($foruminfo['title']));
$apx->tmpl->assign('FORUM_LINK', $forumlink);
$apx->tmpl->assign('LINK_PRINT', $printlink);
$apx->tmpl->assign('LINK_TELL', $telllink);