コード例 #1
0
ファイル: jcomments.j10.php プロジェクト: sergy444/joomla
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
0
 /**
  * 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
0
ファイル: jcomments.php プロジェクト: enjoy2000/smcd
 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
0
 /**
  * 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
0
ファイル: vmjcomments.php プロジェクト: romuland/khparts
 /**
  * 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
0
ファイル: jcomments.php プロジェクト: korolariya/gameportal
 public static function showComments($object_id, $object_group = 'com_content', $object_title = '')
 {
     return JComments::show($object_id, $object_group, $object_title);
 }
コード例 #7
0
ファイル: jcomments.php プロジェクト: sergy444/joomla
	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
0
	            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
0
ファイル: jcomments.php プロジェクト: carmerin/cesae-web
 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
0
ファイル: default.php プロジェクト: madcsaba/li-de
  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
0
ファイル: jcomments.php プロジェクト: ForAEdesWeb/AEW2
 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
0
ファイル: default_comments.php プロジェクト: kidaa30/lojinha
			    <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
0
ファイル: view.html.php プロジェクト: Tfrez/jVarcade
 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
0
ファイル: comment.php プロジェクト: rogeriocc/fabrik
 /**
  * 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
0
ファイル: default_comments.php プロジェクト: kidaa30/lojinha
	            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';
コード例 #16
0
ファイル: comment.php プロジェクト: jfquestiaux/fabrik
    /**
     * Prepare JComment system
     *
     * @return  void
     */
    protected function _jcomment()
    {
        $formModel = $this->getModel();
        $input = $this->app->input;
        /*
         * 'Fix' for jcomments not loading languages? Means you have to copy:
         * components/com_jcomments/languages/yourfile.ini to
         * components/com_jcomments/language/xx-XX/yourfile.ini
         */
        $lang = JFactory::getLanguage();
        $lang->load('com_jcomments', JPATH_BASE . '/components/com_jcomments');
        $jComments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
        if (JFile::exists($jComments)) {
            require_once $jComments;
            if ($this->commentsLocked) {
                $jc_config = JCommentsFactory::getConfig();
                $jc_config->set('comments_locked', 1);
            }
            $this->data = '<div id="jcomments" style="clear: both;">
					' . JComments::show($input->get('rowid', '', 'string'), "com_fabrik_{$formModel->getId()}") . '
							</div>';
        } else {
            throw new RuntimeException('JComment is not installed on your system');
        }
    }