function __construct() { parent::__construct(); $this->_type = 'story'; }
function __construct() { global $_DB_table_prefix; parent::__construct(); $this->_type = 'nexfile'; }
/** * Builds a tagcloud * * @param string $ tag The wanted tag * @param int $ project The project * @return array content The content for the tag */ public function getTagcloud($project) { global $conn; $project = (int) $project; $sel1 = $conn->query("SELECT tags FROM files WHERE tags != '' AND project = {$project}"); $sel2 = $conn->query("SELECT tags FROM messages WHERE tags != '' AND project = {$project}"); $tags1 = array(); $worktags = ""; while ($dat = $sel1->fetch()) { $tag = $dat[0]; $tag = ucfirst($tag); if ($tag != "" and $tag != ",") { $worktags .= $tag . ","; } } while ($dat = $sel2->fetch()) { $tag = $dat[0]; $tag = ucfirst($tag); if ($tag != "" and $tag != ",") { $worktags .= $tag . ","; } } $worktags = substr($worktags, 0, strlen($worktags) - 1); $tags1 = explode(",", $worktags); $tagsnum = array_count_values($tags1); $tagsnum = array_filter($tagsnum, array($this, "limitcloud")); $thecloud = new tagcloud($tagsnum); $thecloud->itemsPerRow = 3; $thecloud->rows = ceil(count($tagsnum) / 3); $thecloud->padding = 3; $thecloud->maxFontSize = 16; $thecloud->minFontSize = 10; $thecloud->linkUrlPrefix = "managetags.php?action=gettag&id={$project}&tag="; return $thecloud->getCloud(); }
while ($tcproducts = tep_db_fetch_array($products_query1)) { $tc_content = $tcproducts['infopages_title'] . ' ' . $tc_content; $tc_content = $tcproducts['infopages_preview'] . ' ' . $tc_content; $tc_content = $tcproducts['infopages_description'] . ' ' . $tc_content; } $tc_content = strip_tags($tc_content); $tc_a_tags = array(); // normal version preg_match_all('/(?:\\W+?|^)([\\wהצ�ִײ��]+)/i', $tc_content, $regs, PREG_PATTERN_ORDER); foreach ($regs[1] as $tc_word) { $tc_word = trim($tc_word); $tc_word = strtolower(trim($tc_word)); if (!empty($tc_word)) { if (!stristr(Translate('Tagcloud forbidden'), $tc_word)) { if (strlen($tc_word) >= 4) { if (is_numeric($tc_word) == 'TRUE') { } else { if (array_key_exists($tc_word, $tc_a_tags)) { $tc_a_tags[$tc_word]++; } else { $tc_a_tags[$tc_word] = 1; } } } } } } $tc_tch = new tagcloud(25); $tc_tch->set_tagcloud_data($tc_a_tags); $tc_tagcloud = $tc_tch->get_tagcloud(); echo $tc_tagcloud;