/** * Method to load content item data for items in the category if they don't * exist. * * @access private * @return boolean True on success */ function _loadData($state = 1) { if (empty($this->_user)) { return false; // TODO: set error -- can't get siblings when we don't know the category } // Lets load the siblings if they don't already exist if (empty($this->_content[$state])) { $getDenounced = JRequest::getVar('getDenounced') != null ? JRequest::getInt('getDenounced') : false; require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_eqzonales' . DS . 'helper' . DS . 'contenthelper.php'; $contenthelper = new comEqZonalesContentHelper(); // Get the pagination request variables $limit = JRequest::getVar('limit', 100, '', 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $Arows = $contenthelper->getContent($limitstart, $limit, array(!$getDenounced ? '!tags_values:la_voz_del_vecino' : "denuncias:[1 TO *]", $this->_user->get('gid') < $this->_publishing_group ? "created_by:" . $this->_user->get('id') : "")); // special handling required as Uncategorized content does not have a section / category id linkage $i = $limitstart; $rows = array(); foreach ($Arows as $row) { //$row->slug = strlen($row->alias) ? "$row->id:$row->alias" : $row->id; //$row->catslug = strlen($row->catalias) ? "$row->catid:$row->catalias" : $row->catid; // check to determine if section or category has proper access rights $rows[$i] = $row; $i++; } $this->_data[$state] = $rows; } return true; }
*/ // no direct access defined('_JEXEC') or die('Restricted access'); // helper ContentHelperRoute require_once JPATH_BASE . DS . 'components' . DS . 'com_content' . DS . 'helpers' . DS . 'route.php'; // helper zonales require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_eqzonales' . DS . 'helper' . DS . 'contenthelper.php'; // lista de zonales, zonal actualmente seleccionado $helper = new comEqZonalesContentHelper(); /* * Ejecuto una búsqueda Solr de los artículos publicados como soy corresponsal. */ $limit = 100; $results = array(); try { $results = $helper->getContent(0, $limit, array("tags_values:la_voz_del_vecino")); } catch (Exception $e) { print_r($e->getMessage()); } $articles = array(); $moreArticles = array(); $cantArticles = 0; // display results if ($results) { // parametros $cantArticles = $params->get('cant_articles'); $total = (int) count($results); $start = min(1, $total); $end = min($limit, $total); // iterate result documents foreach ($results as $key => $doc) {