<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ryba's eZ developer's blog</title><link></link><description>Blog on eZ stuff...</description><language>en-US</language><item><pubDate>Tue, 24 Jun 2008 09:44:39 GMT</pubDate><title>SELF OverLib - eZ Publish JavaScript overLIB library integration</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/self_overlib_ez_publish_javascript_overlib_library_integration</link><description>
&lt;p&gt;
This extension integrates a popular OverLib JavaScript library with eZ Publish. Beside providing a simple template operator for automated generation of OverLib instances, it introduces a fallback configuration architecture for even easier and flexible use. It is possible to use pre-configurable presets, ad-hoc configurated calls as well as any combination of the two approaches. 
&lt;/p&gt;
&lt;h5&gt;Description&lt;/h5&gt;
&lt;p&gt;

For each OverLib instance, a JavaScript code must be generated within HTML document that requires a number of paramter variables to be passed. Those variables control what text/content will be displayed, how the window will behave, what it will look like, will it be sticky, and so on. There are several problems with literally defining this JavaScript code in the templates:&lt;br /&gt;
- It is not easy to deal with special characters and escape strings, especially in the eZ template language,&lt;br /&gt;
- Static JavaScript code is not flexible in case of any future changes, especially across big projects.&lt;br /&gt;
 &lt;br /&gt;
To cope with those problems, a simple template operator is introduced. The operator automatically deals with any special chars that could destroy JavaScript code. It is also configurable by means of presets. Any number of presets can be defined and each preset can define any combination of OverLib settings.&lt;br /&gt;
 &lt;br /&gt;
To ensure that overlib gets always generated properly and the JavaScript has every variable required, a setting fallback system is introduced. The following priority is used to determine the values of OverLib parameters:&lt;br /&gt;
1) Ad-hoc declarations (within the template itself, when using the operator),&lt;br /&gt;
2) Preset declarations (if a preset was declared and used)&lt;br /&gt;
3) Default system values.&lt;br /&gt;
Any combination and order of parameters can be used.&lt;br /&gt;
 &lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; Please read the selfoverlib.ini configuration file for further details.&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; Find out more about OverLib library at &lt;a href="http://www.bosrup.com/web/overlib/" title="http://www.bosrup.com/web/overlib/" target="_self"&gt;http://www.bosrup.com/web/overlib/&lt;/a&gt;&lt;br /&gt; 
&lt;/p&gt;
&lt;h5&gt; Examples&lt;/h5&gt;&lt;div class="code"&gt;

&lt;p&gt;

{* This is an adhoc declaration, it has no pre-configured settings, *}&lt;br /&gt;
 {* all the paramters that are not declared will have default OverLib values. *}&lt;br /&gt;
 {selfoverlib_display( &lt;br /&gt;
 hash( &lt;br /&gt;
 'content', 'THIS IS MY OVERLIB TEXT', &lt;br /&gt;
 'caption', 'THIS IS MY OVERLIB CAPTION', &lt;br /&gt;
 'html_value', 'THIS IS THE ANCHOR',&lt;br /&gt;
 'width', '225',&lt;br /&gt;
 ) &lt;br /&gt;
 )}&lt;br /&gt;
 {* This is a preset-based declaration. You do not have to define anything *}&lt;br /&gt;
 {* except for the preset and the content. *}&lt;br /&gt;
 {selfoverlib_display(&lt;br /&gt;
 hash( &lt;br /&gt;
 'preset', 'admindefault', &lt;br /&gt;
 'caption', 'Help: how to use it?', &lt;br /&gt;
 'content', 'It order to use this functionality, you must...',&lt;br /&gt;
 )&lt;br /&gt; )}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
Read doc/readme.txt for further details. 
&lt;/p&gt;

&lt;p&gt;

This extension is available at:&lt;br /&gt;&lt;a href="http://ez.no/developer/contribs/template_plugins/self_overlib" title="SELF OverLib" target="_blank"&gt;http://ez.no/developer/contribs/template_plugins/self_overlib&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Tue, 24 Jun 2008 00:58:37 GMT</pubDate><title>Class-attribute-based button sets in new MCE Online Editor</title><link>http://ez.ryba.eu/index.php/ez_publish/lab/class_attribute_based_button_sets_in_new_mce_online_editor</link><description>
&lt;p&gt;
One of my primary postulates towards the new MCE Online Editor is that it supports different button sets, depending on explicit call &lt;b&gt;or&lt;/b&gt; preset settings. Actually, presets would stand a much better approach, so let's forget about template declaration for a while. I decided to find out how much work it would require to make the preset approach run.
&lt;/p&gt;
&lt;h5&gt;Ini structure modification&lt;/h5&gt;
&lt;p&gt;
First of all, we have to store the settings we will be using later on. Current button declaration in &lt;i&gt;ezoe.ini&lt;/i&gt; looks as follows:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

[EditorSettings]&lt;br /&gt;
Buttons[]&lt;br /&gt;
Buttons[]=formatselect&lt;br /&gt;
Buttons[]=bold&lt;br /&gt;
Buttons[]=italic&lt;br /&gt;
Buttons[]=underline&lt;br /&gt;...
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
We would need multi-dimentional array with multiple preset-like named blocks instead:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

[EditorSettings]&lt;br /&gt;
ButtonPresets[]&lt;br /&gt;
ButtonPresets[]=full&lt;br /&gt;
ButtonPresets[]=mini&lt;br /&gt;
#...&lt;br /&gt;
[ButtonPreset-full]&lt;br /&gt;
Buttons[]&lt;br /&gt;
Buttons[]=formatselect&lt;br /&gt;
Buttons[]=bold&lt;br /&gt;
Buttons[]=italic&lt;br /&gt;
Buttons[]=underline&lt;br /&gt;
Buttons[]=|&lt;br /&gt;
Buttons[]=bullist&lt;br /&gt;
Buttons[]=numlist&lt;br /&gt;
Buttons[]=indent&lt;br /&gt;
Buttons[]=outdent&lt;br /&gt;
Buttons[]=|&lt;br /&gt;
Buttons[]=undo&lt;br /&gt;
Buttons[]=redo&lt;br /&gt;
#...&lt;br /&gt;
[ButtonPreset-mini]&lt;br /&gt;
Buttons[]&lt;br /&gt;
Buttons[]=formatselect&lt;br /&gt;
Buttons[]=bold&lt;br /&gt;
Buttons[]=italic&lt;br /&gt;
Buttons[]=underline&lt;br /&gt;
Buttons[]=|&lt;br /&gt;
Buttons[]=bullist&lt;br /&gt;
Buttons[]=numlist&lt;br /&gt;
Buttons[]=indent&lt;br /&gt;Buttons[]=outdent
&lt;/p&gt;

&lt;/div&gt;
&lt;h5&gt;XMLBlock datatype modification&lt;/h5&gt;
&lt;p&gt;
Once we're done with our preset configuration, we have to make the XML Block datatype actually display and store the preset values. First of all, we need to modify the datatype itself (&lt;i&gt;kernel/classes/datatypes/ezxmltext/ezxmltexttype.php&lt;/i&gt;):
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

// Class constants declaration&lt;br /&gt;
const BUTTONS_FIELD = 'data_text2';&lt;br /&gt;
const BUTTONS_VARIABLE = '_ezxmltext_buttons_';&lt;br /&gt;
// Fetch and store post data - method modification&lt;br /&gt;
function &lt;b&gt;fetchClassAttributeHTTPInput&lt;/b&gt;( $http, $base, $classAttribute )&lt;br /&gt;
{&lt;br /&gt;
$column = $base . self::COLS_VARIABLE . $classAttribute-&gt;attribute( 'id' );&lt;br /&gt;
$buttons = $base . self::BUTTONS_VARIABLE . $classAttribute-&gt;attribute( 'id' );&lt;br /&gt;
if ( $http-&gt;hasPostVariable( $column ) )&lt;br /&gt;
{&lt;br /&gt;
$columnValue = $http-&gt;postVariable( $column );&lt;br /&gt;
$classAttribute-&gt;setAttribute( self::COLS_FIELD, $columnValue );&lt;br /&gt;
$buttonsValue = $http-&gt;postVariable( $buttons );&lt;br /&gt;
$classAttribute-&gt;setAttribute( self::BUTTONS_FIELD, $buttonsValue );&lt;br /&gt;
return true;&lt;br /&gt;
}&lt;br /&gt;
return false;&lt;br /&gt;}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
The example above is not complete, there are other methods to modify, like initialization or (un)serialization ones. This should be enough to run the test, though.
&lt;/p&gt;

&lt;p&gt;
We still have to modify the datatype templates. Again, we'll do the minimum: modify the datatype's class attribute template (design/standard/templates/class/datatype/edit/ezxmltext.tpl) by adding the following code:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

&lt;div class="block"&gt;&lt;br /&gt;
&lt;label&gt;{'Button preset'|i18n( 'design/standard/class/datatype' )}:&lt;/label&gt;&lt;br /&gt;
&lt;select name="ContentClass_ezxmltext_buttons_{$class_attribute.id}"&gt;&lt;br /&gt;
{def $preset_list=ezini( 'EditorSettings', 'ButtonPresets', 'ezoe.ini' )}&lt;br /&gt;
{foreach $preset_list as $preset}&lt;br /&gt;
&lt;option value="{$preset|wash()}"{if eq( $preset, $class_attribute.data_text2 )} selected="selected"{/if}&gt;{$preset|wash()}&lt;/option&gt;&lt;br /&gt;
{/foreach}&lt;br /&gt;
&lt;/select&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
Now, all pieces are in their place for the final cuts.
&lt;/p&gt;
&lt;h5&gt;MCE Online Editor modification&lt;/h5&gt;
&lt;p&gt;
First of all, we have to modify the method responsible for collecting the button settings from the configuration files. We locate the &lt;i&gt;eZOEXMLInput &lt;/i&gt;handler class and extend the proper method:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

 function getEditorButtonList()&lt;br /&gt;
 {&lt;br /&gt;
 if ( $this-&gt;editorButtonList === null )&lt;br /&gt;
 {&lt;br /&gt;
 $contentClassAttributeID = $this-&gt;ContentObjectAttribute-&gt;ContentClassAttributeID;&lt;br /&gt;
 $contentClassAttribute = eZContentClassAttribute::fetch( $contentClassAttributeID );&lt;br /&gt; $buttonPreset = $contentClassAttribute-&gt;DataText2;
&lt;/p&gt;

&lt;p&gt;

 $oeini = eZINI::instance( 'ezoe.ini' );&lt;br /&gt; $buttonPresets = $oeini-&gt;variable( 'EditorSettings', 'ButtonPresets' );
&lt;/p&gt;

&lt;p&gt;

 if( !in_array( $buttonPreset, $buttonPresets ) )&lt;br /&gt;
 {&lt;br /&gt;
 $buttonPreset = $buttonPresets[0];&lt;br /&gt;
 }&lt;br /&gt;
 $buttonList = $oeini-&gt;variable( 'ButtonPreset-' . $buttonPreset , 'Buttons' );&lt;br /&gt; 
&lt;/p&gt;

&lt;p&gt;

 $contentini = eZINI::instance( 'content.ini' );&lt;br /&gt;
 $tags = $contentini-&gt;variable('CustomTagSettings', 'AvailableCustomTags' );&lt;br /&gt;
 $hideButtons = array();&lt;br /&gt; $showButtons = array();
&lt;/p&gt;

&lt;p&gt;

 // filter out underline if custom underline tag is not enabled&lt;br /&gt;
 if ( !in_array('underline', $tags ) )&lt;br /&gt; $hideButtons[] = 'underline';
&lt;/p&gt;

&lt;p&gt;

 // filter out pagebreak if custom pagebreak tag is not enabled&lt;br /&gt;
 if ( !in_array('pagebreak', $tags ) )&lt;br /&gt; $hideButtons[] = 'pagebreak';
&lt;/p&gt;

&lt;p&gt;

 // filter out relations buttons if user dosn't have access to relations&lt;br /&gt;
 if ( !eZOEXMLInput::currentUserHasAccess( 'relations' ) )&lt;br /&gt;
 {&lt;br /&gt;
 $hideButtons[] = 'image';&lt;br /&gt;
 $hideButtons[] = 'objects';&lt;br /&gt;
 }&lt;br /&gt;
 foreach( $buttonList as $button )&lt;br /&gt;
 {&lt;br /&gt;
 if ( !in_array( $button, $hideButtons ) )&lt;br /&gt;
 $showButtons[] = $button;&lt;br /&gt;
 }&lt;br /&gt;
 $this-&gt;editorButtonList = $showButtons;&lt;br /&gt;
 }&lt;br /&gt;
 return $this-&gt;editorButtonList;&lt;br /&gt; }
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
All this modification does is choose a proper button preset instead of a general one. It could be more warning-secured, this is the minimum.
&lt;/p&gt;

&lt;p&gt;
This seems to be all, but it is not. The main MCE init template uses run-once operator to make sure that OE init is only run once. This is going to be a problem since OE button configuration is part of the init. We have to remove the run-once operator and allow multiple initializations. Now, I'm not sure at the moment if this is JavaScript-safe, but seems to work fine at first glance. Edit &lt;i&gt;ezxmltext_ezoe.tpl&lt;/i&gt; template file and comment out run-once operators:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

{*run-once*}&lt;br /&gt;
...&lt;br /&gt;{*/run-once*}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
This should be it.
&lt;/p&gt;
&lt;h5&gt;Summary&lt;/h5&gt;
&lt;p&gt;
As this example shows, a number of kernel-located files have to be modified in order to achieve this functionality. This takes just a couple of minutes once you know what you're doing, but kernel modification won't likely be accepted for premium support, for example. This is why I really hope this modification makes it to the eZ Publish 4.1.0 release, with some 4.0.x backward compatibility mode.
&lt;/p&gt;

&lt;p&gt;
Also, note that this is hardly a substitute for server-side validation of what user is allowed to do within the OE (which ideally should automatically control what a user can do and I hope for that in eZ 4.2+), but stands a great transitional presentation-layer functionality that can be backed up with proper access control. Many projects will suffer if this is not in place...
&lt;/p&gt;
</description></item><item><pubDate>Wed, 28 May 2008 17:41:35 GMT</pubDate><title>Blue screen of death </title><link>http://ez.ryba.eu/index.php/ez_publish/blue_screen_of_death_ez_publish</link><description>
&lt;p&gt;
Does eZ Publish have its own &lt;a href="http://en.wikipedia.org/wiki/Blue_Screen_of_Death" title="blue screen of death" target="_blank"&gt;blue screen of death&lt;/a&gt;? Yes, it does! It is the setup wizard on a production site. And how do you make go off? Well, it's quite enough to have anything about site.ini global override messed up: transmission error, solid syntax error, etc... Over thirty eZ installations and deployments, I was calm enough to figure it out just in seconds, but it still made me sweat... And imagine a beginner... ;)
&lt;/p&gt;
</description></item><item><pubDate>Thu, 22 May 2008 08:10:07 GMT</pubDate><title>Themes for eZ Publish - discussion</title><link>http://ez.ryba.eu/index.php/ez_publish/random_thoughts/themes_for_ez_publish_discussion</link><description>
&lt;p&gt;
An interesting topic emerged among suggestions in the ez.no forum, regarding themes for eZ Publish. I thought it was an interesting theme, so here's the link: &lt;a href="http://ez.no/developer/forum/suggestions/provide_new_themes" title="Provide new themes for eZ Publish discussion" target="_blank"&gt;http://ez.no/developer/forum/suggestions/provide_new_themes&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
And here's what I think:
&lt;/p&gt;

&lt;p&gt;

I have to agree that easier theme management and exchange would help to widespread eZ Publish. Personalization seems like the big thing right now and even if it's not about that, ability to implement selected themes easily might be one of the key factors when deciding on a particular CMS.&lt;br /&gt;
 &lt;br /&gt;
 However, we need to realize what theme engines we're talking about when trying to incorporate that idea into eZ Publish. Most themes that I know of are prepared for systems that have a very isolated and precise functionality due to the kind of system they are (CMS blogs, forums, shops, web galleries, CRMs, or CMSs with preexisting module sets, etc..), and whose content model, internal structure etc. do not change.&lt;br /&gt;
 &lt;br /&gt;
 Meanwhile, with eZ Publish we have a content engine that makes it possible to handle most of the above functionalities and nearly everything can be customized. With the system we don't have preset roles for a forum, for a blog etc - we have to arrange that ourselves, minding all the implementation details. There's entire list of other dimensions that have to be taken under consideration (sections, access rules, caching, custom overrides, class modifications, structure...). Many of those things are handled or reach to the presentation layer (*.tpl), many of them in a customized way, again.&lt;br /&gt;
 &lt;br /&gt;
 If some of the themes available for those other, isolated systems, have to be versioned along with the core (for example: theme for version 2.0, theme for version 2.1, etc..), how do we want to handle the change with eZ Publish and its complexity? Would that be possible without limiting of what's one of eZ's key features - extensibility? Wouldn't that concrete the development of the core in some ways?&lt;br /&gt;
 &lt;br /&gt; If I look at ezwebin, I see an intelligent GUI, not a skin. This interface is crucial for developers to ease the learning curve and also pick up some good practices, but with around 40 eZ Publish implementations, we haven't yet had a customer who would fit into ezwebin precisely (or sometimes - at all).
&lt;/p&gt;
&lt;h5&gt; Yet, another perspective.&lt;/h5&gt;
&lt;p&gt;
 Much as I appreciate the marketing goals, I don't think they are that important for this level of CMS (and ezwebin versions do just fine for that matter), and nowhere near as important as the core of the system. And there's only so much time eZ people have. I believe we're all much better off getting solutions such as eZ toolbar or eZ Flow (or bug-free stability and security) rather than color variations of backgrounds...
&lt;/p&gt;

&lt;p&gt;

To be continued... here:&lt;br /&gt;&lt;a href="http://ez.no/developer/forum/suggestions/provide_new_themes" title="Provide new themes for eZ Publish discussion" target="_blank"&gt;http://ez.no/developer/forum/suggestions/provide_new_themes&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Wed, 21 May 2008 16:50:38 GMT</pubDate><title>Persistent variables - checked out</title><link>http://ez.ryba.eu/index.php/ez_publish/lab/persistent_variables_checked_out</link><description>
&lt;p&gt;
Well, I gave up my variable caching ideas, even if just for a while. I wanted to master the standard caching techniques (there had always been an excuse, some extension to write...). And I am very glad now because it starts to feel like having real control over my eZ implementations ;)
&lt;/p&gt;

&lt;p&gt;
Among things that I've discovered were persistent variables, recommended by Gaetano in response to my var cache struggling, and completely unknown to me before. Even if not a complete substitute, still a very nice solution, one of those that you ask yourself how you could have lived without...
&lt;/p&gt;

&lt;p&gt;
So what's so great about persistent variables without going into much detail?
&lt;/p&gt;
&lt;h5&gt;Control&lt;/h5&gt;
&lt;p&gt;
They don't require any additional control. Persistent variables are compiled as part of viewcache, which means that they only expire when the viewcache expires, and they naturally follow the smart viewcache clear rules as well. What more control needed than that?
&lt;/p&gt;
&lt;h5&gt;Availability&lt;/h5&gt;
&lt;p&gt;
They seem to be available at all times, if not cached before, calculated upon request for the full view that stores them.
&lt;/p&gt;

&lt;p&gt;
This also means that expiry times of cache-blocks that depend on that data do not have to be synchronized in any way (not that it is even possible...). Gaetano mentioned the relationship between viewcache and cache-block clear being an important issue, but I haven't been able to spot any unwanted or problematic link, yet.
&lt;/p&gt;
&lt;h5&gt;Cost&lt;/h5&gt;
&lt;p&gt;
Persistent variables can indeed store a variety of data useful for further generating parts of the pagelayout. Even if the singular cost of viewcache generation goes slightly up, this is usually benefitial: once generated, the variables are simply there as long as needed. And in most cases all I need is some $node-related operations.
&lt;/p&gt;

&lt;p&gt;
Even if some more expensive data is to be fetched, once you're through the effort of composing you persistent hash, it's there!
&lt;/p&gt;
&lt;h5&gt;Some minor disadvantages.&lt;/h5&gt;
&lt;p&gt;
Since the variables are physically serialized, it is impossible to pass complex objects, such as $node directly. You have to precisely choose which simple data you want (numbers, strings, arrays, hashes...). Luckily, arrays do just fine in most cases, so that's probably as much as one may need before going straight to a fetch outside of a full view.
&lt;/p&gt;

&lt;p&gt;
Then, some includes seem to be able to damage a persistent var that had been generated few lines before, so you have to carefully test if the persistent var set is available in all the full views required. Haven't found an exact rule, yet.
&lt;/p&gt;

&lt;p&gt;
If you're interested if a very nice use example, look &lt;a href="/index.php/ez_publish/lab/variable_cache_layer_var_block_wouldn_t_that_be_something" title="Post on variable cache" target="_self"&gt;here&lt;/a&gt; in the comments.
&lt;/p&gt;
</description></item><item><pubDate>Wed, 21 May 2008 16:36:05 GMT</pubDate><title>Upcomming Summer 2008 eZ </title><link>http://ez.ryba.eu/index.php/events/upcomming_summer_2008_ez_php_developer_events</link><description>
&lt;p&gt;
A busy week expected in the fourth week of June this year:
&lt;/p&gt;
&lt;h5&gt;eZ Publish Community Developer Day, June 18th, 2008&lt;/h5&gt;
&lt;p&gt;
Tutorials, &lt;b&gt; &lt;/b&gt;break-out sessions, talks and presentations, barcamp... some topics announced till now include: performance and testing, improving usability &amp; accessibility in eZ publish, web 2.0, OpenID, integration between ez publish and Ajax frameworks, Open office integration, eZ Components, eZ Find, TinyERP integration, microformats...
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://ez.no/developer/news/ez_publish_community_developer_day_june_18th_2008" title="eZ Publish Community Developer Day, June 18th 2008" target="_blank"&gt;http://ez.no/developer/news/ez_publish_community_developer_day_june_18th_2008&lt;/a&gt;
&lt;/p&gt;
&lt;h5&gt;eZ Conference &amp; Awards, June 19-20th, 2008&lt;/h5&gt;
&lt;p&gt;
The annual eZ Conference &amp; Awards is the largest Open Source CMS event in Europe. This year marks the 6th annual eZ Conference and new this year is that it will be run together with the Open Nordic Conference and the Open Nordic Mobile event. This is without doubt, the biggest event ever held in Europe with main focus on Free Software.
&lt;/p&gt;

&lt;p&gt;
All together more than 1000 people are expected to join during these days. The program will include keynote sessions, panel discussions and valuable exhibiting.
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://conference.ez.no/" title="eZ Conference &amp; Awards, June 19-20th, 2008" target="_blank"&gt;http://conference.ez.no/&lt;/a&gt;
&lt;/p&gt;
&lt;h5&gt;PHP Vikinger, June 21st, 2008&lt;/h5&gt;
&lt;p&gt;
PHP Vikinger is an unconference directed towards everyone who wants to learn more about PHP and likes to discuss and meet with new people. Unlike normal conferences, the talks at conferences are determined by the attendees, and not a program committee.
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://phpvikinger.org/" title="PHP Vikinger, June 21st, 2008" target="_blank"&gt;http://phpvikinger.org/&lt;/a&gt;
&lt;/p&gt;
&lt;h5&gt;Can't wait!&lt;/h5&gt;
&lt;p&gt;

This year will be my first time to join eZ Community during this series of events.&lt;br /&gt; 
&lt;/p&gt;
</description></item><item><pubDate>Sat, 10 May 2008 12:18:34 GMT</pubDate><title>User-readable cache-block identifiers</title><link>http://ez.ryba.eu/index.php/ez_publish/random_thoughts/user_readable_cache_block_identifiers</link><description>
&lt;p&gt;
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.
&lt;/p&gt;

&lt;p&gt;
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 ;)
&lt;/p&gt;
</description></item><item><pubDate>Tue, 22 Apr 2008 17:49:57 GMT</pubDate><title>Variable cache layer... Var-block - wouldn't that be something?</title><link>http://ez.ryba.eu/index.php/ez_publish/lab/variable_cache_layer_var_block_wouldn_t_that_be_something</link><description>
&lt;p&gt;
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:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

{def $my_var=345}&lt;br /&gt;{def $my_other_var=hash( 'a', '4023' )}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
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.
&lt;/p&gt;
&lt;h5&gt;Problem&lt;/h5&gt;
&lt;p&gt;
The 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:
&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;Whenever you crave for variables that will be used by several cache-blocks in the pagelayout, they must be placed outside of cache-blocks themselves. &lt;b&gt;Don't get fooled&lt;/b&gt; by the top cache-block apparently holding the variables used further on - it's a coincidence. This may only work if all expiry times are equal for all the blocks &lt;b&gt;and&lt;/b&gt; no subtree expiry is ever used (or you've used bugged eZ 4.0.0 for half-a-year, where subtree expiry is simply broken and it's easy to take it as the default behavior), provided that the blocks never got desynchronized. &lt;b&gt;The point is: variables must be kept outside cache-blocks and they will not be cached.&lt;/b&gt;&lt;/li&gt;

&lt;li&gt;The module result gets generated before the pagelayout, so there's little reusability between their vars.&lt;/li&gt;

&lt;/ol&gt;
&lt;h5&gt;So what's missing?&lt;/h5&gt;
&lt;p&gt;
My idea is &lt;b&gt;a cache layer halfway between logic/data and the presentation layer&lt;/b&gt;. It could be a variable-dedicated cache-block equivalent (maybe a var-block?). 
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Example:&lt;/b&gt; 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...
&lt;/p&gt;

&lt;p&gt;
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.
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Please let me know what you think.&lt;/b&gt;
&lt;/p&gt;

&lt;p&gt;

Here's the prototype:&lt;br /&gt;&lt;a href="http://ez.no/developer/contribs/template_plugins/self_var_cache" title="SELF Var Cache" target="_blank"&gt;http://ez.no/developer/contribs/template_plugins/self_var_cache&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Tue, 22 Apr 2008 13:13:58 GMT</pubDate><title>Extendable cache definition list for easy extension cache management</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/extendable_cache_definition_list_for_easy_extension_cache_management</link><description>
&lt;p&gt;
Back after a longer while... wasn't on holiday, though ;)
&lt;/p&gt;

&lt;p&gt;
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 ;)
&lt;/p&gt;

&lt;p&gt;

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:&lt;br /&gt;&lt;a href="http://issues.ez.no/IssueView.php?Id=12860&amp;activeItem=3" title="Extendable cache definition list for easy extension cache management" target="_blank"&gt;http://issues.ez.no/IssueView.php?Id=12860&amp;activeItem=3&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Thu, 17 Apr 2008 05:17:30 GMT</pubDate><title>eZ Developer Day - first one in Poland (Warsaw, 15th April 2008)</title><link>http://ez.ryba.eu/index.php/events/ez_developer_day_first_one_in_poland_warsaw_15th_april_2008</link><description>
&lt;p&gt;
Polish eZ community has met during the first official eZ Developer Day held in the country. Up to thirty people showed up, representing eZ partners, independent developers as well as users, both experienced and potential. Many of the participants were active &lt;a href="http://ez-publish.pl/" title="Polish eZ Community" target="_blank"&gt;Polish eZ Community&lt;/a&gt; members. eZ Systems was represented by Bård Farstad, co-funder and CTO (Chief Technical Officer) and our native system developer Łukasz Serwatka.
&lt;/p&gt;

&lt;p&gt;
The meeting, which was held in the heart of capital city of Poland, included the introduction to eZ Systems and their flag products, including eZ Flow (both functional and technical demos), the discussion on eZ Publish roadmap and its future releases.
&lt;/p&gt;

&lt;p&gt;
The community had a chance to present their recent implementations as well as share and discuss their problems or requests (I hope we didn't kill Łukasz during this part, as we tried to clear up issues that had been awaiting "closure" for quite some time).
&lt;/p&gt;

&lt;p&gt;
Bård attempted to provoke some community commitment, so that it grows stronger and bigger, but I'm not sure how much response that would get. It got little while there, but there might be some follow-up. Seems like the active will remain active in their ways anyways.
&lt;/p&gt;

&lt;p&gt;
Personally, I am very glad that we had this meeting. Maybe there was too little technical/developer detail, but everyone had an opportunity to bring things up... Maybe it lacked some social part, during which the community would get to know each other little better and discuss things in a more informal, open way. One suggestion though: make that a weekend event because socializing for most people in Poland hardly ever works during the weekdays! ;)
&lt;/p&gt;
</description></item><item><pubDate>Sun, 24 Feb 2008 18:49:57 GMT</pubDate><title>Installing eZ Publish 4.0 on home.pl servers</title><link>http://ez.ryba.eu/index.php/ez_publish/hosting/installing_ez_publish_4_0_on_home_pl_servers</link><description>
&lt;p&gt;
&lt;b&gt;Home.pl &lt;/b&gt;is Poland's largest hosting provider. Despite the fact that they do not have eZ Publish-dedicated services and their machines do not exactly match its standard requirements (FreeBSD, PHP in CGI mode), it is possible to successfully deploy eZ 4.0 installation in their shared hosting environment. Since many people seem to have problems getting through the installation wizard, here's some tips.
&lt;/p&gt;
&lt;h5&gt;Organization&lt;/h5&gt;
&lt;p&gt;
Put the files in a subdirectory and use the &lt;b&gt;subserver functionality&lt;/b&gt; (in other words: point the domain to that subdirectory). This is not only because of some possible namespace conflicts (0:/bin is reserved by the system), but also for good organization and easy management. Since a subserver cannot reach above its own root, &lt;b&gt;remember &lt;/b&gt;to create a /tmp dir for any temporary files.
&lt;/p&gt;
&lt;h5&gt;Wizard problems&lt;/h5&gt;
&lt;p&gt;
If you try to install version 4.0 from scratch, you may encounter some early problems. This is due to the fact that some systems functions are called during setup tests that cannot handle an error in this environment (which is FreeBSD-like by the way). You can easily cope with that by simply commenting out a line in /kernel/setup/ezsetuptests.php:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;
$ginfo = posix_getgrgid( posix_getgid() ); // around line 593
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
This is practically never used again, so don't worry, you may revert the changes after installation, or even leave it like that.
&lt;/p&gt;
&lt;h5&gt;Limitations&lt;/h5&gt;
&lt;p&gt;
For a number of reasons, this hosting will only serve a number of use scenarios. The major problem is a script-like CRON, which works on PHP rights, which means it has the same limitations. It will be impossible to safely run large, exhausting notifications or maintenance scripts... Lack of CLI makes it even harder, and can only be partially compensated by enabled system() PHP function. Still, with a little practice it is possible to tame it, especially with servers' above-average efficiency.
&lt;/p&gt;
</description></item><item><pubDate>Tue, 19 Feb 2008 20:14:10 GMT</pubDate><title>Brainstorm: *.ini priority vs. extension settings</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/brainstorm_ini_priority_vs_extension_settings</link><description>
&lt;p&gt;

Just looking at the priority that the settings files follow:&lt;br /&gt;
 &lt;br /&gt;
Gunnstein wrote at &lt;a href="http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/configuration/site_management" title="Site management" target="_blank"&gt;http://ez.no/doc/ez_pub...site_management&lt;/a&gt;&lt;br /&gt; 
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

1. Default configuration settings (/settings/*.ini)&lt;br /&gt;
2. Active extension siteaccesses (/extension/*/settings/siteaccess/[name_of_siteaccess]/*.ini.append.php)&lt;br /&gt;
3. Siteaccesses (/settings/siteaccess/[name_of_siteaccess]/*.ini.append.php)&lt;br /&gt;
4. Active extensions (/extension/*/settings/*.ini.append.php)&lt;br /&gt;5. Global overrides (/settings/override/*.ini.append.php) 
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;

 &lt;br /&gt;It seems like the main/siteaccess/override model for settings files and its advantages weren't introduced to extensions' engine. Here's some issues I see:
&lt;/p&gt;

&lt;p&gt;
1) Let's call it &lt;b&gt;convenience and flexibility&lt;/b&gt;: One great feature of the three-step system (and - as far as I understand - one of its key functions) is that we have untouched original *.ini files with all/default settings present, the rest are siteaccess-dedicated or global overrides. This is a great in case of any upgrades, modifications, or simply for reference. I don't see this possibility for extension settings (unless we move the overrides of custom *ini files to the global overrides, but that isn't that convenient we have 10 or 20 extensions...).
&lt;/p&gt;

&lt;p&gt;
2) &lt;b&gt;Security&lt;/b&gt;: This actually results from the above. If there is no general override, all your general custom settings will most probably be kept in the main *.ini file. That may include project-dedicated values, passwords, options, etc. The file should then always be called *.ini.append.php, which is easy to forget about.
&lt;/p&gt;

&lt;p&gt;
3) &lt;b&gt;Rules&lt;/b&gt;: While with the general settings siteaccesses overrule general files and global overrides overrule all of them, the rules seem less clear with extension settings... that includes both the priorities and the names (look at the security point).
&lt;/p&gt;

&lt;p&gt;
Here's what it could look like (just a quick idea):
&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;Default settings [/settings/*.ini]&lt;/li&gt;

&lt;li&gt;Default extension settings [/extension/EXT/settings/*.ini] &lt;i&gt;(only for custom *.ini files)&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;Extension siteaccesses [/extension/EXT/settings/siteaccess/SITEACCESS/*.ini.append.php]&lt;/li&gt;

&lt;li&gt;Siteaccesses [/settings/siteaccess/SITEACCESS/*.ini.append.php]&lt;/li&gt;

&lt;li&gt;Extension overrides [/extension/EXT/settings/override/*.ini.append.php] &lt;i&gt;(for custom *.ini files as well as other *.ini files)&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;Global overrides [/settings/override/*.ini.append.php]&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;
Of course, that would require little changes to directory structure, might be difficult.
&lt;/p&gt;

&lt;p&gt;

I put this on the forum, haven't given this as much thought as I would like to, so... let's see what happens ;)&lt;br /&gt;&lt;a href="http://ez.no/developer/forum/suggestions/ini_priority_vs_extension_settings" title="Brainstorm: *.ini priority vs. extension settings" target="_blank"&gt;http://ez.no/developer/forum/suggestions/ini_priority_vs_extension_settings&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Sun, 17 Feb 2008 05:23:55 GMT</pubDate><title>Re: Is eZ Publish 4.0 like Microsoft Vista?</title><link>http://ez.ryba.eu/index.php/ez_publish/random_thoughts/re_is_ez_publish_4_0_like_microsoft_vista</link><description>
&lt;p&gt;
&lt;i&gt;Inspired by Bruce Morrison's post in his blog: &lt;/i&gt;&lt;a href="http://suffandnonsense.blogspot.com/2008/02/is-ez-publish-40-like-microsoft-vista.html" title="Is eZ Publish 4.0 like Microsoft Vista?" target="_blank"&gt;&lt;i&gt;http://suffandnonsense.blogspot.com/2008/02/is...&lt;/i&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h5&gt;eZ Publish 4.0&lt;/h5&gt;
&lt;p&gt;
I kind of understand the disappointment with minor revolution of the current big version 4.0, although I had known (more or less) what to expect when I was awaiting it few months back. You can ask yourself: was PHP5 more of &lt;b&gt;an improvement, or maybe a necessity&lt;/b&gt;? If the latter, the smaller was the step ahead, indeed. Nevertheless, &lt;b&gt;I am very glad this step was made&lt;/b&gt;, no matter what the version is called, for reasons that must be obvious. Back to the expectations, I can only imagine how 3.x introduction was different (greater) to 4.x, because I've only known eZ Publish since 3.8.x or so (BTW: have to admit I gave up after several attempts with 3.5... it beat me!).
&lt;/p&gt;
&lt;h5&gt;eZ Publish 4.0 maintenance mode, 5.0 eZ Components-based rebuild&lt;/h5&gt;
&lt;p&gt;
Bruce's suggestion is to put eZ Publish 4.0 at its rather stable state into feature freeze mode, while concentrating efforts on taking full advantage of the maturing &lt;a href="http://ezcomponents.org" title="eZ Components" target="_blank"&gt;eZ Components&lt;/a&gt; to produce the next big version (5.0) from scratch. I have to say that I like this idea for similar reasons: 
&lt;/p&gt;

&lt;ul&gt;

&lt;li&gt;There's always a risk of ending up with Vista-like model,&lt;/li&gt;

&lt;li&gt;It will probably take equally long (or even longer) to incorporate majority of eZ Components into eZ Publish (with compromises possible/necessary on the way), than it would have taken to build a completely fresh thing,&lt;/li&gt;

&lt;li&gt;Past limitations and problems will probably become even more concreted,&lt;/li&gt;

&lt;li&gt;I believe that eZ Components with all their features would prolong the application's lifespan, secure its potential and make future port to PHP6 easier (I'm not sure if another platform "rewriting" would be a good idea).&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;
There's another thing, but it deserves to be covered in its own paragraph.
&lt;/p&gt;
&lt;h5&gt;Solid content model vs. feature richness&lt;/h5&gt;
&lt;p&gt;
In my comparatively short experience with eZ Publish, I have already dug deep enough to see its few weaknesses, especially regarding the content and storage models. Don't get me wrong, by no means would I call eZ Publish weak, it's just that it has its limitations defined and there are only so many things you can do with it without hacking or severely extending.
&lt;/p&gt;

&lt;p&gt;
Now, I do understand how big part various "rich" features play in the eZ business model and in those of many eZ partners. For example, extensions such as &lt;a href="http://ez.no/ezflow" title="eZ Flow" target="_blank"&gt;eZ Flow&lt;/a&gt; or Web interfaces that make it possible to have an advanced out-of-the-box product with time required for implementation significantly reduced. Having seen how business-oriented eZ people are, I do not expect this direction to be given up at any stage (and I like that).
&lt;/p&gt;

&lt;p&gt;
However, I hope that that direction &lt;b&gt;does not prevent from improving the application&lt;/b&gt; at its core, that is the foundation for all eZ business after all. Unlike presentation layer or even more advanced extensions, which can be developed independently, core upgrades would be rather difficult to be introduced by means of hacking the kernel. I'd like to be optimistic, but don't see &lt;a href="http://ez.no/developer/forum/suggestions/integrity_flag_element_in_the_class_definition#msg157819" title="Alternative storage models" target="_blank"&gt;alternative storage models&lt;/a&gt; or &lt;a href="http://ez.no/developer/forum/suggestions/integrity_flag_element_in_the_class_definition#msg157819" title="Advanced class features" target="_blank"&gt;advanced class features&lt;/a&gt; coming any time soon. New rebuild could be an ideal opportunity to make eZ Publish even more versatile and fit to solve even more advanced content management tasks (and not only!).
&lt;/p&gt;
&lt;h5&gt;Summing up&lt;/h5&gt;
&lt;p&gt;
It doesn't seem like this issue is up for a discussion, but I haven't heard anything official on eZ Publish 5.0, yet. So, maybe it is not too late ;)
&lt;/p&gt;

&lt;p&gt;
If you ask me, I think I could live in this 4.0 feature freeze mode... if what I was waiting for was a completely new eZ Publish 5.0 in a year or two, with even greater core features and as few compromises as possible.
&lt;/p&gt;
</description></item><item><pubDate>Sun, 10 Feb 2008 19:02:55 GMT</pubDate><title>"Require flag" on the object attribute level</title><link>http://ez.ryba.eu/index.php/ez_publish/lab/require_flag_on_the_object_attribute_level</link><description>
&lt;p&gt;

Lately we've been having this discussion with André about different suggestions regarding ways to improve eZ content model:&lt;br /&gt;&lt;a href="http://ez.no/developer/forum/suggestions/integrity_flag_element_in_the_class_definition" title="eZ Publish require the attribute flag" target="_blank"&gt;http://ez.no/developer/forum/suggestions/in...&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
It was started by my own suggestion to introduce an additional flag that would sort of require objects attributes to be present (or, in other words, impossible to remove from the presentation/XHTML layer). And that actually resulted from my early eZ days questions on how does eZ Publish actually deal with missing attributes...
&lt;/p&gt;
&lt;h5&gt;Back to the additional "require attribute flag"&lt;/h5&gt;
&lt;ol&gt;

&lt;li&gt;&lt;i&gt;"Required" flag, that we have today, suggests by semantics that the attribute is required, however, that is not so. I hope I was the only user not to go in depth with this issue, however I expect otherwise. Today's "required" should in my opinion be called "Value required" or "Require value", because that's what the checked flag actually causes.&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;&lt;i&gt;Why isn't the default behavior of attribute validation such that all attributes are required to be present?&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;&lt;i&gt;Doesn't lack of all/any of the solution ideas mentioned above (or other) make the editing process vulnerable to any manipulation of the presentation layer? Isn't that comparatively easy to simply omit all uncomfortable attributes, for example datatype-based CAPTCHA, limits, identifiers, etc.?&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;&lt;i&gt;"Require all required" as a class attribute/flag actually doesn't make much sense with current "Required" meaning. What would it mean? Require all required values? This is why I suggest that there should be a separation of "required flags". We could leave today's required as "Require value" flag, as I suggested above. Then, there should be an additional flag that would decide whether the attribute itself is required to be present in the editing process. This would be much more flexible than earlier "require all required" and at the same time seems to make that idea useless.&lt;/i&gt;&lt;/li&gt;

&lt;/ol&gt;
&lt;h5&gt;Discovery&lt;/h5&gt;
&lt;p&gt;
Well, I finally found some time to look at it again, especially into the eZ Publish kernel. I followed the path that an attribute takes from the &lt;b&gt;edit view&lt;/b&gt; all the way to the &lt;b&gt;datatype itself&lt;/b&gt;. Actually, I found out that no matter what you do, no matter how you manipulate the presentation layer,&lt;b&gt; the attributes of a content class always reach input validation function in their datatype&lt;/b&gt;. So it is up to the given datatype to take further steps, but it's already a good news: &lt;b&gt;it is possible to force attributes without any kernel/lib modifications&lt;/b&gt;! Here's an example (ezstring datatype):
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )&lt;br /&gt;
{&lt;br /&gt;
 if ( $http-&gt;hasPostVariable( $base . '_ezstring_data_text_' . $contentObjectAttribute-&gt;attribute( 'id' ) ) )&lt;br /&gt;
 {&lt;br /&gt;
 // THE REST OF THE CODE&lt;br /&gt;
 }&lt;br /&gt;
 $contentObjectAttribute-&gt;setValidationError( ezi18n( 'kernel/classes/datatypes', 'Attribute missing in the presentation layer!' ) );&lt;br /&gt;
 return eZInputValidator::STATE_INVALID;&lt;br /&gt;}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
A quick update on my four points above: I still believe the new flag would be a useful solution. I still believe there's space for both "required flags". I'm still not sure why checking an attributes presence is not default behavior in most (or all) out-of-the-box datatypes. But at least now I have it under control! ;)
&lt;/p&gt;

&lt;p&gt;
And here's how the new flag could work:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )&lt;br /&gt;
{&lt;br /&gt;
 if ( $http-&gt;hasPostVariable( $base . '_ezstring_data_text_' . $contentObjectAttribute-&gt;attribute( 'id' ) ) )&lt;br /&gt;
 {&lt;br /&gt;
 // THE REST OF THE CODE &lt;br /&gt;
 // Including use of: $contentObjectAttribute-&gt;validateIsRequired()... &lt;br /&gt;
 }&lt;br /&gt;
 elseif( $contentObjectAttribute-&gt;attributeIsRequired() )&lt;br /&gt;
 {&lt;br /&gt;
 $contentObjectAttribute-&gt;setValidationError( ezi18n( 'kernel/classes/datatypes', 'Attribute missing in the presentation layer!' ) );&lt;br /&gt;
 return eZInputValidator::STATE_INVALID;&lt;br /&gt;
 }&lt;br /&gt;}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
What do you think?
&lt;/p&gt;
</description></item><item><pubDate>Wed, 06 Feb 2008 22:32:47 GMT</pubDate><title>eZ My Collected Info - manage your objects' collections</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/ez_my_collected_info_manage_your_objects_collections</link><description>
&lt;p&gt;
&lt;b&gt;eZ My Collected Info&lt;/b&gt; extension gives front-end access to one's collected info. The ownership of the collections is determined based on the ownership of the content object that collected the information. In other words, it is &lt;b&gt;not who sent the information&lt;/b&gt;, but &lt;b&gt;whose object it was sent to&lt;/b&gt;, that is considered the owner, and thus can browse/read, and optionally delete.
&lt;/p&gt;

&lt;p&gt;

The extension makes it possible to browse though the collections by class and then by object (a tree-like menu is provided for easy access). A &lt;b&gt;detailed class-level configuration&lt;/b&gt; is possible to allow/disallow collection deletion, custom identifiers, and custom/default templates.&lt;br /&gt;
 &lt;br /&gt;
 The extension comes with two module views and two access functions for a flexible management. The standard browsing view can be accessed through: &lt;i&gt;/index.php/siteaccess/mycollectedinfo/browse&lt;/i&gt;&lt;br /&gt;
 &lt;br /&gt; Read the &lt;i&gt;settings/mycollectedinfo.ini&lt;/i&gt; file's comments for more information.
&lt;/p&gt;

&lt;p&gt;
You can download the extension from: &lt;a href="http://ez.no/developer/contribs/hacks/ez_my_collected_info" title="eZ My Collected Info" target="_blank"&gt;http://ez.no/developer/contribs/hacks/ez_my_collected_info&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Thu, 31 Jan 2008 02:35:28 GMT</pubDate><title>Busy 2008...</title><link>http://ez.ryba.eu/index.php/miscellaneous/busy_2008</link><description>
&lt;p&gt;

Didn't get much time to write this month... Projects, international partner meeting, certification... Seems like 2008 is even more busy. Some big projects running, some more and bigger coming up, our little team is growing. It's good that February will at least be a bit longer this year ;)&lt;br /&gt; 
&lt;/p&gt;
</description></item><item><pubDate>Thu, 31 Jan 2008 02:28:28 GMT</pubDate><title>eZ User Create Limit</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/ez_user_create_limit</link><description>
&lt;p&gt;
Some time ago I started to develop a simple extension that would provide some sort of control over what users can do in terms of creating objects of given classes. This is mostly due to the fact that eZ Publish access control system only provides qualitative rules (and no quantitative ones).
&lt;/p&gt;

&lt;p&gt;
The extension introduces a datatype that doesn't validate if user is trying to go beyond one's defined limits, and couple of template operators that can help produce functional templates (for example hide a NewButton if it should not be visible in the first place).
&lt;/p&gt;

&lt;p&gt;
This is the first extension I wrote that actually extends into administration interface tabs and has it's administrative views. This way two levels of limit assignments were possible to introduce. First, a detailed configuration in the ini file for defining default limit values for particular classes or users. Second, advanced filtered operations on the actual limits. For example, it is possible to stop particular user from creating any more objects (for example comments) at any point in time, without affecting any other users or this particular user's other create capabilities.
&lt;/p&gt;

&lt;p&gt;

You can download it form:&lt;br /&gt;&lt;a href="http://ez.no/developer/contribs/datatypes/ez_user_create_limit" title="eZ User Create Limit" target="_blank"&gt;http://ez.no/developer/contribs/datatypes/ez_user_create_limit&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Wed, 23 Jan 2008 06:19:01 GMT</pubDate><title>Finally a certified eZ Publish developer...</title><link>http://ez.ryba.eu/index.php/miscellaneous/finally_a_certified_ez_publish_developer</link><description>
&lt;p&gt;
Back after a while of silence... lot's of projects, meetings, trips in the meantime...
&lt;/p&gt;

&lt;p&gt;
But I am happy to share the good news - &lt;b&gt;I have finally passed an eZ Publish developer certification&lt;/b&gt; with 80% correct answers (including a broken one!). Not that I have tried before, first take - first passed. Not as big challenge as I had expected, still requires proficiency in pretty much every single area that a developer should be aware of, so I was glad I had reviewed some general topics the day before ;) Few ambiguous or debatable questions, but I can't actually say if I've got them right or not - maybe they were not that ambiguous after all. Majority of questions - straightforward and clear.
&lt;/p&gt;

&lt;p&gt;
And &lt;b&gt;the&lt;/b&gt; link: &lt;a href="http://ez.no/certification/verify/222415" title="eZ Publish certified developer" target="_blank"&gt;http://ez.no/certification/verify/222415&lt;/a&gt;
&lt;/p&gt;
</description></item><item><pubDate>Sat, 29 Dec 2007 22:39:12 GMT</pubDate><title>Custom top level nodes - is that possible? Round I - exploration...</title><link>http://ez.ryba.eu/index.php/ez_publish/lab/custom_top_level_nodes_is_that_possible_round_i_exploration</link><description>
&lt;p&gt;
&lt;b&gt;A&lt;/b&gt;&lt;b&gt;re custom top level nodes possible&lt;/b&gt;? It is especially thrilling when one has encountered top level node problems ;) I forgot about this issue for quite some time, but now it's back. As I'm typing this post, I know that it won't provide an ultimate answer tonight, and some quick &lt;b&gt;NO&lt;/b&gt; answers are within reach. Still, I want to give it a try. &lt;b&gt;Round I&lt;/b&gt; - no particular goals, just exploration.
&lt;/p&gt;

&lt;p&gt;
I run a fresh installation of eZ Publish 4.0.0 with just English language, URL addressing. When ready, I manually clean all the cache, just in case.
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;So what top level nodes do we have?&lt;/b&gt; Out of five available, there are three that seem to have much in common (all deal with content in a similar fashion), and just one of them - the media tree root - has a two-digit node ID (&lt;b&gt;43&lt;/b&gt;) that will be easier to look for, than content's '2' ;)
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Let's look for some clues in the application.&lt;/b&gt; I start with &lt;b&gt;/settings&lt;/b&gt; directory as I know that it is where the top level nodes are actually declared. But just in case, I search through all the *.ini files. Only two files contain relevant 43 string: &lt;b&gt;menu.ini&lt;/b&gt; in this context is only used for navigation part and tab configuration, no key information there, so let's skip it for now; &lt;b&gt;content.ini&lt;/b&gt; contains the very declaration:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

[NodeSettings]&lt;br /&gt;
 # The node ID of the normal content tree&lt;br /&gt;
 RootNode=2&lt;br /&gt;
 # The node ID of the user tree&lt;br /&gt;
 UserRootNode=5&lt;br /&gt;
 # The node ID for the media tree&lt;br /&gt;
 MediaRootNode=43&lt;br /&gt;
 # The node ID for the setup tree&lt;br /&gt;
 SetupRootNode=48&lt;br /&gt;
 # The node ID for the design tree&lt;br /&gt; DesignRootNode=58
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
The above code &lt;b&gt;doesn't seem&lt;/b&gt; to suggest that extending top level was &lt;b&gt;ever planned&lt;/b&gt;, but let's move on.
&lt;/p&gt;

&lt;p&gt;
I log into the administration interface and create a folder called 'Custom', just under eZ Publish content tree root node. I memorize the new IDs: &lt;b&gt;59 as node ID&lt;/b&gt; and &lt;b&gt;57 as content object ID &lt;/b&gt;(the IDs you get may be different). I will need those as soon as I figure out what to destroy in the database ;) Basically, what I will try to do is to move this #59 node folder to the top level.
&lt;/p&gt;

&lt;p&gt;
Let's look for some clues in the database now. I run a database search for any&lt;b&gt; 43-like&lt;/b&gt; values in the entire table set (assuming that 43 will be the only way of referencing parts of the database that have something in common with the media root node). I get around 15 table hits, &lt;b&gt;6 of which&lt;/b&gt; seem to be relevant. Now, by analysing the tables, I come up with the following decisions:
&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;&lt;b&gt;ezuser_role&lt;/b&gt; - role configuration, 43 was there because of default editor role's limitations, I can skip this one&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;ezurlalias_ml&lt;/b&gt; - URL aliases (multilanguage?), I update my 59 node just in case, md5 has to be calculated for lowercase 'custom' (probably a more complex rule behind this, but lowercase will do in this case):&lt;br /&gt;&lt;i&gt;UPDATE ezurlalias_ml SET text='Custom', text_md5='8b9035807842a4e4dbe009f3f1478127' WHERE action='eznode:59'&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;ezurlalias&lt;/b&gt; - URL aliases, I add a missing record, same md5 hash:&lt;br /&gt;&lt;i&gt;INSERT INTO ezurlalias VALUES ('content/view/full/59', 0, NULL, 1, 1, 0, '8b9035807842a4e4dbe009f3f1478127', 'custom')&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;&lt;b&gt;ezsearch_object_word_link&lt;/b&gt; - search engine, can be reindexed, so let's skip this one...&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;eznode_assignment&lt;/b&gt; - I have absolutely no idea what this table's for, so I just take a guess and change depth:&lt;br /&gt;&lt;i&gt;UPDATE eznode_assignment SET parent_node=1 WHERE id=36&lt;/i&gt;&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;ezcontentobject_tree&lt;/b&gt; - actual tree, I modify path string, parent node, identification string and depth - all for my folder:&lt;br /&gt;&lt;i&gt;UPDATE ezcontentobject_tree SET path_string='/1/59/', parent_node_id=1, path_identification_string='custom', depth=1 WHERE path_string='/1/2/59/'&lt;/i&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;
Just before I touch my eZ Publish interfaces, I clear all the cache, just in case again...
&lt;/p&gt;

&lt;p&gt;
And here we go. From this moment on I have a sixth top level folder node. I don't have a tab and navigation part for it, yet, but I can access it by system URL: &lt;b&gt;/content/view/full/59&lt;/b&gt;... Not only that... it seems to properly hold newly created child nodes. I can navigate through this new, hidden structure without visible problems, but...
&lt;/p&gt;

&lt;p&gt;
...something must be missing, it's obvious when you search the kernel and libraries for 'MediaRootNode', 'RootNode', or 'UserRootNode', and see this:
&lt;/p&gt;
&lt;div class="code"&gt;

&lt;p&gt;

// /kernel/classes/ezcontentbrowse.php&lt;br /&gt;
static function nodeAliasID( $nodeName )&lt;br /&gt;
{&lt;br /&gt;
 if ( is_numeric( $nodeName ) )&lt;br /&gt;
 return $nodeName;&lt;br /&gt;
 $browseINI = eZINI::instance( 'browse.ini' );&lt;br /&gt;
 $aliasList = $browseINI-&gt;variable( 'BrowseSettings', 'AliasList' );&lt;br /&gt;
 if ( isset( $aliasList[$nodeName] ) )&lt;br /&gt;
 return $aliasList[$nodeName];&lt;br /&gt;
 $contentINI = eZINI::instance( 'content.ini' );&lt;br /&gt;
 if ( $nodeName == 'content' )&lt;br /&gt;
 return $contentINI-&gt;variable( 'NodeSettings', 'RootNode' );&lt;br /&gt;
 else if ( $nodeName == 'users' )&lt;br /&gt;
 return $contentINI-&gt;variable( 'NodeSettings', 'UserRootNode' );&lt;br /&gt;
 else if ( $nodeName == 'media' )&lt;br /&gt;
 return $contentINI-&gt;variable( 'NodeSettings', 'MediaRootNode' );&lt;br /&gt;
 else if ( $nodeName == 'setup' )&lt;br /&gt;
 return $contentINI-&gt;variable( 'NodeSettings', 'SetupRootNode' );&lt;br /&gt;
 else&lt;br /&gt;
 return false;&lt;br /&gt;}
&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;
But that's for another round...
&lt;/p&gt;
</description></item><item><pubDate>Mon, 24 Dec 2007 09:39:44 GMT</pubDate><title>eZ Human CAPTCHA - preventing bots from submitting spam in your eZ website</title><link>http://ez.ryba.eu/index.php/ez_publish/extensions/ez_human_captcha_preventing_bots_from_submitting_spam_in_your_ez_website</link><description>
&lt;p&gt;
eZ Human CAPTCHA is a simple eZ Publish extension which provides a collection of tools that make it easier to use session-based CAPTCHA techniques for preventing bots from submitting any unwanted data to your website.
&lt;/p&gt;

&lt;p&gt;
The default way to use it is to add Human CAPTCHA-datatype-based attribute to your content class. From that moment on any edit action taken on objects representing that class will require CAPTCHA code to be provided. This will secure both editing as well as collecing info. This method is completely automatic and does not require any development whatsoever.
&lt;/p&gt;

&lt;p&gt;
The other method is meant for developers, who want their own modules and/or templates secured. There are two template operators responsible for initiating/displaying a token and validating the code respectively. Optionally, it is possible to directly call a method responsible for token validation in PHP.
&lt;/p&gt;

&lt;p&gt;
Since the quality of the CAPTCHA token image is of critical importance, this extension can be further extended by applying custom image filters. An image filter is simply a set of PHP instructions to generate a token image.
&lt;/p&gt;

&lt;p&gt;
Search the Web if you need further information on CATPCHA itself. 
&lt;/p&gt;

&lt;p&gt;

You can download this extension from:&lt;br /&gt;&lt;a href="http://ez.no/developer/contribs/applications/ez_human_captcha" title="CAPTCHA for eZ Publish" target="_blank"&gt;http://ez.no/developer/contribs/applications/ez_human_captcha&lt;/a&gt;
&lt;/p&gt;
</description></item></channel></rss>

