2009
Sub-archives
Dec 14, 2009
collective.flowplayer_toolbar: adding accessibility in an unobtrusive way
The way I used to make Flowplayer use inside Plone a little more accessible, this time without branching the collective.flowplayer product!
First of all: some terms
After finishing this article I understand that people not familiar with this argument and software can be confused, so:
- Flowplayer (in capitalized form) is a Flash player for audio/video files, indipendent from the Plone technology.
- collective.flowplayer is a Plone products that use Flowplayer and give this player well integrated in Plone CMS
- collective.flowplayer 1.x is an old release family, that use Flowplayer 2.x
- collective.flowplayer 3.x is the last release family, that use Flowplayer 3
Introduction to main characters
Flowplayer is one of the most promising Flash audio/video player available right now, and we can use it in a simple way inside Plone site thanks the collective.flowplayer, a well know product that replaced the use of p4a.video in recent Plone experiences.
Flowplayer is good, and open source, but not the most accessible available player. Our work with collective.flowplayer accessibility begin when the available release was the 1.0.x version.
As noted above, Flowplayer version used in this old release was the old 2.x, so many of the most recent and cool features were missing; on the other hand, the current 3.x family is heavily integrated with jQuery Javascript framework.
Not less important, the Flowplayer team is the one who released the jQuery Tools, the javascript addon for jQuery recently integrated in Plone 4 thanks to plone.app.jquery.
Fixing collective.flowplayer 1.x
The main accessibility problem of Flowplayer is its flash controlbar. Practical tests show that is not easy to handle video controls using the keyboard.
Our customer, the same that ask for accessible videos in Plone and also like Flowplayer very much, provide us a static HTML example of Flowplayer that use Javascript controlbar, simply usable with keyboard. The problem was that this example supports Flowplayer 3.2, the current version of the Flash player, but not the version used in the Plone addon.
Also the example provide a patched version of the controlbar plugin for Flowplayer. This custom version add some missing HTML attributes and WAI-ARIA support.
After looking on the web we found that even if Flowplayer 2 was backward compared to the new branch, it provides some limited APIs, usable through Javascript.
Our target was to replicate all the feature seen in the Flowplayer 3 demo in the Flowplayer 2 environment... of course this was not so easy! However after some work we find a way to provide those features:
- a play/pause button
- a stop button (not required, but was simple to do)
- a timer display
The only feature "impossible" to obtain (directly) was the progressbar... to be honest, some additional Javascript could also realize this (we have the duration of the video, we have the current execution time, we know how to perform arithmetic division... why not draw ourself? :-) but was enough.
What we really don't like was this: we found no (simple) way to write a Plone addon that work with collective.flowplayer 1.0, adding to it our new features.
We don't waste more time: we made a branch of the original collective.flowplayer 1.x, providing our new feature.
Thank you! Thank you! We have collective.flowplayer 3.x!
After a few weeks collective.flowplayer 3.x was released (I think that the developers team skipped the 2.x version for aligning the Plone product's version to the Flowplayer one).
So we came back to the original example give to us (the customer project was happy finished using our branch) just for test the new feature available and to understand is in future a new, better approach is possible.
The API's of the latest Flowplayer versions are more complete and powerful, heavily filled with the jQuery power.
This time we were able to develop something that could live and enhance the original collective.flowplayer, releasing only a new product: collective.flowplayer_toolbar.
The final result really better than the old approach; without embarrassment I can say that we did a few line of codes! The most part of the work of our new controlbar came from Flowplayer features and one more time from the great jQuery library.
You want see the "core" of this product?
/**
* Javascript code for adding accessible toolbar to flowplayer players in the page
*/
jq(document).ready(function(event) {
$f("*").each(function() {
this.onLoad(function(event) {
this.getPlugin("controls").hide();
var p = jq(this.getParent());
var p_width = p.width();
var time_width = (p_width<400?99:129);
var hulu_id = "hulu-"+ (jq(".hulu").length+1);
p.after('<div id="'+hulu_id+'" style="width:'+p_width+'px" class="hulu">\n'
+'<a class="play" href="javascript:;" role="button">Play</a>\n'
+'<div class="track" style="width:'+(p_width-46-46-time_width)+'px">\n'
+' <div class="buffer"></div>\n'
+' <div class="progress"></div>\n'
+' <div class="playhead"></div>\n'
+'</div>\n'
+'<div class="time" style="width:'+time_width+'px"></div>\n'
+'<a class="mute" href="javascript:;" role="button">Mute</a>\n'
+'</div>\n');
this.controls(hulu_id);
// Now I'll fix all other positions of the new toolbar
jq("#"+hulu_id+" a.mute").css('left', p_width-46);
jq("#"+hulu_id+" div.time").css('left', p_width-46-time_width);
});
});
});
The rest of the egg simply use a limited version of the original CSS of the demo page in Flowplayer site, the patched controlbar plugin (but you can use the original one without problems)... nothing more!
The jQuery presence make real the injection our new feature on existings Flowplayer instance in the page (for example, this is also working properly for our redturtle.video product). No need to patch/branch collective.flowplayer, also no need to override some views or resource of it.
Conclusion
This work can be also a proof-of-concept for future Flowplayer integration with additional features. The player supports many additional plugins (Yuri point my attention to the Caption Flash plugin...).
Nov 05, 2009
Lotus knows superenaLOTUS makes you win!

In about one week we will be live! It's time for the 3rd Italian Lotus Users Group events (aka Dominopoint.it). So it's time to a little preview about my session (in italian):
Lotus knows superenaLOTUS makes you win!
You have to attend my session to discover the details ...
Oct 06, 2009
Improve the compatibility of collective.plonetruegallery
I created a branch of the product collective.plonetruegallery, extendible.gallery, which allows to use the features of the package for new types of content and not only for the type "Gallery".
I tried to use the functionality provided by the product collective.plonetruegallery, such as the view "gallery", for my content type, and I had a problem: these features are applicable only to the content type "Gallery". This is because in the code of the package conditions are evaluated on the value portal_type of the content type, eg. if(object.portal_type == 'Gallery').
So I changed some parts of the original product by ensuring that the controls are no longer performed on the value portal_type of the type of content, but on the interfaces implemented by the type of content. In this way the functionalities of collective.plonetruegallery can be applied to any type of content, different from "Gallery", if it implements the interface "IGallery", eg.: IGallery.providedBy (object).
I take advantage using my content type "Cartridge" that extends ATBTreeFolder, which functions as a folder can hold a large number of elements, rather than the type of content "Gallery" which is not a large folder, and then was not suitable for my purposes. But the point is that I could still use the view "gallery" of collective.plonetruegallery to view images from the cartridge, because my type of content implements the interface "IGallery".
I have proposed these changes to the developers of the product and now see if they are interested in applying this modern approach!
Sep 24, 2009
Sostituire i contenuti base di Plone con i propri archetype
Ho scritto un tutorial sul portale Plone Italia relativamente a questo delicato argomento.
Non dilunghiamoci troppo, dato che il tutorial può essere letto direttamente dal portale plone.it, ma riassumiamo solo i concetti che vi stanno dietro.
- Aumentare/modificare le funzionalità dei tipi nativi di Plone.
- Sostituire quindi questi tipi primitivi con i nostri tipi.
Fin qui tutto facile, il problema è sempre e solo uno: se sviluppiamo un nostro tipo di contenuto "News" e vogliamo che questo venga usato da Plone proprio come se fosse l'originale "News Item" di ATContentTypes, allora dovremmo combattere con l'integrazione nel sistema:
- Far capire a Plone che, dove prima veniva usato "News Item", ora venga usata la nostra news (piuttosto facile, ma noioso).
- Prodotti di terze parti (magari non ancora installati) dovranno usare il nostro contenuto se internamente facevano affidamento su "News Item"
Leggetevi quindi la guida all'applicazione di questo metodo.
Sep 16, 2009
PERFORMANCE, PERFORMANCE, PERFORMANCE...e non solo!
In uscita la release 8.5.1 di Lotus Domino
E' annunciata per metà ottobre l'uscita della release 8.5.1 di Lotus Domino.
Nel frattempo ci si sta sbizzarrendo nel testare la beta release e, udite udite, le reazioni sono estremamente positive, trapela addirittura una sorta di entusiasmo come da tempo non si sentiva.
In molti avranno certamente sofferto sin dal rilascio della R8.X il problema della lentezza del client notes standard (la versione eclipse in pratica).
Ebbene, in termini di prestazioni, se la versione 8.5.1 rimarrà così com'è, credo che tutti ne rimarranno estremamente soddisfatti
Non solo, a livello di amministrazione, inotes e designer sono annunciate una miriade di feature veramente interessanti
Sep 10, 2009
"Plone improvements ideas"
La comunità Plone cerca feedback da tutti gli utilizzatori
Da un paio di mesi la Plone Foundation ha aperto un servizio di richiesta di idee per le prossime release.
in questo senso dichiara:
This forum exists to allow you to suggest and vote on ideas that you think could improve Plone. We can't guarantee that we'll implement everything that's added here, but this is a chance to influence the future direction of Plone.
alcune di queste idee sono state votate e stanno lavorando per includerle nella release 4:
Puoi ovviamente proporre la tua idea, ma puoi anche votarne altre. Se ben organizzati, si può anche creare un "gruppo di pressione" in modo che alcuni temi sentiti solo in certi ambiti vengano resi noti anche ai developers.
Un caso è quello dell'accessibilità, tema molto caldo in Italia per via della famigerata legge Stanca, e che in ambito internazionale ci declina semplicemente con un rispetto delle norme del W3C.
Chiaramente il Forum è internazionale e la lingua è quella inglese, ma con il nostro dizionario inglese di fiducia, nulla ci spaventa :)
Sep 06, 2009
Pydev 1.5.0: into the wild
Il papà di Pydev annuncia il rilascio della versione 1.5.0 di questo eccezionale plugin per eclipse. La novità principale è che per la prima volta sarà completamente open source!
Da anni Pydev è uno degli strumenti favoriti da una moltitudine di sviluppatori Python per merito della sua completezza.
Fino a poco tempo fa al plugin open source Pydev si affiancava Pydev Extensions, liberamente scaricabile ma a codice chiuso. Dall'ultima versione, la 1.5.0, Pydev e Pydev Extensions sono stati unificati in un unico progetto open source! La notizia è stata data in questo annuncio da Fabio Zadrozny, lo sviluppatore che ha ideato questo gioiello.
Il link per l'installazione tramite eclipse è: http://pydev.org/updates
N.B.: occorre rimuovere eventuali versioni precedenti di Pydev prima di procedere all'aggiornamento.
Non possiamo che apprezzare Aptana, la società che finanzia lo sviluppo di Pydev, per questa scelta! Se nell'immediato si limita a togliere a molti sviluppatori il fastidio di chiudere una finestra promozionale. che compare periodicamente mentre si utilizza eclipse, nel lungo periodo permetterà a questo plugin di crescere con maggiore rapidità e di conquistare sempre più utenti.
Riferimenti:
- Il link della notizia originale
- La home page di Pydev
- La home page di Aptana
- Link per aggiornare eclipse: http://pydev.org/updates
Sep 03, 2009
NSD, il tuo compagno di viaggio quando Domino va in crash
NSD (Notes System Diagnostic) è uno strumento Lotus per raccogliere informazioni a fronte di un crash o di un hang di sistema. Vediamo la sessione presentata durante DominoPoint Day 2008, l'evento italiano della comunità Lotus.
Tra qualche mese ci sarà il terzo appuntamento con il DominoPoint Day, ripartiamo da dove ci eravamo fermati: la sessione su NSD presentata nel 2008. Scarica la presentazione su Slide Share.
Aug 31, 2009
Amberjack on Plone: first steps
collective.amberjack project just released the first tours
What's that?
Amberjack is a tool that allows you to create tours on your site. The purpose of the collective.amberjack project is to improve its functionality and to provide a way for creating not just tours but something more: tutorials.
What does it provide?
The actual implementation provides 4 packages:
- collective.amberjack.core
- collective.amberjack.portlet
- collective.amberjack.plonetour
- collective.amberjack.metatour
collective.amberjack.core
This one contains all the basic functionalities:
- it lets you add tours via ZCML,
- it manages and validates tours and steps,
-
it draws the tour box and it manages all the UI interactions via javascript
collective.amberjack.portlet
this package provides two portlets:
- a one shot tour portlet
- a portlet with a set of tours
collective.amberjack.plonetours
this one contains the first released tours:
- Add and publish a Folder
- Add and publish a Page
- Add and publish a News Item
- Add and publish an Event
- Format a page using the visual editor
- Create internal links
- Create external links
- Upload an image
- Insert image on a page
- Using the Display menu
others will be released soon.
collective.amberjack.metatour
the idea is to provide a TTW way to create new tours. You can translate them via LinguaPlone and can be used by a non-technical user.
A next step is to export the TTW created tours as packaged that can be shared for example via pypi.
how simple adding a tour IS?
First of all you need to define the tour:
add_folder = {
'url': u'/',
'xpath': u'',
'xcontent': u'',
'title': _(u"Create a new folder"),
'text': _(u"Folders are ..."),
'steps': ({'description': _(u"Click the [Add new...] drop-down menu."),
'idStep': u'menu_add-new',
'selector': u'',
'text': u''},
{'description': _(u"Select [Folder] from the menu."),
'idStep': u'new_folder',
'selector': u'',
'text': u''})}
ajTour = {'tourId': u'basic01_example',
'title': _(u'Add a Folder'),
'steps': (add_folder,
)}
then you have to register it
<collective.amberjack:tour
tourdescriptor=".example_tour.ajTour"
/>
If you need a complete example, please refer to the code.
Where can I find infos and code?
- The project home page, with a mailing list and wiki pages
- The code:
- there is also a PLIP and a to do list
Aug 16, 2009
munin.zope is born
Last week we moved redturtle.munin to it's new namespace - munin.zope.
Recently, with a lot of witsch help (honestly - it was almost all his work :-), we have refactored redturtle.munin and moved it to munin.zope namespace. The idea is to use it also for other projects - like munin.varnish or munin.django etc. If you don't know munin.zope yet it provides munin plugins for monitoring various aspects of a Zope instance. It's easy to deploy and almost ready out-of-the-buildout.
As for 1.1a1 we have for plugins available:
- "zopethreads" - reports free Zope threads
- "zopecache" - reports database cache parameters
- "zodbactivity" - reports ZODB activity
- "zopememory" - reports Zope memory usage (only works on Linux)
We are working right now on another one - ZODB conflict errors. It's supposed to count number of conflict errors in last 5 minutes.


