Jump to content


Photo

New features for packaging extensions in Extension Manager CS5


  • Please log in to reply
5 replies to this topic

#1 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 01 March 2011 - 02:23 PM

Extension Manager CS5 offers some interesting new functionality, which Iíd only recently discovered. The docs are here: http://help.adobe.co...g_extension.pdf

One new feature is the ability to include rich HTML descriptions of an extension. The <description> tag had previously allowed only unformatted text, so I would create an extensionís description as a plain text file that included some formatting using the Markdown syntax. That same plaintext description would be automatically converted to HTML markup for use on the extensionís about page, like http://johndunning.c...bout/LoremIpsum

With CS5, you can now also specify an href attribute to point any HTML page on the web. When the extension is installed, Extension Manager will display the contents from that URL:

EM CS5 with Lorem Ipsum.png

The <description> element can also contain the plaintext version of the description, which is used with older versions of EM and when the linked page cannot be accessed. The .mxi file for the Lorem Ipsum extension looks like this:

<macromedia-extension name="Lorem Ipsum" version="0.1.1" type="autoshape" requires-restart="false" date="2011-02-27 22:56:32 -0800">
	<products>
		<product name="Fireworks" version="10" primary="true"/>
	</products>
	<author name="John Dunning"/>
	<description href="http://johndunning.com/fireworks/description/LoremIpsum">
<![CDATA[Although the [Greeked Text][1] auto shape generally suffices for making ...
]]></description>
...

I first tried pointing EM at the existing about page, but that pageís layout didnít work well in the default EM window size. It also included some elements that didnít seem to work in the EMís embedded browser, like the Twitter and Facebook buttons. so I created a new version of that page template, with some tweaked CSS, and gave it a new URL: http://johndunning.c...tion/LoremIpsum That page has smaller margins and somewhat different markup, which fits in the EM window better.

Itís interesting to note that though some things donít work well in the EM browser, other features are fine, like the JS-Kit comment system, so users can actually add a comment right from the Extension Manager. Even the PayPal donation flow works (so why not give that a try? ;)).

The other interesting new feature is the ability for the Extension Manager to check for updates to installed extensions and download new versions when available. To enable that, you need to add an <update> element to the .mxi:

...
	</files>
	<update method="directlink" url="http://johndunning.com/fireworks/version/FlickrFire"/>
	<summary>
<![CDATA[FlickrFire lets you easily upload the image you're currently working on to Flickr, without ever leaving Fireworks.  Just enter a title and description, click Upload, and a flattened copy of your image will be posted to Flickr.]]></summary>
	<configuration-changes/>
</macromedia-extension>

The URL attribute in that element should point to an XML file that provides information about the most recent version of the extension and a URL for downloading it. When itís launched, the Extension Manager checks each update URL to see if thereís a new version available, and tells you if there is:

EM CS5 new version available.png

The version page for FlickrFire looks like this:

<ExtensionUpdateInformation>
<version>0.1.3</version>
<download>http://johndunning.com/fireworks/mxp/FlickrFire.mxp</download>
<description url="http://johndunning.com/fireworks/about/FlickrFire">
<![CDATA[<dl>
<dt>0.1.3</dt>
<dd>Worked around the encodeURIComponent() bug in Fireworks CS4/5 on Windows, which caused the extension to not work.</dd>

<dt>0.1.2</dt>
<dd>Fixed a bug that prevented extension from running on OS X.</dd>

<dt>0.1.1</dt>
<dd>Added option to export only part of the image.  Included updated fwlib.dialog library to show the command name in the dialog title.  Fixed bug where it could interfere with other commands.</dd>

<dt>0.1.0</dt>
<dd>Initial release.</dd>
</dl>
]]>
</description>
</ExtensionUpdateInformation>

This XML is automatically generated via a php script, which gets the <version> number from the most recent version of the extension on my site. If the <download> URL ends in .mxp, then the EM can directly download the new version and install, once the user agrees.

The <description> element can contain whatever info you want. Because Iíve been pretty consistent about adding a ďRelease historyĒ section to the description files for my extensions, the php can automatically extract the text in that section and turn it into markup using Markdown (a definition list in this case). This lets the user see what the most recent change was.

Anyway, hopefully these examples are of some use to the extension developers out there. So far, Iíve only updated the Lorem Ipsum extension to support these new features. However, new versions of other extensions should get the rich descriptions and auto-updating as I release them, since Iíve added the new elements to the build system that packages my extensions.

#2 abeall

abeall

    FireworksNut

  • Administrators
  • PipPipPipPipPipPip
  • 523 posts

Posted 01 March 2011 - 03:45 PM

Awesome! I'm particularly excited about the update feature, thanks for all the examples. Pretty amazing you make comments right in the description for an extension! I should install that comment system thing you have...

#3 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 02 March 2011 - 12:15 AM

Pretty amazing you make comments right in the description for an extension! I should install that comment system thing you have...

The commenting system is from JS-Kit, which is now called Echo. It was a little clunky to style and it can be kinda slow. But the biggest issue is that they've gone pay-only, though older sites like mine seem to still be free. I'd look at something like Disqus if you're looking for a commenting system.

More of the gory details about how my site is put together are here, if anyone's interested: http://johndunning.c...works/colophon/

#4 abeall

abeall

    FireworksNut

  • Administrators
  • PipPipPipPipPipPip
  • 523 posts

Posted 02 March 2011 - 02:40 PM

Ah yes I've read your Colophon page numerous times, I'm quite envious of the slick system you have set up. :)

Too bad about JS-Kit. You know of any decent free comment system? It wouldn't be too hard to make my own but ha, another thing I don't have time for in a million years. :)

#5 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 02 March 2011 - 07:22 PM

Ah yes I've read your Colophon page numerous times, I'm quite envious of the slick system you have set up. :)

I suspect you account for most of the pageviews, as it gets about 0 - 1 per day. :)

Too bad about JS-Kit. You know of any decent free comment system? It wouldn't be too hard to make my own but ha, another thing I don't have time for in a million years. :)

I'd look at Disqus, which I think is still free for self-serve accounts.

#6 abeall

abeall

    FireworksNut

  • Administrators
  • PipPipPipPipPipPip
  • 523 posts

Posted 02 March 2011 - 09:02 PM

Oops missed your mention of Disqus the first time.

Some cheeky individual already took the username abeall at Disqus!