/** * Get module contents * * @return void */ public function run() { require_once \Component::path('com_tags') . DS . 'models' . DS . 'cloud.php'; $database = \App::get('db'); $obj = new Tag($database); $this->tags = $obj->getTopTags($this->params->get('numtags', 25)); require $this->getLayoutPath(); }
/** * Generate module contents * * @return void */ public function run() { require_once Component::path('com_tags') . DS . 'helpers' . DS . 'handler.php'; require_once Component::path('com_resources') . DS . 'tables' . DS . 'type.php'; $database = \App::get('db'); $obj = new Tag($database); $this->tags = $obj->getTopTags(intval($this->params->get('limit', 25))); // Get major types $t = new \Components\Resources\Tables\Type($database); $this->categories = $t->getMajorTypes(); require $this->getLayoutPath(); }
/** * Get a tag cloud for an object * * @param integer $showsizes Show tag size based on use? * @param integer $admin Show admin tags? * @param integer $objectid Object ID * @return mixed Return description (if any) ... */ public function getTopTagString($limit) { $t = new Tag($this->_db); $tags = $t->getTopTags($limit, $this->_scope, 'tcount DESC', 0); if ($tags && count($tags) > 0) { $tagarray = array(); foreach ($tags as $tag) { $tagarray[] = $tag->raw_tag; } $tags = implode(', ', $tagarray); } else { $tags = is_array($tags) ? implode('', $tags) : ''; } return $tags; }