本文整理汇总了PHP中comments::assign_comments方法的典型用法代码示例。如果您正苦于以下问题:PHP comments::assign_comments方法的具体用法?PHP comments::assign_comments怎么用?PHP comments::assign_comments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comments
的用法示例。
在下文中一共展示了comments::assign_comments方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content_showcomments
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';
}
示例2: glossar_showcomments
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';
}
示例3: mklink
//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
示例4: replace
$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 ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
示例5: videos_showcomments
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';
}
示例6: articles_showcomments
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';
}
示例7: poll_showcomments
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';
}