示例#1
0
$Itemid = JRequest::getInt('Itemid');
if (!$Itemid) {
    $Itemid = JAVoiceHelpers::get_Itemid(array('option' => 'com_javoice', 'view' => 'items'));
}
$items = $this->items;
$user = JFactory::getUser();
$model_status = JAVBModel::getInstance('voicetypesstatus', 'javoiceModel');
$list_status = $model_status->getListTreeStatus();
$sytem_comment = isset($javconfig['integrate']) ? $javconfig['integrate']->get('run_system', 'intensedebate') : 'intensedebate';
$helper = new JAVoiceHelpers();
$isSepecialUse = JAVoiceHelpers::checkPermissionAdmin();
if ($sytem_comment == 'jcomments') {
    $jcomment = JAVoiceHelpers::checkComponent('com_jcomments');
    $this->jcomments = $jcomment;
} elseif ($sytem_comment == 'jacomment') {
    $jacomment = JAVoiceHelpers::checkComponent('com_jacomment');
    $this->jacomment = $jacomment;
}
if ($items) {
    if (isset($this->show_suggest) && $this->show_suggest) {
        if (JRequest::getVar("pagingtype", "") != "autoscroll") {
            ?>
<h1><?php 
            echo JText::_('ALREADY_EXISTS_SOME_IDEAS_SIMILAR_TO_YOUR_IDEAS');
            ?>
</h1>
<?php 
        }
    }
    if ($javconfig["systems"]->get("paging_type", "normal") == "autoscroll" && JRequest::getVar("pagingtype", "") != "autoscroll") {
        ?>
示例#2
0
 function integrate()
 {
     $model = $this->getModel('configs');
     $application = array("intensedebate" => "IntenseDebate", "disqus" => "Disqus", 'jacomment' => "JA Comment Component", 'jcomments' => "JComment Component");
     $this->assignRef('application', $application);
     $com_jacomment = JAVoiceHelpers::checkComponent('com_jacomment');
     $this->assignRef('com_jacomment', $com_jacomment);
     $com_jomcomment = JAVoiceHelpers::checkComponent('com_jomcomment');
     $this->assignRef('com_jomcomment', $com_jomcomment);
     $com_jcomment = JAVoiceHelpers::checkComponent('com_jcomments');
     $this->assignRef('com_jcomments', $com_jcomment);
     $task = JRequest::getVar('task', NULL);
     $number = JRequest::getInt('number', 0);
     $cid = JRequest::getVar('cid', array(0), '', 'array');
     $system = '';
     if ($cid) {
         $system = $cid[0];
     }
     $modelvoicetypes = JAVBModel::getInstance('voicetypes', 'javoiceModel');
     $voicetypes = $modelvoicetypes->getItems(' AND t.published=1 ');
     $tabs = '';
     $active = '';
     if (count($voicetypes) > 0) {
         $active = JRequest::getVar('voicetypes', $voicetypes[0]->id);
         $tabs = $this->getVoiceTypeTabs($voicetypes, $active, $system);
     }
     $this->assignRef('application', $application);
     $this->assignRef('task', $task);
     $this->assignRef('number', $number);
     $this->assignRef('system', $system);
     $this->assignRef('active', $active);
     $this->assignRef('tabs', $tabs);
     $this->assignRef('voicetypes', $voicetypes);
 }
示例#3
0
 public static function JomSocial_addActivityStream($actor, $title, $cid, $action = 'add')
 {
     global $javconfig;
     if (JAVoiceHelpers::checkComponent('com_community') && (!isset($javconfig['plugin']) || $javconfig['plugin']->get('enable_activity_stream', 1))) {
         require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
         require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'activities.php';
         include_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'userpoints.php';
         $act = new stdClass();
         $act->cmd = 'com_javoice.voice.' . $action;
         $userPointModel = CFactory::getModel('Userpoints');
         // Test command, with userpoint command. If is unpublished do not proceed into adding to activity stream.
         $point = $userPointModel->getPointData($act->cmd);
         $points = 0;
         if ($point && !$point->published) {
             $points = 1;
         } elseif ($point) {
             $points = $point->points;
         }
         $act->actor = $actor;
         $act->target = $actor;
         // no target
         $act->title = JText::_($title);
         $act->content = JText::_('THIS_IS_THE_BODY');
         $act->app = 'com_javoice.voice';
         $act->cid = $cid;
         $act->points = $points;
         CFactory::load('libraries', 'activities');
         CActivityStream::add($act);
         /* Add points for user */
         CuserPoints::assignPoint($act->cmd, $actor);
     }
 }