$lang[anniversary] = 'Geburtstag';
$lang[marker] = 'Tags';
+$lang[tagcloud] = 'Alle verwendeten Tags, alphabetisch sortiert. Häufig verwendete Tags werden größer dargestellt.';
$lang[business] = 'Geschäftlich';
$lang[private] = 'Privat';
$lang[anniversary] = 'Birthday';
$lang[marker] = 'Tags';
+$lang[tagcloud] = 'All used tags, sorted alphabetically. Frequently used tags are shown bigger.';
$lang[business] = 'Business';
$lang[private] = 'Private';
--- /dev/null
+<?
+ require_once('init.php');
+ ldap_login();
+
+ //prepare templates
+ tpl_std();
+ $smarty->assign('tagcloud',tag_cloud());
+ //display templates
+ header('Content-Type: text/html; charset=utf-8');
+ $smarty->display('header.tpl');
+ $smarty->display('list_filter.tpl');
+ $smarty->display('tags.tpl');
+ $smarty->display('footer.tpl');
+
+ function tag_cloud(){
+ global $conf;
+ global $LDAP_CON;
+ if(!$conf[extended]) return;
+
+ $result = ldap_queryabooks('(objectClass=contactPerson)','marker');
+
+ $max = 0;
+ $tags = array();
+ foreach ($result as $entry){
+ if(count($entry['marker'])){
+ foreach($entry['marker'] as $marker){
+ $marker = strtolower($marker);
+ $tags[$marker] += 1;
+ if($tags[$marker] > $max) $max = $tags[$marker];
+ }
+ }
+ }
+ ksort($tags);
+
+ $out = '';
+ foreach($tags as $tag => $cnt){
+ $pct = round($cnt * 20 / $max); // percents from 0 to 20
+
+ $out .= '<a href="index.php?marker='.rawurlencode($tag).'" class="tc'.$pct.'">';
+ $out .= htmlspecialchars($tag).'</a> ';
+ }
+
+ return $out;
+ }
+
+?>
</form>
</td>
{/if}
+
{if $conf.extended}
<td class="filterrow" align="right">
<form method="get" action="index.php" style="display:inline">
- {$lang.marker}:
+ <a href="tags.php">{$lang.marker}</a>:
<input name="marker" class="searchfield" type="text" id="taglookup" value="{$smarty.request.marker|escape}"/>
<input type="submit" value="{$lang.search}" class="searchbutton">
</form>
<table width="100%">
{foreach from=$orgs item=org}
<tr>
- <td class="result" width="25">
- <img src="pix/org.png" border="0" width="22" height="22" align="middle">
+ <td class="result" width="20">
+ <img src="pix/cog.png" border="0" width="16" height="16" align="middle" />
</td>
<td class="result">
<a href="index.php?org={$org|escape:url}">{$org}</a><br>
font-family:Lucida,Helvetica,Verdana,Arial,Sans-Serif;
font-size: 12px;
}
+
+/* TagCloud */
+a.tc0 { font-size: 80%; }
+a.tc1 { font-size: 100%; }
+a.tc2 { font-size: 120%; }
+a.tc3 { font-size: 130%; }
+a.tc4 { font-size: 140%; }
+a.tc5 { font-size: 150%; }
+a.tc6 { font-size: 160%; }
+a.tc7 { font-size: 170%; }
+a.tc8 { font-size: 180%; }
+a.tc9 { font-size: 190%; }
+a.tc10 { font-size: 200%; }
+a.tc11 { font-size: 210%; }
+a.tc12 { font-size: 220%; }
+a.tc13 { font-size: 230%; }
+a.tc14 { font-size: 240%; }
+a.tc15 { font-size: 250%; }
+a.tc16 { font-size: 260%; }
+a.tc17 { font-size: 270%; }
+a.tc18 { font-size: 280%; }
+a.tc19 { font-size: 290%; }
+a.tc20 { font-size: 300%; }
+
--- /dev/null
+<p>{$lang.tagcloud}</p>
+
+<div class="tagcloud">
+ {$tagcloud}
+</div>