Documentation

Parameters
  • TAG: comma separated list of tags to be searched for in the archive
  • CAT: restrict tag cloud to this category; displays all tags of all categories if unspecified
  • KEYWORDS: keywords to filter for
  • MIN: minimum frequency of a tags to be shown
  • LIMIT: maximum number of tags in the could, defaults to 100
  • TOPICTYPE: limit search for tags of topics of the given type
  • THEWEB: web to restrict search to, defaults to current

Implementation

%STARTINCLUDE%<!-- -->
<noautolink>
%TAGCLOUD{ 
  terms="%DBSTATS{
    "TopicType=~'\b(Tagged|Classified)Topic\b'"
    format="$key:$count" 
    separator=", "
    field="Tag"
    sort="modifiedto"
    reverse="on"
    limit="%IF{"defined LIMIT" then="%LIMIT%" else="100"}%"
    web="%IF{"defined THEWEB" then="%THEWEB%"}%" 
  }%" 
  header="<div class='clsTagCloud'>" 
  format="<span style='font-size:$weightpx;line-height:110%'><a href='#' style='color:$fadeRGB(104,144,184,0,102,255);' name='tag_$term' value='$term'>$term</a></span>" 
  footer="</div>" 
  group="<strong>$group</strong>&nbsp;" 
  split="\s*,\s*" 
  buckets="19" 
  offset="10" 
  warn="off" 
  min="%IF{"not isempty 'MIN'" then="%MIN%" else="1"}%"
}%
%ADDTOZONE{"script" tag="TAGCLOUD::JS" requires="JQUERYPLUGIN"  
text="<literal> 
<script> 
jQuery(function($) { 
  $('.clsTagCloud a').click(function() { 
    var $this = $(this), 
        href = '%SCRIPTURL{"view"}%/%IF{"defined THEWEB and not isempty THEWEB and $THEWEB != 'all'" then="%THEWEB%" else="%BASEWEB%"}%/WebSearch'; 

    href += '#fq=tag:'+escape($this.attr('value')); 
    var tags = '%IF{"defined TAG" then="%TAG%"}%'.split(/\s*,\s*/); 
    for (var i = 0; i < tags.length; i++) { 
      if (tags[i] !='') { 
        href += '&fq=tag:'+escape(tags[i])+''; 
      } 
    } 
    var cats = '%IF{"defined CAT" then="%CAT%"}%'.split(/\s*,\s*/); 
    for (var i = 0; i < cats.length; i++) { 
      if (cats[i]!='') { 
        href += '&fq=category:'+escape(cats[i]); 
      } 
    } 
    window.location.href = href; 
    return false; 
  }); 
}); 
</script> 
</literal>" 
}%</noautolink>%STOPINCLUDE%

Test

%TAGCLOUD{ terms="BarBaz:1, festival:1, fertig:1, freak:1, FooBar:1, Application Performance Management XML Oracle Database:1, a aa:1, test:1, a AA:1, topic:1, a a a:1" header="
" format="$term" footer="
" group="$group " split="\s*,\s*" buckets="19" offset="10" warn="off" min="1" }%

Copyright

© 2007-2013 Michael Daum http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ApplicationTopic edit

TopicType DocuTopic, TopicFunction
TopicTitle
Summary Render a tool to list all classified topics in this web
WikiApplication ClassificationApp
Topic revision: r1 - 07 Jan 2013, ProjectContributor
Warning: Can't find topic Applications/ClassificationApp.WebLeftBarExample

 

Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.