本文整理汇总了PHP中tag_cloud函数的典型用法代码示例。如果您正苦于以下问题:PHP tag_cloud函数的具体用法?PHP tag_cloud怎么用?PHP tag_cloud使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tag_cloud函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: floor
}
$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);
示例2: tag_cloud
<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);
?>
示例3: __
<?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();
示例4: recent_posts
<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>
示例5: GENERAR_TAG_CLOUD
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>';
}
示例6: testEmptyTagCloud
public function testEmptyTagCloud()
{
$this->assertEquals('<p>No tags are available.</p>', tag_cloud());
}
示例7: _u
?>
<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>
示例8: __
<?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();
示例9: use_helper
<?php
use_helper('Tags');
?>
<?php
echo tag_cloud($tags, '@rt_search?q=%s');
示例10: tag_cloud
</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);
示例11: __
?>
</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();
示例12: mh_item_browse_subnav
</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>
示例13: name_tag_cloud
function name_tag_cloud($obj)
{
if ($obj == NULL) {
return '';
}
$html = tag_cloud($obj);
return $html;
}
示例14: ldap_login
<?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])) {
示例15: other
$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 . '(';