Search

This is a really basic ensemble with a single section called Tags demonstrating the possibilities of integrating Symphony with Flash. Since Symphony is a powerful XML engine, it just makes sense to use it to manage the content of Flash applications. The ensemble has the following text input fields:

- Tag
- URI
- Topics
- Color
- Hover Color

One note: weird things happen to ActionScript hexadecimal color codes when exporting this Ensemble, so those fields are all blank. It appears to create character encoding issues.

The format of hexadecimal color values in ActionScript are in the following form:

0xRRGGBB

For example, this would be red:

0xFF0000

I was going to let the XSLT transform values such as “995500” to the preferred format for ActionScript, but “000000” would not be treated as a string using the Text Input field, but would instead return as “0”.

See a demo of the Flash file on my GitHub page (this is the HTML version): bauhouse.github.com

The HTML version, Flash source files, Symphony Ensemble and Symphony workspace are all available from GitHub.

Note

Be careful with the versions of the tagcloud.swf file. The Symphony ensemble version of the SWF has been re-compiled to work from within a subdirectory, specifically the workspace directory, and references “../tags-xml/” for the XML data. The HTML version looks for “tagcloud.xml” in the same directory as the SWF. If you need to make changes, the source files are included in the repository.

Tags Cloud Utility

The Cumulus ensemble uses the following utility to manage font sizes for HTML and Flash text. Play with the $minsize and $maxsize parameters to modify sizes.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template name="tags">

    <!-- Configure minimum and maximum point sizes for fonts -->
    <xsl:param name="minsize" select="12"/>
    <xsl:param name="maxsize" select="36"/>

    <!-- Size difference in points between each number of topics -->
    <xsl:param name="step" select="4"/>

    <!-- Custom colors for tags and hovers -->
    <xsl:param name="color">
        <xsl:if test="color"><xsl:value-of select="color"/></xsl:if>
    </xsl:param>
    <xsl:param name="hicolor">
        <xsl:if test="hover-color"><xsl:value-of select="hover-color"/></xsl:if>
    </xsl:param>

    <!-- Calculate font size -->
    <xsl:param name="fontsize">
        <xsl:choose>
            <xsl:when test="topics &lt; $minsize div $step"><xsl:value-of select="$minsize"/></xsl:when>
            <xsl:when test="topics &gt; $maxsize div $step"><xsl:value-of select="$maxsize"/></xsl:when>
            <xsl:otherwise><xsl:value-of select="$step * topics"/></xsl:otherwise>
        </xsl:choose>
    </xsl:param>

    <!-- Anchor for each tag -->
    <a href="{uri}" title="{topics} topics" class="tag-link-{@id}" rel="tag" style="font-size: {$fontsize}pt;">
        <xsl:if test="$color != ''">
            <xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
        </xsl:if>
        <xsl:if test="$hicolor != ''">
            <xsl:attribute name="hicolor"><xsl:value-of select="$hicolor"/></xsl:attribute>
        </xsl:if>
        <xsl:value-of select="tag"/>
    </a>
</xsl:template>

</xsl:stylesheet>

Really nice, it seems untill now there is no javascript library alternative for Roy Tanck's cumulus? I would prefer to have this flash-less. I wouldn't even mind to reserve the privilege to safari (webkit, google chrome,...) users and use css animation

It would be great to find an animation library that can accomplish the same thing with JavaScript instead of Flash. Let me know if you find anything.

So far, I have found only this JavaScript Animation Engine.

CSS animation is an interesting development, but it seems like it's a long way from adoption on a broad scale.

Thanks, i'd have too look around, sure it could be doen with mootools or jquery. Even coverflow album art can be achieved with a snippet of JS and a library.

Yes css ani is not broad scale yet, but personally i don't mind unbtrusive xtras being an incentive for users to upgrade their browser (public safari will support it soon enough). An older browser can still fallback on static css cloud.

Btw how does this extension fall back when no flash is supported? When I block flash in FF with flashblock, I get to see nothing, not even the xhtml links in the source.

can someone please explain to me how to make that part of the visible webpage in symphony, like it is in other CMSs because I haven’t seen any working example so far, and it bugs me.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details