Categorization and folksomony application

Function: RenderEditTagCloud

Render all known tags that are used in classified topics

Documentation

TODO

Parameters
  • THEWEB: the web where to look for tags, defaults to BASEWEB
  • FILTER: additionan filter to restrict the set of topics to extract tags from (optional)
  • NAME: name of the formfield to render an edit tag cloud for
  • VALUE: selected tags

Css
  • blogEditFormTagCloud

Implementation

%STARTINCLUDE%<!-- render edit tag cloud -->
~~~ <script type="text/javascript" src="%PUBURLPATH%/%TWIKIWEB%/ClassificationPlugin/jquery.tagselector.js"></script>
~~~ <script type="text/javascript">
~~~ $(function() {
%~~   TAGCOOCCURRENCE{
~~~     web="%IFDEFINED{"%THEWEB%" then="$test" else="%BASEWEB%"}%"
~~~     header="var coocc = {$n"
~~~     footer="$n};"
~~~     format=" \"$tag1\" : [ $array ]"
~~~     separator=",$n"
~~~     arrayformat="'$tag2'"
~~~     arrayseparator=","
~~~     allpairs="off"
~~~   }%
~~~  $("#clsTagSelector").tagSelector({"cooccurence": coocc});
~~~ });
~~~ </script>
~~~ <div class="clsTagSelector" id="clsTagSelector"><noautolink>
~~~ <input class="clsTagCloudInput" type="text" size="75" autocomplete="off"
~~~        name="%NAME%" id="%NAME%"
~~~        value="%IFDEFINED{"%VALUE%"}%" />
~~~ <div class="clsButtonBox">
~~~   <input class="twikiButton natCancelButton clsClearButton" type="button" value="Clear" />
~~~   <input class="twikiButton natAltButton clsResetButton" type="button" value="Reset" />
~~~ </div>
~~~ <div class="clsTagCloud">
%~~ TAGCLOUD{
~~~   "$percntDBQUERY{\"TopicType=~'\b(Tagged|Classified)Topic\b'
~~~      %IFDEFINED{"%FILTER%" then="AND (%FILTER%)" glue="off"}%\"
~~~      web=\"%IFDEFINED{"%THEWEB%" then="%THEWEB%" else="%BASEWEB%"}%\"
~~~      format=\"$formfield(%NAME%)\" separator=\" \"
~~~    }$percnt"
~~~    buckets="200"
~~~    offset="100"
~~~    separator=" "
~~~    warn="off"
~~~    group=" <strong>$group</strong> "
~~~    format="<span 
~~~      style=\"font-size:$weight%;\">
*~~      <a id=\"$term\" href=\"javascript:void(0)\"
~~~          $percntIFDEFINED{\"%VALUE%\" as=\".*\b$term\b.*\" glue=\"off\"
~~~            then=\"class=\\"current\\"\"
~~~          }$percnt
~~~         title=\"$count\">$term</a></span>"
~~~  }%
~~~ </div>
~~~ </noautolink>
~~~ </div>%STOPINCLUDE%

Test

Tags:

Calls to 'RenderEditTagCloud'

Copyright

© 2006-2007 Michael Daum http://wikiring.de

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.

Applications.ApplicationTopic
TopicType: DocuTopic, TopicFunction
Summary: Render all known tags that are used in classified topics
TWikiApplication: ClassificationApp
r0 - 20 Nov 2007 - 15:08:04 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul