Esempio n. 1
0
 function getCloud(&$params)
 {
     $moduleclass_sfx = $params->get('moduleclass_sfx', '');
     $table = $params->get('table', '');
     $column = $params->get('column', '');
     $filter = $params->get('filter', '');
     $url = $params->get('url', '');
     $splitter = $params->get('splitter', '');
     $alphabetically = $params->get('alphabetically', '');
     $min = intval($params->get('min', 1));
     $max = intval($params->get('max', 20));
     $seperator = $params->get('seperator', '');
     $document =& JFactory::getDocument();
     $db =& JFactory::getDBO();
     $query = "SELECT {$column} FROM {$table}";
     if ($filter != '') {
         $query .= " WHERE {$filter}";
     }
     $db->setQuery($query);
     $rows = $db->loadResultArray();
     $oCloud = new tagCloud($rows, $url, $min, $max, $seperator, $splitter);
     return $oCloud->render($alphabetically);
 }
Esempio n. 2
0
 function getCloud(&$params)
 {
     $moduleclass_sfx = $params->get('moduleclass_sfx', '');
     $table = $params->get('table', '');
     $column = $params->get('column', '');
     $filter = $params->get('filter', '');
     $url = $params->get('url', '');
     $splitter = $params->get('splitter', '');
     $alphabetically = $params->get('alphabetically', '');
     $min = (int) $params->get('min', 1);
     $max = (int) $params->get('max', 20);
     $seperator = $params->get('seperator', '');
     $document = JFactory::getDocument();
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->select($column)->from($table);
     if ($filter != '') {
         $query->wher($filter);
     }
     $db->setQuery($query);
     $rows = $db->loadResultArray();
     $oCloud = new tagCloud($rows, $url, $min, $max, $seperator, $splitter);
     return $oCloud->render($alphabetically);
 }