} $days_ago = floor((time() - $latest_postings_data['time']) / 86400); $hours_ago = floor((time() - $latest_postings_data['time']) / 3600 - $days_ago * 24); $minutes_ago = floor((time() - $latest_postings_data['time']) / 60 - ($hours_ago * 60 + $days_ago * 1440)); $latest_postings[$i]['days_ago'] = $days_ago; $latest_postings[$i]['hours_ago'] = $hours_ago; $latest_postings[$i]['minutes_ago'] = $minutes_ago; $i++; } $smarty->assign('latest_postings', $latest_postings); } mysql_free_result($latest_postings_result); } // tag cloud: if ($settings['tag_cloud'] == 1) { $smarty->assign("tag_cloud", tag_cloud($settings['tag_cloud_day_period'], $settings['tag_cloud_scale_min'], $settings['tag_cloud_scale_max'])); } $page_count = ceil($total_threads / $settings['threads_per_page']); $subnav_link = array('mode' => 'posting', 'title' => 'new_topic_link_title', 'name' => 'new_topic_link'); if (isset($data_array)) { $smarty->assign("data", $data_array); } if (isset($tree)) { $smarty->assign("tree", $tree); } if (isset($threads)) { $smarty->assign("threads", $threads); } $smarty->assign("page", $page); $smarty->assign("category", $category); $smarty->assign("page_count", $page_count);
<div class="BasicsBox"> <h1>Tag Cloud</h1><p>What have people been searching for? The more a keyword is used the larger it appears.</p> <!--<p><a href="tag_cloud.php?type=Keyword+usage">> Keywords searched for</a> <a href="tag_cloud.php?type=Keyword+added+to+resource">> Keywords added to a resource</a> </p>--> </div> <div class="RecordBox"> <div class="RecordPanel"> <div class="RecordResouce"> <?php $tags = tag_cloud(-1, $type); $max = max($tags); $min = min($tags); $range = $max - $min; if ($range == 0) { $range = 1; } foreach ($tags as $tag => $count) { $fs = 10 + floor(($count - $min) / $range * 35); ?> <span style="font-size:<?php echo $fs; ?> px;padding:1px;"><a href="search.php?search=<?php echo urlencode($tag); ?>
<?php $pageTitle = __('Browse Items'); echo head(array('title' => $pageTitle, 'bodyclass' => 'items tags')); ?> <h1><?php echo $pageTitle; ?> </h1> <nav class="navigation items-nav secondary-nav"> <?php echo public_nav_items(); ?> </nav> <?php echo tag_cloud($tags, 'items/browse'); ?> <?php echo foot();
<div class="footer-column"> <div class="recent column"> <div class="inner"><h3>Recent Posts</h3><?php echo recent_posts(); ?> </div> </div> <div class="archive column"> <div class="inner"><h3>Archive</h3><?php echo archive_list(); ?> </div> </div> <div class="tagcloud column"> <div class="inner"><h3>Tags</h3><?php echo tag_cloud(); ?> </div> </div> <div class="social column"> <div class="inner"><h3>Follow</h3><?php echo social(); ?> </div> </div> </div> <div class="copyright"><?php echo copyright(); ?> </div> </footer>
function GENERAR_TAG_CLOUD() { $c = "SELECT (SELECT tag FROM ventas_tag AS b WHERE b.id = a.id_tag) as tag, count(id_tag) AS hits FROM (SELECT * FROM ventas_tag_uso AS b WHERE b.id_publicacion IN (SELECT c.id_publicacion FROM ventas_publicaciones AS c WHERE tipo IN (" . _A_aceptado . "," . _A_promocionado . ") AND fecha_fin >= CURDATE())) AS a GROUP BY id_tag ORDER BY hits DESC LIMIT 40"; $r = db_consultar($c); return '<h1>Nube de etiquetas</h1><div id="nube_etiquetas">' . tag_cloud($r) . '</div>'; }
public function testEmptyTagCloud() { $this->assertEquals('<p>No tags are available.</p>', tag_cloud()); }
?> <html> <head> <title>Notebook</title> <link rel="stylesheet" type="text/css" href="<?php _u('/css/skin.css'); ?> " /> </head> <body> <h1>Notebook</h1> <?php list_latest(12); pg_close($db_conn); ?> <div class="tag-cloud"> <?php tag_cloud(); ?> </div> <div class="clr"></div> <div classs="form"> <?php add_form(); ?> </div> <hr/> <p>© 2009 Shashi Gowda</p> </body> </html>
<?php $title = __('Browse Exhibits by Tag'); echo head(array('title' => $title, 'bodyclass' => 'exhibits')); ?> <div id="primary"> <?php if (!empty($tags)) { ?> <?php echo tag_cloud($tags, 'exhibits/browse/'); } else { ?> <h2><?php echo __('There are no tags to display. You must first tag some exhibits.'); ?> </h2> <?php } ?> </div> <?php echo foot();
<?php use_helper('Tags'); ?> <?php echo tag_cloud($tags, '@rt_search?q=%s');
</div> </div> <div class="box_content"> <div id="myCanvasContainer"> <canvas width="350" height="350" id="myCanvas"> <p>Anything in here will be replaced on browsers that support the canvas element</p> </canvas> </div> <div id="tags"> <ul> <?php if (isset($common_data['tags'])) { ?> <?php $taglist = tag_cloud($common_data['tags'], array('css1', 'css2', 'css3', 'css4')); ?> <?php foreach ($taglist as $value) { ?> <li><?php echo anchor('/tags/' . urlencode($value['name']), $value['name'], array('class' => $value['class'])); ?> </li> <?php } ?> <?php unset($value);
?> </h2> <p> <?php echo __('Sort by: '); ?> <a class="current" href="./tags?sort_field=name&sort_dir=a"><?php echo __('Alphabetical'); ?> </a> | <a href="./tags?sort_field=count&sort_dir=d"><?php echo __('Most'); ?> </a> | <a href="./tags?sort_field=count&sort_dir=a"><?php echo __('Least'); ?> </a> | <a href="./tags?sort_field=time&sort_dir=d"><?php echo __('Recent'); ?> </a> | </p> <?php echo tag_cloud($tags, 'items/browse', $maxClasses = 9, $tagNumber = true, $tagNumberOrder = 'after'); ?> </div> <?php echo foot();
</aside> </div> <div id="primary" class="browse"> <section id="tags"> <nav class="secondary-nav" id="tag-browse"> <?php mh_item_browse_subnav(); ?> </nav> <?php echo tag_cloud($tags, url('items/browse')); ?> </section> </div><!-- end primary --> <div id="page-col-right"> <aside id="page-sidebar"> <section id="recent-story" class="hidden"> <?php mh_display_recent_item(3); /* Used for swipe.js slider script */ ?> </section> </aside> </div>
function name_tag_cloud($obj) { if ($obj == NULL) { return ''; } $html = tag_cloud($obj); return $html; }
<?php require_once 'inc/init.php'; ldap_login(); if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])) { header('Location: login.php'); exit; } //prepare templates tpl_std(); $smarty->assign('tagcloud', tag_cloud()); //display templates header('Content-Type: text/html; charset=utf-8'); $smarty->display('tags.tpl'); function tag_cloud() { global $conf; global $LDAP_CON; global $FIELDS; if (!$FIELDS['_marker']) { return; } $result = ldap_queryabooks('(objectClass=inetOrgPerson)', $FIELDS['_marker']); $max = 0; $min = 999999999; $tags = array(); foreach ($result as $entry) { if (!empty($entry[$FIELDS['_marker']]) && count($entry[$FIELDS['_marker']])) { foreach ($entry[$FIELDS['_marker']] as $marker) { $marker = strtolower($marker); if (empty($tags[$marker])) {
$html .= ' and <a href="http://www.connotea.org/user/' . $result->users[1] . '">' . $result->users[1] . '</a>'; break; case 3: $html .= '<a href="http://www.connotea.org/user/' . $result->users[0] . '">' . $result->users[0] . '</a>'; $html .= ', <a href="http://www.connotea.org/user/' . $result->users[1] . '">' . $result->users[1] . '</a>'; $html .= ' and <a href="http://www.connotea.org/user/' . $result->users[2] . '">' . $result->users[2] . '</a>'; break; default: $html .= '<a href="http://www.connotea.org/user/' . $result->users[0] . '">' . $result->users[0] . '</a>'; $html .= ', <a href="http://www.connotea.org/user/' . $result->users[1] . '">' . $result->users[1] . '</a>'; $html .= ', <a href="http://www.connotea.org/user/' . $result->users[2] . '">' . $result->users[2] . '</a>'; $html .= ' and ' . (count($result->users) - 3) . ' other(s) '; break; } } $html .= '<br/>' . tag_cloud($result->tags); break; default: // badness $html .= ''; break; } $html = '<div style="width:400px;border:1px solid rgb(128,128,128);padding:4px;">' . $html . '</div>'; $result->html = $html; switch ($format) { case 'json': $output = json_encode($result); header("Content-type: text/plain; charset=utf-8\n\n"); $json = ''; if ($callback != '') { $json .= $callback . '(';
function mh_tags() { if (metadata('item', 'has tags')) { echo '<h3>Tags</h3>'; echo tag_cloud('item', 'items/browse'); } }
<aside class="category-list aside section"> <div class="section-inner"> <h2 class="heading">Category</h2> <div class="content"> <?php echo category_list(); ?> </div><!--//content--> </div><!--//section-inner--> </aside><!--//section--> <aside class="tags aside section"> <div class="section-inner"> <h2 class="heading">Tags</h2> <div class="tag-cloud"> <?php $tags = tag_cloud(true); ?> <?php foreach ($tags as $tag => $count) { ?> <a class="more-link" href="<?php echo site_url(); ?> tag/<?php echo $tag; ?> "><?php echo tag_i18n($tag); ?> </a> <?php
function form_bookmarklet($title = '', $url = '', $content = '', $placeholder = 'Snippet', $passwordform = '') { global $config, $template; $repl = array(); $repl['#labeltags'] = msg('Tags'); $repl['#labeltitre'] = msg('Title'); $repl['#labeladr'] = msg('Website'); $repl['#labelcontent'] = msg('Content'); $repl['#placeholder'] = $placeholder; $repl['#passwordform'] = $passwordform; $repl['#uniqid'] = uniqid(); $repl['#formtitre'] = msg('Add a snippet'); $repl['#tagcloud'] = tag_cloud('tag_cloud_checkbox', $config['sort_tags_by_nb']); $repl['value="#titre"'] = 'value="' . $title . '"'; $repl['value="#adresse"'] = 'value="' . $url . '"'; $repl['#contenu</textarea>'] = $content . '</textarea>'; $repl['#hidden'] = ''; $repl[' name="from_bookmarklet" value="no"'] = ' name="from_bookmarklet" value="yes"'; return str_replace(array_keys($repl), array_values($repl), $template['snippet_frm']); }