// not required require 'core.php'; require APPLICATION_LIBPATH . 'functions.inc.php'; // This page requires authentication require APPLICATION_LIBPATH . 'auth.inc.php'; $tagid = cleanvar($_REQUEST['tagid']); $orderby = cleanvar($_REQUEST['orderby']); if (empty($orderby)) { $orderby = "name"; } if (empty($tagid)) { //show all tags include APPLICATION_INCPATH . 'htmlheader.inc.php'; echo "<h2>" . icon('tag', 32) . " "; echo "{$strTags}</h2>"; echo show_tag_cloud($orderby, TRUE); include APPLICATION_INCPATH . 'htmlfooter.inc.php'; } else { $sql = "SELECT name FROM `{$dbTags}` WHERE tagid = '{$tagid}' LIMIT 1"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } list($tagname) = mysql_fetch_row($result); include APPLICATION_INCPATH . 'htmlheader.inc.php'; echo "<h2>" . icon('tag', 32) . " <a href='view_tags.php'>{$strTag}</a>: {$tagname}"; if (array_key_exists($tagname, $CONFIG['tag_icons'])) { echo " <img src='images/icons/{$iconset}/32x32/{$CONFIG['tag_icons'][$tagname]}.png' alt='' />"; } echo "</h2>"; //show only this tag
function dashboard_tags($dashletid) { global $CONFIG, $iconset; $content = show_tag_cloud(); echo dashlet('tags', $dashletid, icon('tag', 16), $GLOBALS['strTags'], '', $content); }