Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Word/Tag Cloud widget

Community Beginner ,
Sep 18, 2008 Sep 18, 2008
Hi there,

I'm looking for a CF8 module/widget to produce a user-viewable word cloudd from a list of tags and/or document words, like what is found at http://www.tagcrowd.com/. I looked in RIA Forge but did't find this.

Is there a Web 2.0 wizard who's got this done?!

Thanks!

~Lance
(202) 470-6353
579
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Sep 18, 2008 Sep 18, 2008
Nice! Thanks much, ~Lance
Translate
New Here ,
Sep 18, 2008 Sep 18, 2008
Hi Lance,

Here is a code snippet where "count" on the second line is the number of occurrences of the word or category that you are putting in the tag cloud. The font size is a variable that has a min and max size. Hope this helps.

David
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 18, 2008 Sep 18, 2008
Nice! Thanks much, ~Lance
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 18, 2008 Sep 18, 2008
Hi,
raw example below:

cheers, fober

<cfparam name="text" default="This is a test for test purposes.">

<cfoutput>
<form method="post">
<textarea name="text" rows="20" cols="60">#text#</textarea><br>
<input type="Submit" name="submit" value="Generate!">
</form>
</cfoutput>

<cfif text is "">
<cfabort>
</cfif>

<cfset words= StructNew()>

<cfoutput>
<cfloop list="#text#" index="word" delimiters=" .">
<cfif not listfind("& to of from for the at he she it a is in and or", word, " ")>
<cfif StructKeyExists(words, "#word#")>
<cfset count= StructFind(words, "#word#")>
<cfset x= StructUpdate(words, "#word#", "#count+1#")>
<cfelse>
<cfset x= StructInsert(words, "#word#", "1")>
</cfif>
</cfif>
</cfloop>

<!--- <cfdump var="#words#" expand="No"> --->

<div style="width:100%; border: 1px solid green;">TEST</div>

<div style="width:100%; border: 1px solid blue;">
<cfloop collection="#words#" item="word">
<cfif StructFind(words, "#word#") GT 2>
<cfset size= 10 + StructFind(words, "#word#")*2>
<div style="border: 1px solid red; display: inline; font-size: #size#px"> #word# </div>
</cfif>
</cfloop>
</div>
</cfoutput>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 18, 2008 Sep 18, 2008
LATEST
Really nice, and much appreciated. You folks are great!

~Lance
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources