Beispiel #1
0
function content_showcomments($id)
{
    global $set, $db, $apx, $user;
    $res = $db->first("SELECT allowcoms FROM " . PRE . "_content WHERE ( id='" . $id . "' AND active='1' " . section_filter() . " ) LIMIT 1");
    if (!$apx->is_module('comments') || !$set['content']['coms'] || !$res['allowcoms']) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('content', $id);
    $coms->assign_comments();
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}
Beispiel #2
0
function glossar_showcomments($id)
{
    global $set, $db, $apx, $user;
    $id = (int) $id;
    $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_glossar WHERE ( id='" . $id . "' AND starttime!='0' ) LIMIT 1");
    if (!$apx->is_module('comments') || !$set['glossar']['coms'] || !$res['allowcoms']) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('glossar', $id);
    $coms->assign_comments();
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}
Beispiel #3
0
    //Kategorie
    $apx->tmpl->assign('CATID', $res['catid']);
    $apx->tmpl->assign('CATTITLE', $catinfo['title']);
    $apx->tmpl->assign('CATTEXT', $catinfo['text']);
    $apx->tmpl->assign('CATICON', $catinfo['icon']);
    $apx->tmpl->assign('CATCOUNT', $catcount);
    $apx->tmpl->assign('CATLINK', mklink('videos.php?catid=' . $catinfo['catid'], 'videos,' . $catinfo['catid'] . ',1' . urlformat($catinfo['title']) . '.html'));
    //Pfad
    if (in_array('PATH', $parse)) {
        $apx->tmpl->assign('PATH', videos_path($res['catid']));
    }
    //Kommentare
    if ($apx->is_module('comments') && $set['videos']['coms'] && $res['allowcoms']) {
        require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
        $coms = new comments('videos', $res['id']);
        $coms->assign_comments($parse);
    }
    //Bewertungen
    if ($apx->is_module('ratings') && $set['videos']['ratings'] && $res['allowrating']) {
        require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
        $rate = new ratings('videos', $res['id']);
        $rate->assign_ratings($parse);
    }
    $apx->tmpl->parse('detail');
    require 'lib/_end.php';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// SUCHE
if ($_REQUEST['action'] == 'search') {
    $apx->lang->drop('list');
    $apx->lang->drop('search');
    //ERGEBNIS ANZEIGEN
Beispiel #4
0
    $content = mediamanager_inline($res['text']);
    if ($apx->is_module('glossar')) {
        $content = glossar_highlight($content);
    }
    $apx->tmpl->assign('ID', $res['id']);
    $apx->tmpl->assign('HEADLINE', $headline);
    $apx->tmpl->assign('TITLE', $last);
    $apx->tmpl->assign('CONTENT', $content);
    $apx->tmpl->assign_static('META_DESCRIPTION', replace($res['meta_description']));
    $apx->tmpl->assign('HITS', number_format($res['hits'], 0, '', '.'));
    //Kategorie
    $apx->tmpl->assign('CATID', $res['catid']);
    $apx->tmpl->assign('CATTITLE', $set['content']['groups'][$res['catid']]);
    //Kommentare
    if ($apx->is_module('comments') && $set['content']['coms'] && $res['allowcoms']) {
        require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
        $coms = new comments('content', $res['id']);
        $coms->assign_comments();
    }
    //Bewertung
    if ($apx->is_module('ratings') && $set['content']['ratings'] && $res['allowrating']) {
        require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
        $rate = new ratings('content', $res['id']);
        $rate->assign_ratings();
    }
    $apx->tmpl->parse('content');
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_end.php';
/////////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
Beispiel #5
0
function videos_showcomments($id)
{
    global $db, $tmpl, $user, $set, $apx;
    $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_videos WHERE id='" . intval($id) . "' LIMIT 1");
    if (!$set['videos']['coms'] || !$res['allowcoms'] || !$apx->is_module('comments')) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('videos', $res['id']);
    $coms->assign_comments();
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}
Beispiel #6
0
function articles_showcomments($id)
{
    global $set, $db, $apx, $user;
    $id = (int) $id;
    $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_articles WHERE ( id='" . $id . "' " . section_filter() . " ) LIMIT 1");
    if (!$apx->is_module('comments') || !$set['articles']['coms'] || !$res['allowcoms']) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('articles', $id);
    $coms->assign_comments();
    if (!articles_recent($id) && !$set['articles']['archcoms']) {
        $apx->tmpl->assign('COMMENT_NOFORM', 1);
    }
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}
Beispiel #7
0
function poll_showcomments($id)
{
    global $set, $db, $apx, $user;
    $id = (int) $id;
    if (!$id) {
        die('missing ID!');
    }
    $recent = poll_recent();
    $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_poll WHERE ( id='" . $id . "' AND ( '" . time() . "' BETWEEN starttime AND endtime ) " . iif($apx->section_id(), " " . section_filter() . " ") . " ) LIMIT 1");
    if (!$apx->is_module('comments') || !$set['poll']['coms'] || !$res['allowcoms']) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('poll', $id);
    $coms->assign_comments();
    if ($recent != $res['id'] && !$set['poll']['archcoms']) {
        $apx->tmpl->assign('COMMENT_NOFORM', 1);
    }
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}