littled.net

Web design & development; online and offline ramblings

Lorem

Plone and Flash Player 10

October 17th, 2008

Another pyrrhic victory maybe, but something that has made me exceptionally happy this afternoon. Basically, yesterday I upgraded my version of Flash Player to version 10 only to find that the Flash files on our Plone-powered site no longer worked.

The lovely folks at SWFObject helped to identify why this was happening — nothing to do with SWFObject at all but the fact that Flash Player 10 implements some new security “features”. I managed to isolate it to the fact that Plone serves up ATFiles with the header, “Content-Disposition: attachment”. Flash Player 10 ignores files served up with this header, so you need to override this and set it to “Content-Disposition: inline;”.

I came up with this solution which may not be overly elegant but at least it works. I created a skin-level Python script that sets response headers before returning the file:

showflash.py

request = container.REQUEST
RESPONSE =  request.RESPONSE
flashvid = request['flashvid']
cd = ‘inline; filename=%s’ %(context.id)
RESPONSE.setHeader(’Content-Disposition’, cd)
return context[flashvid]

Then, when I embed the video with SWFObject I call it thus,

<script type="text/javascript">
   swfobject.embedSWF("&dtml-portal_url;/path/to/flash/showflash?flashvid=myflash.swf", "my-dom-id", "435", "290", "9.0.115");
</script>

This may be better handled by a product like Plone4Artists Video but it certainly works as a fix for us.

Tags: UI, flash, plone, web design, web development, zope

Daniel Burka interviewed on Sitepoint

October 6th, 2008

I read an interesting interview with Daniel Burka on Sitepoint last week. Daniel is, amongst other things, the lead designer at Digg. He talks about web, UI and interaction design and is a keen advocate of “user-centred design”: responding to how your users use your site and letting them guide you to what the problems are, which it’s then up to you to solve:

“And it’s up to us to find solutions to the problems—like the Henry Ford maxim that I mentioned in my talk today [at Web Directions South] : “If I had asked my customers, they would have told me they wanted a faster horse.” Anticipate beyond what our users can imagine. Having the feel to make that logical jump to the next level. That’s where the real genius is.”

Tags: UI, web design