本文整理匯總了PHP中JComments::show方法的典型用法代碼示例。如果您正苦於以下問題:PHP JComments::show方法的具體用法?PHP JComments::show怎麽用?PHP JComments::show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JComments
的用法示例。
在下文中一共展示了JComments::show方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: plgContentJCommentsViewJ10
function plgContentJCommentsViewJ10(&$row, &$params, $page = 0)
{
global $task, $option;
if (!isset($params)) {
$params = new mosParameters('');
}
$pvars = array_keys(get_object_vars($params->_params));
if ($params->get('popup') || in_array('moduleclass_sfx', $pvars)) {
return '';
}
if (isset($GLOBALS['jcomments_params_readmore']) && isset($GLOBALS['jcomments_row_readmore'])) {
$params->set('readmore', $GLOBALS['jcomments_params_readmore']);
$row->readmore = $GLOBALS['jcomments_row_readmore'];
}
require_once JCOMMENTS_BASE . '/jcomments.php';
require_once JCOMMENTS_HELPERS . '/content.php';
JCommentsContentPluginHelper::processForeignTags($row, false, false);
if (JCommentsContentPluginHelper::isDisabled($row)) {
return '';
}
if ($task == 'view' && (JCommentsContentPluginHelper::checkCategory($row->catid) || JCommentsContentPluginHelper::isEnabled($row))) {
if (JCommentsContentPluginHelper::isLocked($row)) {
$config = JCommentsFactory::getConfig();
$config->set('comments_locked', 1);
}
return JComments::show($row->id, 'com_content', $row->title);
} else {
if ($option == 'com_events' && $task == 'view_detail') {
return JComments::show($row->id, 'com_events', $row->title);
}
}
return '';
}
示例2: onMatchComments
/**
* adds comments to a match (independent if they were made before or after the match)
* @param object match
* @param string title
* @return boolean true on success
*/
public function onMatchComments(&$match, $title, &$html)
{
$separate_comments = $this->params->get('separate_comments', 0);
if ($separate_comments == 0) {
$html = '<div class="jlgcomments">' . JComments::show($match->id, 'com_joomleague', $title) . '</div>';
return true;
}
}
示例3: onK2CommentsBlock
public function onK2CommentsBlock(&$item, &$params, $limitstart)
{
$result = '';
if (!JRequest::getInt('print')) {
$commentsAPI = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (is_file($commentsAPI)) {
require_once $commentsAPI;
$result = JComments::show($item->id, 'com_k2', $item->title);
}
}
return $result;
}
示例4: onMatchComments
/**
* adds comments to a match (independent if they were made before or after the match)
* @param object match
* @param string title
* @return boolean true on success
*/
public function onMatchComments(&$match, $title, &$html)
{
// load plugin params info
$plugin =& JPluginHelper::getPlugin('content', 'joomleague_comments');
$pluginParams = new JParameter($plugin->params);
$separate_comments = $pluginParams->get('separate_comments', 0);
if ($separate_comments == 0) {
$comments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once $comments;
$html = '<div class="jlgcomments">' . JComments::show($match->id, 'com_joomleague', $title) . '</div>';
return true;
}
return false;
}
}
示例5: onContentAfterDisplay
/**
* We display Jcomments tpl, regarding the plugin config and the display config set previously
*
* @author Florian Voutzinos
* @param string $context
* @param object reference $product virtuemart product object
* @param object reference $params
* @param int $limitstart
* @return string JComments display
*/
function onContentAfterDisplay($context, &$product, &$params, $limitstart = 0)
{
// If the trigger comes from virtuemart productdetails and the plugin is activated in the config
if ($context == 'com_virtuemart.productdetails' && $this->params->get('plugin_activated')) {
// Do not display comments in modules
$data = $params->toArray();
if (isset($data['moduleclass_sfx'])) {
return '';
}
// Display the comments if enabled
if (VmJcommentsHelperPlugin::areCommentsEnabled()) {
if (!class_exists('JComments')) {
require JCOMMENTS_BASE . '/jcomments.php';
}
return JComments::show($product->virtuemart_product_id, 'com_virtuemart', $product->product_name);
}
return '';
}
return '';
}
示例6: showComments
public static function showComments($object_id, $object_group = 'com_content', $object_title = '')
{
return JComments::show($object_id, $object_group, $object_title);
}
示例7: onAfterDisplayContent
function onAfterDisplayContent(&$article, &$params, $limitstart = 0)
{
if ($this->params->get('show_comments_event', 'onAfterDisplayContent') == 'onAfterDisplayContent') {
require_once (JCOMMENTS_HELPERS . '/content.php');
$view = JRequest::getCmd('view');
// check whether plugin has been unpublished
if (!JPluginHelper::isEnabled('content', 'jcomments')
|| ($view != 'article')
|| $params->get('intro_only')
|| $params->get('popup')
|| JRequest::getBool('fullview')
|| JRequest::getVar('print')) {
JCommentsContentPluginHelper::clear($article, true);
return '';
}
require_once (JCOMMENTS_BASE . '/jcomments.php');
$config = JCommentsFactory::getConfig();
$isEnabled = ($config->getInt('comments_on', 0) == 1) && ($config->getInt('comments_off', 0) == 0);
if ($isEnabled && $view == 'article') {
JCommentsContentPluginHelper::clear($article, true);
return JComments::show($article->id, 'com_content', $article->title);
}
}
return '';
}
示例8: array
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<?php
} else {
if ($this->params->get('comments', 0) == '3') {
?>
<?php
$jcomments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (file_exists($jcomments)) {
require_once $jcomments;
echo JComments::show($this->item->id, 'com_djcatalog2', $this->item->name);
}
?>
<?php
} else {
if ($this->params->get('comments', 0) == '4') {
?>
<?php
$komento = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
if (file_exists($komento)) {
require_once $komento;
$options = array();
$options['trigger'] = 'onDJCatalog2Item';
$options['context'] = 'com_djcatalog2.item';
$options['params'] = $this->params;
$comments = Komento::commentify('com_djcatalog2', $this->item, $options);
示例9: onJCommentsShow
function onJCommentsShow($object_id, $object_group, $object_title)
{
$coreFile = JPATH_ROOT . '/components/com_jcomments/jcomments.php';
if (is_file($coreFile)) {
include_once $coreFile;
echo JComments::show($object_id, $object_group, $object_title);
}
}
示例10: szinfoClose
function szinfoClose() {
document.getElementById("szavazasInfo").style.display="none";
document.getElementById("btnszinfo").style.display="inline-block";
}
function eredmenyClick() {
document.getElementById("divTurelem").style.display="block";
setInterval("turelemAnimacio()",100);
location = "' . $this->Akciok['eredmeny'] . '";
}
function turelemAnimacio() {
// esetleg itt lehet valami animáció
d = document.getElementById("divTurelem");
}
function igenClick() {
location = "index.php?option=com_alternativak&view=alternativaklist&task=igenclick"+
"&szavazas=' . $this->Szavazas->id . '&temakor=' . $this->Szavazas->temakor . '";
}
function nemClick() {
location = "index.php?option=com_alternativak&view=alternativaklist&task=nemclick"+
"&szavazas=' . $this->Szavazas->id . '&temakor=' . $this->Szavazas->temakor . '";
}
</script>
';
// kommentek megjelenitése
if ($this->CommentId > 0) {
echo JComments::show($this->CommentId, 'com_content', $this->Szavazas->megnevezes);
}
// fórum, jdownload, jevent gombok
include 'components/com_jumi/files/forum.php';
示例11: onAfterDisplayContent
function onAfterDisplayContent(&$article, &$params, $limitstart = 0)
{
if ($this->params->get('show_comments_event', 'onAfterDisplayContent') == 'onAfterDisplayContent') {
require_once JPATH_ROOT . '/components/com_jcomments/helpers/content.php';
$app = JFactory::getApplication('site');
$view = $app->input->get('view');
// check whether plugin has been unpublished
if (!JPluginHelper::isEnabled('content', 'jcomments') || $view != 'article' || $params->get('intro_only') || $params->get('popup') || $app->input->getBool('fullview') || $app->input->get('print')) {
JCommentsContentPluginHelper::clear($article, true);
return '';
}
require_once JPATH_ROOT . '/components/com_jcomments/jcomments.php';
$config = JCommentsFactory::getConfig();
$isEnabled = $config->getInt('comments_on', 0) == 1 && $config->getInt('comments_off', 0) == 0;
if ($isEnabled && $view == 'article') {
JCommentsContentPluginHelper::clear($article, true);
return JComments::show($article->id, 'com_content', $article->title);
}
}
return '';
}
示例12: array
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<?php
} else {
if ($par->get('comments', '0') == 3) {
$comments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once $comments;
?>
<div class="djcf_comments jcomments_comments_box">
<h2><?php
echo JText::_('COM_DJCLASSIFIEDS_COMMENTS');
?>
</h2>
<?php
echo JComments::show($this->item->id, 'com_djclassifieds', $this->item->name);
?>
</div>
<?php
}
} else {
if ($par->get('comments', '0') == 4) {
$komento = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
if (file_exists($komento)) {
require_once $komento;
$options = array();
$options['trigger'] = 'onDJClassifiedsItem';
$options['context'] = 'com_djclassifieds.item';
$options['params'] = $par;
$comments = Komento::commentify('com_djclassifieds', $this->item, $options);
if ($comments) {
示例13: displayComments
function displayComments()
{
$start = '<div class="pu_heading" style="text-align: center;margin: 20px 0 20px 0;">' . JText::_('COM_JVARCADE_COMMENTS') . '</div><div id="comment-block">';
$end = '</div>';
if ($this->config->comments == 1 && $this->componentEnabled($this->comment_data, 'com_comment')) {
// CComment
$path = JPATH_SITE . '/administrator/components/com_comment/plugins/com_jvarcade/jvarcade.php';
if (file_exists($path)) {
JLoader::discover('ccommentHelper', JPATH_SITE . '/components/com_comment/helpers');
echo $start;
echo CcommentHelperUtils::commentInit('com_jvarcade', $this->game);
echo $end;
}
} elseif ($this->config->comments == 2 && $this->componentEnabled($this->comment_data, 'com_jcomments')) {
// JComments
$jcommentspath = JPATH_SITE . '/components/com_jcomments/jcomments.php';
$jcommentsplugin = JPATH_SITE . '/components/com_jcomments/plugins/com_jvarcade.plugin.php';
if (file_exists($jcommentspath) && file_exists($jcommentsplugin)) {
require_once $jcommentspath;
echo $start;
echo JComments::show($this->game['id'], 'com_jvarcade', $this->game['gamename']);
echo $end;
}
} elseif ($this->config->comments == 3 && $this->componentEnabled($this->comment_data, 'com_jacomment')) {
// JA Comment
echo $start;
echo '{jacomment contentid=' . $this->game['id'] . ' option=com_jvarcade contenttitle=' . $this->game['gamename'] . '}';
echo $end;
}
echo '';
}
示例14: _jcomment
/**
* prepare JComment system
*
* @param object $params plugin params
* @param object $formModel form model
*
* @return void
*/
protected function _jcomment($params, $formModel)
{
$jcomments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (JFile::exists($jcomments)) {
require_once $jcomments;
$this->_data = '<div id="jcomments" style="clear: both;">
' . JComments::show(JRequest::getVar('rowid'), "com_fabrik_{$formModel->getId()}") . '
</div>';
} else {
JError::raiseNotice(500, JText::_('JComment is not installed on your system'));
}
}
示例15: array
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<?php
} else {
if ($comments == '1') {
?>
<?php
$jcomments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (file_exists($jcomments)) {
require_once $jcomments;
echo JComments::show($item->comments['id'], $item->comments['group'], $item->title);
}
?>
<?php
}
}
}
/*else if ($comments == '4') { ?>
<?php
$komento = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
if (file_exists($komento)) {
require_once($komento);
$options = array();
$options['trigger'] = 'onDJMediatoolsItem';
$options['context'] = 'com_djmediatools.item';