function Structure() { parent::Channel(); $this->EE =& get_instance(); $this->sql = new Sql_structure(); $adapter = new Structure_Nestedset_Adapter_Ee('exp_structure', 'lft', 'rgt', 'entry_id'); $this->nset = new Structure_Nestedset($adapter); $this->cat_trigger = $this->EE->config->item('reserved_category_word'); // ------------------------------------------- // Prepare Cache // ------------------------------------------- if (!isset($this->EE->session->cache['structure'])) { $this->EE->session->cache['structure'] = array(); } $this->cache =& $this->EE->session->cache['structure']; }
function Tagger_Helper() { $this->EE =& get_instance(); parent::Channel(); $this->_params(); }
public function Category_entry_loop() { parent::Channel(); $output = ''; $cat_url = $this->EE->TMPL->fetch_param('cat_url', ''); if (!empty($cat_url)) { $sql = $this->EE->db->query("\n SELECT \n *\n FROM " . $this->EE->db->dbprefix('categories') . "\n WHERE \n cat_url_title = '" . $this->EE->db->escape_str($cat_url) . "'\n "); $re = $sql->result_array(); $re = current($re); if (isset($re['cat_id'])) { $cat_id = $re['cat_id']; $this->EE->TMPL->tagparams['category'] = $cat_id; $this->EE->TMPL->tagparams['channel'] = $this->EE->TMPL->fetch_param('channel', ''); $this->EE->TMPL->tagparams['limit'] = $this->EE->TMPL->fetch_param('limit', ''); $this->EE->TMPL->tagparams['orderby'] = $this->EE->TMPL->fetch_param('orderby', ''); $this->EE->TMPL->tagparams['sort'] = $this->EE->TMPL->fetch_param('sort', ''); $this->EE->TMPL->tagparams['dynamic'] = $this->EE->TMPL->fetch_param('dynamic', ''); $this->EE->TMPL->tagparams['disable'] = $this->EE->TMPL->fetch_param('disable', ''); $this->EE->TMPL->tagparams['cache'] = $this->EE->TMPL->fetch_param('cache', ''); $this->EE->TMPL->tagparams['refresh'] = $this->EE->TMPL->fetch_param('refresh', ''); $this->EE->TMPL->tagparams['paginate'] = $this->EE->TMPL->fetch_param('paginate', ''); $this->return_data = parent::entries(); } } return $this->return_data; }
public function favorites() { parent::Channel(); // fetch current logged in user $current_user = $this->EE->session->userdata('member_id'); if (empty($current_user)) return $this->EE->TMPL->no_results(); // fetch all favorites by the user $re = $this->EE->taechogroup_model->get_entry_ids_by_member_id($current_user); if (empty($re)) return $this->EE->TMPL->no_results(); $entry_ids = array(); foreach ($re as $r) { $entry_ids[] = $r['entry_id']; } $this->EE->TMPL->tagparams['entry_id'] = implode('|', $entry_ids); $this->return_data = parent::entries(); return $this->return_data; }