Categorization and folksomony application

Function: RenderWebTagCloud

Render a tool to list all classified topics in this web

Documentation

Parameters
  • QUERY: comma separated list of tags to be searched for in the archive
  • MIN: minimum frequency of a tags to be shown
  • TAGCLOUDTOPIC: topic where to jump to when a tag is clicked, defaults to BASETOPIC
  • RECENCY: limit search for tags on most recently changed topics

Implementation

%STARTINCLUDE%<noautolink>
%~~ TAGCLOUD{
~~~   "$percntDBQUERY{
~~~     \"TopicType=~'\b(Tagged|Classified)Topic\b'
~~~       $percntFORMATLIST{\"%IFDEFINED{"%QUERY%"}%\" 
~~~         header=\"AND\" 
~~~         format=\" Tag=~'\b$1\b' \"
~~~         separator=\"AND\"
~~~       }$percnt
~~~     \"
~~~     order=\"modified\"
~~~     reverse=\"on\"
~~~     limit=\"%IFDEFINED{"%RECENCY%"}%\"
~~~     web=\"%BASEWEB%\"
~~~     format=\"$formfield(Tag)\" separator=\", \"
~~~   }$percnt"
~~~   buckets="200"
~~~   offset="100"
~~~   min="%IFDEFINED{"%MIN%" then="$test" else="0"}%"
~~~   split="[,\s]+"
~~~   header="<div class=\"clsTagCloud\">"
~~~   group="<strong>$group</strong>"
~~~   format="<a rel=\"nofollow\" name=\"$term\"
~~~        style=\"font-size:$weight%;
~~~                color:$fadeRGB(194,199,204,0,102,204);\"
~~~        href=\"%SCRIPTURLPATH{"view"}%/%BASEWEB%/
*~~          %IFDEFINED{"%TAGCLOUDTOPIC%" then="$test" else="%BASETOPIC%"}%
~~~          $percntFORMATLIST{
~~~            $percntIFDEFINED{\"%QUERY%\" 
~~~                as=\".*\b$term\b.*\" 
~~~                then=\"\\"$test\\" exclude=\\"$term\\"\" 
~~~                else=\"\\"$test,$term\\"\"
~~~                glue=\"off\"
~~~            }$percnt 
~~~            header=\"?search=\" 
~~~            unique=\"on\" 
~~~            separator=\",\" 
~~~          }$percnt#result\"
~~~          $percntIFDEFINED{\"%QUERY%\"
~~~            as=\".*\b$term\b.*\"
~~~            then=\"class=\\"current\\"\"
~~~            glue=\"off\"
~~~          }$percnt
~~~          title=\"found $count time(s)\"
~~~     >$term</a>"
~~~   footer="</ul></div>"
~~~ }%
%IFDEFINEDTHEN{"%QUERY%" glue="off"}%
<a name="results"></a>
%~~   $nopDBCALL{"Applications.ClassificationApp.RenderWebTagCloudHitList"
~~~     QUERY="
*~~       %$nopFORMATLIST{"%QUERY%" 
~~~         header="AND" 
~~~         format=" Tag=~'\b$1\b' "
~~~         separator="AND"
~~~       }%"
~~~     PARAMS="search=%QUERY%"
~~~     HILITE="Tag"
~~~   }%
%FIDEFINED%
~~~ </noautolink>
%STOPINCLUDE%

Test

Calls to 'RenderWebTagCloud'

Copyright

© 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 a tool to list all classified topics in this web
TWikiApplication: ClassificationApp
r0 - 07 Nov 2007 - 11:17:56 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul