Taxonomy
Here we discuss the following topics, each indexed with a collection of tags. The bigger the tag size, the more popular the topic. Just click on the appropriate tag to display all related articles.
"; /* ---- PARTIALS ------ */ $query = " SELECT tag, count AS size FROM tags WHERE site_id='".Webengine::$site['ID']."' GROUP BY tag ORDER BY tag DESC "; $tags = $db->selectAllRows($query); $maxSize = 0; foreach ( $tags as $tag ) { if ($tag[size]>$maxSize) $maxSize = $tag[size]; //$total += $tag[size]; } reset($tags); foreach ( $tags as $tag ) { if ($tag[size] <= 0) continue; $r = tagWeight($tag[size], $maxSize); if (!$r) continue; $weight = $r[weight]; $size = $r[size]; $easeOut = $r[easeOut]; $percent = $r[percent]; $selected = (strtolower($selectedTag)==strtolower($tag[tag])) ? " is-danger":"";
.= sprintf("$tag[tag] ",$percent);
}
.="
";
/* ------------*/