How to add more characters to WP-Cumulus

One of the major shortcomings of Flash (imho) is the way it handles text. If you want to animate text, change its transparency or do any of the other things that Flash is so good at, you need to embed font characters into your movie. This is usually not so bad, if you know the target language your movie will be used to display.

My WP-Cumulus WordPress plugin however can be used to display tags in any language. Embedding all available characters would render the plugin unusable, as even the relatively simple Latin character set adds almost 30 kilobytes to the movie’s file size. This is why in order to use the plugin for other languages, you’ll need to add the appropriate characters yourself (or find someone who already has). Here’s how. It’s really quite easy.

In order to be able to recompile the movie you’ll need a working version of Flash 9 (CS2/3) or better. A trial version should do nicely. Once you’ve installed the application, follow these steps.

1. Download the source files.
The regular download does not include the Flash movie’s source files. You’ll need the development version, available here.

2. Open up tagcloud.fla.
Once you’ve extracted the downloaded zip file, you should have a folder called ‘wp-cumulus’, which contains a folder called ‘flash sources’. In that folder there’s a file called ‘tagcloud.fla’. Open that file in Flash.

3. Find the textfield.
This shouldn’t be too difficult. There’s nothing in the movie but a single text field, placed above, and to the right of the stage. Make sure you’re using the pasteboard setting (‘View’->’Pasteboard’). Select the text field, the ‘properties’ panel (usually docked at the bottom of the screen) should look somewhat like this.

4. Embed the characters.
Click the ‘embed’ button. This opens a dialog that lets you select which languages you’ll need. Use CTRL-clicking to select them. Then press OK.

5. Compile the movie.
Press CTRL-Enter to run the movie. This will overwrite the ‘tagcloud.swf’ file in you ‘flash sources’ folder. This file is now your own, customized tag cloud for use with WP-Cumulus. Simply use it overwrite the ‘tagcloud.swf’ currently in your blog’s wp-content/plugins/wp-cumulus folder.

Optional: Change the font.
If you’d like to use a different font with WP-Cumulus, there’s a few extra steps you’ll need to take.

  1. Change the text field’s font setting on the properties panel.
  2. Open the ‘Tag.as’ file located in ‘com/roytanck/wpcumulus’.
  3. Find the line that says ‘format.font = “Arial”;’.
  4. Change ‘Arial’ to the name of your font.
  5. Save the files and compile the movie.

There’s a distinct possibility that this will not work for languages like Chinese, Korean and Japanese. Even the simplest form of Chinese consists of over 5600 characters. Ten times the amount of Latin, and most of them are made up of complex shapes that require lots of curves. This will probably cause the movie’s size to become over 300 kilobytes, which I feel makes it unusable. If anyone attempts this, please let me know the results.

Known translations

UPDATE: More info on Chinese and unicode support is here.

143 Comments

  1. Hey Roy,

    Is it possible to set different font styles in the cloud? ie Normal, Italic and Bold. I can set everthing at one style but I want different styles mixed up.

    Thnx

    Gr

    Thomas

    Comment by Thomas — September 9, 2009 @ 2:22 pm

  2. Hi Roy,
    I want to protect my file of creation as you made with your URL :

    If somebody try to modify the link owner the file (./flickrwidget.swf) does not work any more but if we leave with his domain of the site owner (http://media.roytanck.com/flickrwidget.swf) it turns well.
    I want to make also as you for my Web site. It is possible to do like you ?
    In what place of the script ThumbCloud.as which I could modify ?

    Thank you in advance for your answer, Theo from Paris (France).

    Comment by theo — September 15, 2009 @ 9:59 pm

    • Hi Theo. If I understand you correctly, you want to protect the movie so it runs only from your domain? I do not have a restriction like that in place. In fact I encourage people to download the open source version and implement it on their websites. Any restrictions are purely coincidental.

      You could add a check to the class you mentioned to see if the first part of the url matches your domain. Shouldn’t be too hard to do. Google for ‘loaderInfo.url’.

      Comment by Roy — September 16, 2009 @ 11:20 am

  3. Hi Roy, im trying to edite it in macromedia flash mx but, says error, im openning the .fla archive, how can i edit option using that software?

    tnx for ur comments

    Comment by peter — September 23, 2009 @ 10:04 pm

  4. Link: 플래시 태그 구름 플러그인 WP-Cumulus - FantasyAmplifier
  5. I’m maintainer of Serbian localization of WordPress and administrator of locale Serbian WP forum. The other moderator of forum, Avram, pointed me toward issue with locale versions of swf file. After inspecting code and reading this guide, I decided to suggest you better way of dealing with locale swf file.

    Problem with current way is that users need to manually upload new swf file and this is problem because users now mostly use automatic installation of plugins.

    Even bigger problem occurs with automatic upgrade of plugin: localized version of file gets overwritten by original file from zip archive of plugin.

    Because of this I’m suggesting this approach. You could include localized swf files (for Serbian, Russian, Hebrew etc) in special folder, lets call it “swf”. They could use names which include locales used in WordPress (e.g. sr_RS.swf or tagcloud-sr_RS.swf). Then in php file you could create array which will include all locales for which locale swf file is included and then in if function check if there is currently used locale in WP (got with get_locale function); if there is, use that locale file, if not use default swf file you made.

    Even more advanced would be to have option in settings so that users could choose what file to use (for example, if user uses WP in English but writes in Serbian he doesn’t want default swf file, but based on locale of his WP he will use default). In this case, php function will first check if there is chosen option in database and if there is then use that locale, and if not, to use if functions described above.

    Other things I’m suggesting you are to use wp_enqueue_script function for swfobject instead of hard codding, and if possible, to internationalize plugin (see here and here).

    (btw, you should install here Subscribe to comments plugin to enable easier tracking of replies on comments)

    Comment by Milan — October 1, 2009 @ 10:09 pm

    • Hi Milan. I’m glad to report that I’m working on most of these issues. 1.22 was a quick security update, but I’m planning so many changes right now the next version may well be called 2.0.

      The only thing is that it’s impossible for me to include versions of the swf for all locales. there are just too many, and I don’t even have the proper font for at least some of them. I’d like to instead make it possible to add your own swf (without it getting overwritten on updates) and eventually move to Flash 10, which -as far as I can tell- would make this a non-issue anyway.

      I’ll look into that subscribe plugin, thanks.

      Comment by Roy — October 2, 2009 @ 8:25 am

  6. You (we) could make online repository of SWF files so makers of localized SWFs could add them to repo, while users could download them and iuse them in plugin with one click.

    Comment by Avram — October 3, 2009 @ 9:23 am

  7. and eventually move to Flash 10, which -as far as I can tell- would make this a non-issue anyway

    If Flash 10 solves this, then you should definitely make it for it.

    The only thing is that it’s impossible for me to include versions of the swf for all locales. there are just too many, and I don’t even have the proper font for at least some of them.

    I didn’t mean that you should make those localized files by yourself, but that other users send to you and that you later include them in release. And I don’t think that there is that much localized files.

    Other option would be what Avram suggest, though in that case there should be descriptive text in settings that inform non-Latin users about possible issues.

    I’m planning so many changes right now the next version may well be called 2.0

    Since you are making changes, check for that wp_enqueue_script and localization in advance.

    I’ll look into that subscribe plugin, thanks.

    You should install it, I hate to manually checks for replies on my comments when instead I could get a nice notification via e-mail.

    Comment by Milan — October 6, 2009 @ 6:10 pm

  8. Hm, you don’t have a style for blockqoute’s.

    Comment by Milan — October 6, 2009 @ 6:11 pm

  9. Hi Roy!
    Many thanks for datailed support your extentions. Just now my 3d cloud for joomla works with russian symbols. Thank you so much!

    Comment by yuriko — November 1, 2009 @ 6:36 pm

  10. Link: 和jQ以及WP-Cumulus的战斗 - horan studio
  11. Link: Help me test WP-Cumulus unicode support | Roy Tanck's weblog
  12. Thanks for great plugin!

    I’ve add armenian letters here: http://mk.am/wp-cumulus-armenian-letters/

    Comment by mk — November 30, 2009 @ 1:00 pm

  13. Hi Roy,

    you did a perfect job, but when i compiling tagcloud.fla in flash cs4 without any changes, it not working. Maybe i did something wrong?

    Robkex

    Comment by Robkex — December 6, 2009 @ 1:53 pm

  14. Hi Roy,
    it’s again me. I just found in web already compiled swf and downloaded it. Anyway thanks.

    Comment by Robkex — December 6, 2009 @ 2:00 pm

  15. hello.
    I have flash cloud in unicode, but there problems with my hosting provider to show all the characters.
    It would be great to use this flash tag cloud with Russian charset . Maybe some one have such swf file?
    I have no editor to make changes in swf file for Russian charset unfortunately.
    please help

    Comment by DJ — December 23, 2009 @ 8:30 pm

  16. Thanks Roy, for sharing your knowledge. I am scouring your site looking for the .fla as I have an idea for the flash and want to experiment. I download from the link at the top of this page but alas there is no .fla source file. Would you direct me? With gratitude.

    …Eventually I will use it on http://www.techthinktank.org which is in a beta stage. You are invited to be a guest presenter :) We would love to have you.

    http://wordpress.org/extend/plugins/wp-cumulus/download/
    version 1.23

    license.txt
    wp-cumulus.php
    readme.txt
    screenshot-1.png
    screenshot-2.png
    screenshot-3.png
    swfobject.js
    tagcloud.swf

    Comment by Amy Seidman — December 27, 2009 @ 3:39 am

  17. I found it at the bottom. THANK YOU! You rock!

    Comment by Amy Seidman — December 27, 2009 @ 3:42 am

  18. thank you! i do it.

    Comment by 成都网站建设 — January 5, 2010 @ 7:13 am

  19. Link: WP-Cumulus插件使用中文标签云 - 知知#39;s Blog
  20. Link: [HOT] WP-Cumulus bản hỗ trợ tiếng Việt | Hutek.info
  21. Hy Roy.

    My problem : Cumulus use hungatian Drupal website.
    If Category Tag: Tűz -> Flash Write “T z” , dont writen ű character.
    WP version good working after extend (add)Latin character cumulus.fla.
    Dont find internet cumulus.fla. Drupal version :(

    probation WP version (SWF)Decompiler then change(edit) Latin character and turn (compile), but Dont work :(

    Please upload original cumulus.fla (Drupal version) or upload modified swf file contain(include)
    ‘Latin Extended A (548 glyphs) ‘

    Please help.
    Thanks.

    ps.: dont speak english, but reading

    Comment by Origie — January 20, 2010 @ 11:12 pm

    • Origie, you could try using the swf file from the WordPress version. As far as I know, they’re identical.

      Comment by Roy — January 21, 2010 @ 9:12 am

  22. Link: 关于wp-culumus支持中文标签 - 轨迹
  23. Link: 怎样让WP-Cumulus插件支持中文 » 脱文解字
  24. Link: 中文化标签云-让cumulus支持简体中文 « 大尾巴狼的自留地
  25. Link: 让wp-cumulus支持显示中文标签云 ­ 理想社会
  26. Link: 8kbでもWP-Cumulusの多言語化できる | カガブログ新館「マカオ」
  27. Link: Kristaps raksta… » WP Cumulus – flash birku spraudnis tavam blogam
  28. Link: PW Software / Blog Archive / [ archive ] WP-Cumulus on Expression Engine!
  29. Link: Let WP-Cumulus display Chinese « kiddlee's blog
  30. Link: 3D标签云
  31. Link: WP-Cumulus با نوشته های فارسی :) | یادداشتهای بیت نیمسوز
  32. Link: WordPress ????? | Some Might Say