While work continues on the next maintenance releases for eZ Publish as well as eZ Publish 4.1, we provide you new final and beta releases for some extensions this week.
Final release of eZ Survey for eZ Publish 4.0Through an open funding project, an enhanced version of the eZ Survey extension is available for download on the projects.ez.no site
Beta releases of eZ Online Editor and eZ NewsletterA second beta release of the new eZ Online Editor 5.0 is also available. The final release will be bundled with the upcoming eZ Publish 4.1 version, but is also compatible with eZ Publish 4.0.
Furthermore, we urge you to try and report bugs on the beta version of an enhanced eZ Newsletter 1.6 release for eZ Publish 4.0
It seems that the first version of the jQuery Who's Who library is finished. I present here what I've done and some feedbacks on the use of jQuery.
jQuery Who's Who 0.1 jquery_whoswho.zip 71.04 kB How it worksIt is very simple to use. You just have to include the javascript files (jquery and jquery.whoswho) and the stylesheet files (a CSS file I provided for the example). Then you must configure it :
I have tested it a lot but some bugs may remain. Just tell me.
Structure of the packageThis is how I have organized the package :
And a little feedback of my jQuery's use.
It's very easy to use it and to bind functions to events, however, this tutorial recomands to bind a function to an event only when it is required.
It may occur that the DOM you would like to access doesn't exist at the moment you are running it. It means that if your code is appending HTML after a DOM node on a button click, you would like to access and manipulate this new fresh inserted code. It is not possible unless you call the bind function at the perfect moment.
$(document).ready( function(){ $("#button").click(function(){ $("#test").append(''); }); });In this exemple, when we click on the button element (could be a real HTML input button, or not), jQuery inserts some HTML (a new div in this case) at the end of the inner HTML of the test element. So you have a new div which wasn't there before.
Then you can bind some event on this new element by adding code just after the append function has been called. The issue is that at each click, you will bind the event. Then after two clicks, the HTML code will be appended two times rather than one time as expected. The solution is to separate the functions adding content to the DOM and the functions that bind it. The way to do it is to concretely create a function outside the click bind and put our new bind inside it. Then, at the end of the click bind function, we just call the function we have created.
The other point is the way to develop and to debug your own application :
DOM Inspector
Next Step
And finally, the next step is to integrate this library in eZPublish, I thought about some interesting features like a generic db connector to extract data from db and output JSON. By the way, it will use eZComponents...
Just as I'm struggling with cache optimization for one of the current projects, I discovered that it would be great if cache-block functionality had one more parameter - a user-defined and user-readable identifier. Being able to clear all the cache by calling this identifier would be a great enhancement. It would be enough if it was implemented at eZ API level, so that users were able to create their own actions (views) to handle it. This would be especially benefitial for caching of custom modules and views, outside content and content tree itself.
Life example: Imagine expensive custom views that require couple of hundreds of SQL queries per view or view/param combination, and can be accessed/managed by a) the owner (of something), b) all other users. Now, leaving these views uncached would be suicidal, and cache-blocks would be quite handy, and there would be only two cache blocks per view (since you either are the owner or not). Now, the additional expectation is that the owner will always have his view up-to-date, which means we can't really cache it for him. Wouldn't it be great to be able to create a button named "Refresh my view", which would cause one particular cache-block (or cache block group) be cleared? In that way, we could cache the owner's view as well, making it possible to let a manual clear only when needed ;)
As Microsoft Silverlight technology is becoming increasingly popular, it will be supported in the upcoming eZ Publish 4.1 release. Sites using the Website Interface and eZ Flow will include a Silverlight class and the corresponding view templates. Simply upload .xap files (compressed Silverlight package) as attributes in Silverlight objects; when such an object is viewed by a site visitor, your Silverlight media is loaded in the web browser (provided that the visitor has the Silverlight browser plugin installed). This is similar to how eZ Publish already supports .swf files via the Flash class. More information will be available as the next eZ Publish release date approaches.
This issue is dedicated to the 2008 Open Nordic Conference. We have speakers, program and the exhibition area ready, please download the issue via the image below and read more about it.
Through Planet PHP I found an article on Pre-populating forms with the timezone. I'd normally add a comment instead, but the comment would almost be larger then the original post, so I am instead writing up an entry myself. The post describes several ways to obtain the user's timezone and use that to pre-fill a form. None of them are working properly though. I'll try to explain for each of them why not, but first of all it is important to know what a timezone actually is.
A timezone is a set of rules that determines the UTC offset for different times around the year for a specific location. Because of daylight savings time, a specific location can have two (or more) different UTC offsets depending on what point in time you look at it. Some areas might have had different rules in the past, even in the same country. An example here is China, where currently there is only one timezone, but previously there were multiple. Thus there are different timezones for the different locations in China, even though the current UTC offset is the same for all of them. Timezones are identified by Country/City or Country/Subcountry/City.
The offering by MaxMind allows you to link a country/region combination to Timezone identifier. For the US it subdivides this per state even. However, it misses the different timezones for Russia, Australia and even Indiana, USA.
IP2Location only provides a single UTC offset per IP range, totally ignoring daylight savings time.
The Hostip.info solution I can't access because phpclasses requires some stupid registration.
As for the author's own solution, using JavaScript, is flawed at least partly as well. In his example JavaScript only returns a UTC offset. Luckily it is possible to detect the correct timezone quite a bit better by using some of PHP's functionality. The following bit of code uses both the UTC offset and the timezone abbreviation to find out the user's timezone:
<?php if (!isset($_GET['tzinfo'])) { ?> <html> <script type="text/javascript"> var d = new Date() var tza = d.toLocaleString().split(" ").slice(-1) var tzo = d.getTimezoneOffset() window.location = window.location + '?tzinfo=' + tza + '|' + tzo </script> </html> <?php } else { list( $abbr, $offset ) = explode( '|', $_GET['tzinfo']); echo timezone_name_from_abbr( $abbr, $offset * -60 ); } ?>
This is still not perfect of course, because it would for example give the same result for most of Europe (Europe/Berlin).
Figuring out the user's timezone can be done by using a high-accuracy database of IPs to lat/longitudes such as hostip.info and MaxMind offer, as well as a mapping from location to timezone. The latter however, is not available as far as I know. If however a data file that has proper definitions of the different timezone boundaries exist (mostly, on a per-province level would be enough), then such a tool can be easily build. I saw that OpenStreetMap has such a map, but I can't really find the raw data for that unfortunately. It would however, be awesome to have such a data file.
Since a few days, there is a new package in Debian: php5-xdebug. After a few years of talking licenses, due to the help of Martin Meredith and François Marier Xdebug can finally be installed with apt-get. See the synaptic screen shot as well:
During a mission, I discovered jQuery : a javascript library providing facilities and strong functionnalities to static web pages.
jQueryThe use of this library is very simple. It has been made to use the developper's life and specially the maintenance of functionnalities. The javascript entered is shorter and more simple. It has few concepts so it is very quick to learn.
There is only one entry point in jQuery : the $ function. It allows you to access some standard functions to select nodes in the DOM, to manipulate them or to handle events.
The selectors are very useful because you can select almost every item in the DOM using id, css class or javascript variable name. Then, if there is more than one occurence, the function will result an array. Moreover, you can use XPath expression as filters, to reduce the number of object returned.
The strength of jQuery is the chainability of the functions. It allows to increase readability and maintenance of a javascript. You can also combine jQuery with classical JavaScript scripts.
The ChallengeTo test this library, I've decided to develop an eZPublish extension integrating the jQuery library.
As a user case, I've chosen the Facebook tagging functionnality : you choose a picture, you tag your friends, you save it, hovering the head of a friend, the name is shown...
I have first worked offline to design the javascript. Here's a snapshot of what I have done : image gallery
Conclusion : it's very easy to come to grips with jQuery and a bit hard to debug. So I've searched and found a plugin to debug my script. See below.
Other interresting libraries...I also heard about the ExtJS library which is a professional javascript library providing user interface components to build professional applications. jQuery is also experimenting this way by launching jQuery UI. It will be at the end equivalent I guess, but you will be able to still use the jQuery library as an independant library.
RessourcesHere's some ressource :
jQuery : http://www.jquery.com
Visual jQuery : http://www.visualjquery.com/1.1.2.html
Dump Plugin for jQuery : http://www.netgrow.com.au/files/javascript_dump.cfm
Javascript benchmark : http://flesler.blogspot.com/2008/04/benchmarking-javascript-variables-and.html
We've now found a definite location for PHP Vikinger. It will be at one of the old factory buildings here at Klosterøya, close to eZ Systems' offices. The room has about space for 80 people, and has a nice view over the river southwards. About 20 people from Norway, Iceland, the UK, Germany and Denmark have signed up so far. This means there is still plenty of space for you! See http://phpvikinger.org for more information, and the invitation.
Because the lazy bastards at Sun still didn't manage to make a 64 bit version of their Java plugin, you have to go through all sorts of hoops to make it actually work. Normally I wouldn't really care about this, but unfortunately my bank decided to require Java working in the browser for authentication. Four hours of my time later, I managed to get it working. To save others from some of the pain, here is how I did that:
1. Download from ftp://ftp.tux.org/pub/java/JDK-1.4.2/amd64/ the file j2sdk-1.4.2-03-linux-amd64.bin.
2. I downloaded it to ~/install, so go into that directory and run:
chmod +x j2sdk-1.4.2-03-linux-amd64.bin
3. Run:
./j2sdk-1.4.2-03-linux-amd64.bin
and wait until it's done installing (make sure it mentions "Uncompressing Blackdown Java 2 Standard Edition SDK v1.4.2-03" at some point).
4. Now, to make it work as a plugin, you have to link (not copy, as that makes the browser crash) the plugin to your mozilla directory. For me:
cd /home/derick/.mozilla/plugins ln -s /home/derick/install/j2sdk1.4.2⇢ /jre/plugin/amd64/mozilla/libjavaplugin_oji.so .
5. Restart the browser and check whether the blackdown java plugin shows up if you go to about:plugins.
On behalf of the eZ Labs team, you are cordially invited to eZ Publish Community Developer Day on the 18th of June, 2008 in Skien, Norway.
This is the fifth meeting in a little over a year. We decided to add a full morning of tutorials and break-out sessions on eZ Components, eZ Publish and extensions. Contrary to last year, the Developer Day will be organized separately from the PHP Vikinger event, so people who want to attend both events and the conference will be able to do so.
The afternoon on the 18th will consist of a few more talks by community members followed by a barcamp. In between, lunch will be offered for free
Read below for the (draft) agenda and registration information (registration is required). The registration form allows for submitting proposals for a talk and/or subjects you would like to see treated during the barcamp.
See you in Skien!
˙ǝʞoɾ slooɟ s,lıɹdɐ ʇxǝu ǝɥʇ ʇuǝɯǝldɯı oʇ ʇuɐʍ noʎ ɟı unɟ - sıɥʇ ǝʞıl ƃuıɥʇǝɯos sı ʇlnsǝɹ ǝɥʇ ˙ǝsɹǝʌǝɹ puɐ 'uʍop ǝpısdn ʇxǝʇ sʇnd ʎllɐnʇɔɐ ʇɐɥʇ ʇdıɹɔs ɐ ǝɯ ǝʌɐƃ lɐdoƃ oƃɐ ǝɯıʇ ǝɯos ˙ǝɯıʇ ǝɯos ǝʇınb ɹoɟ ǝpoɔıun puɐ sʇǝs ɹǝʇɔɐɹɐɥɔ ɥʇıʍ ƃuıʎɐld uǝǝq ǝʌ,I
The PHP Vikinger unconference, to be held in Skien, Norway on June 21st is now open for registration. You can find the full invitation and announcement here, but I will repeat the highlights.
First of all, this is a free event, but we do require you to register for it to see whether we would have enough space. Places to sleep, and getting to Skien should be arranged by yourself. We made a information page with some suggestions though. The Norwegian PHP User group has reports and videos from last year. The unconference open for all, from beginners to advanced PHP users. At the moment there are about 12 registrations, from people from Norway, Germany, Iceland and the UK. Hope to see you here!
Voici un compte rendu du eZ developer day du 17/04/2008 qui s'est déroulé dans les locaux de Sun Microsystems réunissant une cinquantaine de développeurs intéressé par le CMS eZ Publish . Nous avons tout d'abord eu droit à une première présentation de la stratégie "Open Source" de Sun. Rien de très intéressant techniquement parlant, si ce n'est quelques fonctionnalités avancées d'Open Solaris comme le système de fichiers ZFS ou la solution de virtualisation et une volonté affichée avec l'ouverture de Solaris de concurrencer les distributions Linux autant au niveau professionnel avec des niveaux de support avancés qu'au niveau communautaire.
La suite était heureusement nettement plus intéressante. Comme en octobre dernier Paul Borgermans nous a présenté la roadmap des différents produits eZ (eZ Publish, eZ Components , eZ Flow, eZ Find , ...). Le moins qu'on puisse dire est que de grosses évolutions voire des révolutions sont en marche au moins au niveau d'eZ Publish.
La version 4.1 d'eZ PublishCette version devrait voir apparaître le très attendu Online Editor basé sur TinyMCE bien plus configurable et souple que l'actuel. La compatibilité avec l'existant sera assuré de manière transparente. Cette version verra aussi le retour de la compatibilité avec Oracle, le support de Solaris 10 ou encore une fonctionnalité d'expiration des mots de passe développé par un partenaire.
Une extension fournissant un flash permettant l'upload massif sera également fournie. La démonstration était vraiment bluffante, ce sera une alternative très intéressante au WebDAV , protocole qui manque cruellement de client fiable en particulier sous Windows.
La version 4.5 d'eZ PublishCette version verra beaucoup de changements internes selon 2 axes principaux
Le second étant en partie remplie par le premier. en vrac les nouveautés annoncées sont les suivantes :
ouf ! voila déjà une belle et ambitieuse liste rien que pour eZ Publish ! Cette version devrait paraître avant la fin de l'année.
eZ Find, eZ Flow, eZ ComponentseZ Find 1.1 apportera la recherche par facets dans le courant du second trimestre 2008. La version 2.0 sera une réécriture complète via le composant Search des eZ Components de manière à profiter de l'ensemble des fonctionnalités de Solr .
De nouvelles version d'eZ Flow et d'eZ Components sont annoncées pour la eZ conférence en Norvège au mois de juin . Enfin, eZ Flow 2.0 est également annoncée pour la fin de l'année.
BarCamp !L'après midi s'est terminé par un barcamp axé sur les questions apportées par les différents participants. Chacun a pu échanger sur ses "recettes de cuisine" eZ Publish, je retiens plusieurs points très en vrac :
Bon au final, mon sentiment sur cette après midi fort instructive est que le développement d'eZ Publish tente de combler les lacunes au niveau des (très) gros sites autant en terme de volume qu'en terme de performances.
Snack Culture
Last week, I went to the eZSystem's Partner Day which was organized at Apple France headquarters. Vincent Bellissen's first slide was about Snack Culture, a new consumption habit based on bite-sized products. Minimal invest and maximum entertainment. You want to change, you can and it is easy.
A typical example is the success of the iTunes music library : once registered in the iStore, you can buy music files in just few clicks. The Amazon website allows too to buy books or dvds in two clicks maximum (one to login and one to buy).
So the consumption habit has evolved in the way that you can enjoy little part of a product instead of the full product. If we check the ratio part of product / price, we can see that the producer gets always great benefits. It's not new, you may buy a big pot of mayonnaise for 10€ or a tiny one for 3€ but you won't get the third of the big pot. What has changed is the way we can buy it, the product's availability and the way we can use it. You can check your mails while waiting a friend in a bar, watch a movie clip in the tube or even surf the net during a fly.
However, it's a bit threatening. I was thinking that in ten years, children won't read books anymore...
99 Francs
Still digesting this inner revolution, I watched the day after a French movie called “99 Francs”. The story is about a creative publicist who is working in the larger advertisement company in France and who has some issues with girls, drugs, his boss and the whole meaning of his life... I guess it is a good movie and it makes me wonder some things.
Our consumption habits are also enclosed in our today life. We are more receptive to advertisement using some classical symbols and values than original scripts and out of sequence art design. So, if we change the way to consume products by adding mobility and specific parts of products, may be we can break free from this chasm of consumption, classical one.
Moreover, I thought that it might be a catalyst for new shape of art and techniques. With smart phones, we will be able to add high enhanced applications as interactive games, shared software and other funny stuff (video chat or whatever).
Co ?
So, this is what we do. Causing people to buy our products or our services. We are creating desire around functionalities and freedom for a more or less convinced set of people.
The limit is what we can do to be pertinent : what functionality can I imagine that will be sold in the real life ? The business is restricting the scope of our ability and by this way only focusing on what is really important : users need.
That's why changing our consumption habit may change the way we are doing things. We may experiment some new techniques as the impact on bite-sized consumption is very thin.
It took me fairly long time to figure out what particular tool available from PHP in my custom software and website implementations was missing from eZ Publish... but I finally got it. It's the ability to dynamically, flexibly cache variables, understood as operation or logic results, stored in a reusable form. Naturally, there is no significant need of caching simple variables defined directly within the pagelayout, just like these:
{def $my_var=345}
{def $my_other_var=hash( 'a', '4023' )}
However, it gets worse not being able to cheaply store an array of ten values, whose fetching/generating cost was over fifty or one hundred SQL queries, several files accessed in the file system, etc.
ProblemThe problem seems quite straightforward - out of many caching techniques and layers in eZ Publish, only two are universally useful: the viewcache and the cache-blocks. Unfortunately, both of them store presentation layer results rather than data, and both are quite independent. As a result:
My idea is a cache layer halfway between logic/data and the presentation layer. It could be a variable-dedicated cache-block equivalent (maybe a var-block?).
Example: Imagine a website that for each of its node views should be able to access both current node data (data map) as well as root node data in order to make some decisions, calculations, etc. Further, the data could be required by at least three of its cache blocks (with different expiry times, expiry rules and "uncomfortable" locations within the pagelayout). Today that sort of combination requires a substantial...
The var-block as I imagine it would have expiry settings similar to cache-blocks: subtree expiry, expiry ignore, expiry time and a flexible key management. In order to prevent frequent file system access, var-block could serialize variable collections rather than just singles. An additional "collection name" parameter could help organize the blocks within the pagelayout.
Please let me know what you think.
Here's the prototype:
http://ez.no/developer/contribs/template_plugins/self_var_cache
Back after a longer while... wasn't on holiday, though ;)
About a week ago, while developing my fifth or tenth extension with its own, custom caching layer, I caught myself trying to clear that cache with eZ standard "Clear cache" button. To none of my surprise, it never worked, but after few attempts I decided to see why ;)
The Fine-grained cache control in the administration interface turned out to be a definition-type of array - easy enough to be made extensible with some effort. Why should a developer be in need of creating custom tools then? Let's hope the team picks up the idea soon:
http://issues.ez.no/IssueView.php?Id=12860&activeItem=3