From c799a00037a5d70c4dbe0505f5998c8afb313fa5 Mon Sep 17 00:00:00 2001 From: "Alexandre \"iksela\" Mathieu" Date: Thu, 18 Oct 2012 10:09:14 +0200 Subject: [PATCH 1/4] Added description custom attribute Allows inline help for end-users --- .../standard/templates/block/edit/edit.tpl | 633 ++++++++--------- .../ezextension/ezflow/settings/block.ini | 636 +++++++++--------- 2 files changed, 639 insertions(+), 630 deletions(-) diff --git a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl index 7c53d402..1f870c04 100644 --- a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl +++ b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl @@ -1,314 +1,319 @@ -{def $is_dynamic = false() - $is_custom = false() - $fetch_params = array() - $action = $block.action} - -{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} - {set $is_dynamic = true()} -{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} - {set $is_custom = true()} -{/if} - -{if is_set( $block.fetch_params )} - {set $fetch_params = unserialize( $block.fetch_params )} -{/if} - -
- -
-
- {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} -
-
- -
-
-
- -
-
- - -
-
- {if $is_custom|not} - - {/if} - -
-
- -
-
- {if $is_dynamic} - {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} - {if eq( $fetch_parameter, 'Source' )} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $fetch_params['Source'] )} - {if is_array( $fetch_params['Source'] )} - {foreach $fetch_params['Source'] as $source} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} - {$source_node.name|wash()}{delimiter}, {/delimiter} - {undef $source_node} - {/foreach} - {else} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} - {$source_node.name|wash()} - {undef $source_node} - {/if} - {/if} -
-
- {else} - - {/if} - {/foreach} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {def $custom_attributes = array() - $custom_attribute_types = array() - $custom_attribute_names = array() - $custom_attribute_selections = array() - $loop_count = 0} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} - {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} - {/if} - {foreach $custom_attributes as $custom_attrib} - {def $use_browse_mode = array()} - {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} - {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} - {/if} - {if eq( $use_browse_mode[$custom_attrib], 'true' )} - {if is_set($custom_attribute_names[$custom_attrib])}{/if} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $block.custom_attributes[$custom_attrib] )} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} - {if $source_node} - {$source_node.name|wash()} - {/if} - {undef $source_node} - {/if} -
- {else} - - {if is_set( $custom_attribute_types[$custom_attrib] )} - {switch match = $custom_attribute_types[$custom_attrib]} - {case match = 'text'} - - {/case} - {case match = 'checkbox'} - - - {/case} - {case match = 'string'} - - {/case} - {case match = 'select'} - {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} - - {/case} - {case} - - {/case} - {/switch} - {else} - - {/if} - {/if} - {undef $use_browse_mode} - {set $loop_count=inc( $loop_count )} - {/foreach} - {undef $loop_count} - {/if} - {if and( not( $is_dynamic ), not( $is_custom ) )} -
- -
- {/if} -
-
- -{if $is_custom|not} - - - {if $block.waiting|count()} - {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} - {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} - - - - - - {undef $item_object} - {/foreach} - {else} - - - - {/if} - -
{$item_object.name|wash()} - {if $block.rotation.interval} - {'Rotating item.'|i18n( 'design/standard/block/edit' )} - {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) - $last_valid_time = $block.last_valid_item.ts_visible - $interval_time = $block.rotation.interval - $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) - $position_left = $block.waiting|count()|sub( $index )|sub('1') - $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) - } - {if $time_left|gt( '0' )} - - {def $days = $time_left|div( '86400' )|floor() - $hours = $time_left|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() - } - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - - {/if} - {undef $time_left} - {else} - {$item.ts_publication|l10n( 'shortdatetime' )} - {if $item.ts_publication|lt( $current_time )|not()} - ( - {def $time_diff = $item.ts_publication|sub( $current_time ) - $days = $time_diff|div( '86400' )|floor() - $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - ) - {/if} - - {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} - {/if} -
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
- - - {if $block.valid|count()} - {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - {/foreach} - {else} - - - - {/if} - - - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} - - - {'Shuffle'|i18n( 'design/standard/block/edit' )}
- - {if $block.archived|count()} - {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - - {/foreach} - {else} - - - - {/if} - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} - {if ne( $item.moved_to , '' )} - {'Moved to:'|i18n( 'design/standard/block/edit' )} - - {foreach $zone.blocks as $index => $dest_block} - {if eq( $dest_block.id, $item.moved_to )} - {if ne( $dest_block.name, '' )} - {$dest_block.name|wash()} - {else} - {ezini( $dest_block.type, 'Name', 'block.ini' )} - {/if} - {/if} - {/foreach} - {else} - {'Not visible'|i18n( 'design/standard/block/edit' )} - {/if} -
{'History: no items.'|i18n( 'design/standard/block/edit' )}
- -
-
- -
-
-
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} -
-
-{/if} -
-
+{def $is_dynamic = false() + $is_custom = false() + $fetch_params = array() + $action = $block.action} + +{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} + {set $is_dynamic = true()} +{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} + {set $is_custom = true()} +{/if} + +{if is_set( $block.fetch_params )} + {set $fetch_params = unserialize( $block.fetch_params )} +{/if} + +
+ +
+
+ {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} +
+
+ +
+
+
+ +
+
+ + +
+
+ {if $is_custom|not} + + {/if} + +
+
+ +
+
+ {if $is_dynamic} + {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} + {if eq( $fetch_parameter, 'Source' )} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $fetch_params['Source'] )} + {if is_array( $fetch_params['Source'] )} + {foreach $fetch_params['Source'] as $source} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} + {$source_node.name|wash()}{delimiter}, {/delimiter} + {undef $source_node} + {/foreach} + {else} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} + {$source_node.name|wash()} + {undef $source_node} + {/if} + {/if} +
+
+ {else} + + {/if} + {/foreach} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {def $custom_attributes = array() + $custom_attribute_types = array() + $custom_attribute_names = array() + $custom_attribute_selections = array() + $custom_attribute_description = '' + $loop_count = 0} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} + {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} + {/if} + {foreach $custom_attributes as $custom_attrib} + {def $use_browse_mode = array()} + {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} + {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} + {/if} + {if eq( $use_browse_mode[$custom_attrib], 'true' )} + {if is_set($custom_attribute_names[$custom_attrib])}{/if} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $block.custom_attributes[$custom_attrib] )} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} + {if $source_node} + {$source_node.name|wash()} + {/if} + {undef $source_node} + {/if} +
+ {else} + + {if is_set( $custom_attribute_types[$custom_attrib] )} + {switch match = $custom_attribute_types[$custom_attrib]} + {case match = 'text'} + + {/case} + {case match = 'checkbox'} + + + {/case} + {case match = 'string'} + + {/case} + {case match = 'select'} + {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} + + {/case} + {case match = 'description'} + {set $custom_attribute_description = ezini( $block.type, concat( 'CustomAttributeDescription_', $custom_attrib ), 'block.ini' )} + {$custom_attribute_description} + {/case} + {case} + + {/case} + {/switch} + {else} + + {/if} + {/if} + {undef $use_browse_mode} + {set $loop_count=inc( $loop_count )} + {/foreach} + {undef $loop_count} + {/if} + {if and( not( $is_dynamic ), not( $is_custom ) )} +
+ +
+ {/if} +
+
+ +{if $is_custom|not} + + + {if $block.waiting|count()} + {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} + {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} + + + + + + {undef $item_object} + {/foreach} + {else} + + + + {/if} + +
{$item_object.name|wash()} + {if $block.rotation.interval} + {'Rotating item.'|i18n( 'design/standard/block/edit' )} + {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) + $last_valid_time = $block.last_valid_item.ts_visible + $interval_time = $block.rotation.interval + $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) + $position_left = $block.waiting|count()|sub( $index )|sub('1') + $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) + } + {if $time_left|gt( '0' )} + + {def $days = $time_left|div( '86400' )|floor() + $hours = $time_left|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() + } + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + + {/if} + {undef $time_left} + {else} + {$item.ts_publication|l10n( 'shortdatetime' )} + {if $item.ts_publication|lt( $current_time )|not()} + ( + {def $time_diff = $item.ts_publication|sub( $current_time ) + $days = $time_diff|div( '86400' )|floor() + $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + ) + {/if} + + {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} + {/if} +
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
+ + + {if $block.valid|count()} + {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + {/foreach} + {else} + + + + {/if} + + + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} + + + {'Shuffle'|i18n( 'design/standard/block/edit' )}
+ + {if $block.archived|count()} + {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + + {/foreach} + {else} + + + + {/if} + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} + {if ne( $item.moved_to , '' )} + {'Moved to:'|i18n( 'design/standard/block/edit' )} + + {foreach $zone.blocks as $index => $dest_block} + {if eq( $dest_block.id, $item.moved_to )} + {if ne( $dest_block.name, '' )} + {$dest_block.name|wash()} + {else} + {ezini( $dest_block.type, 'Name', 'block.ini' )} + {/if} + {/if} + {/foreach} + {else} + {'Not visible'|i18n( 'design/standard/block/edit' )} + {/if} +
{'History: no items.'|i18n( 'design/standard/block/edit' )}
+ +
+
+ +
+
+
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} +
+
+{/if} +
+
diff --git a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini index addc1bd2..d93d396a 100644 --- a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini +++ b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini @@ -1,316 +1,320 @@ -# Setting file for ezflow blocks as used by the Layout datatype -# A layout is divided into zones and then blocks, take a look in -# zone.ini for zone definitions. - -[General] -#AllowedTypes[]=Example -AllowedTypes[]=DemoBlock -AllowedTypes[]=Manual2Items -AllowedTypes[]=Manual3Items -AllowedTypes[]=Manual4Items -AllowedTypes[]=Manual5Items -AllowedTypes[]=Dynamic3Items -AllowedTypes[]=Gallery -AllowedTypes[]=Video -AllowedTypes[]=ItemList -AllowedTypes[]=MainStory -AllowedTypes[]=Banner -AllowedTypes[]=TagCloud -AllowedTypes[]=Poll -AllowedTypes[]=FlashRecorder -AllowedTypes[]=FeedReader -AllowedTypes[]=Keyword -AllowedTypes[]=GMap -AllowedTypes[]=OnlineUsers -AllowedTypes[]=MultimediaCarousel -AllowedTypes[]=Search -AllowedTypes[]=Ads -AllowedTypes[]=LatestContent -AllowedTypes[]=TopRated -AllowedTypes[]=GMapItems - -[PushToBlock] -# List of content classes using Layout datatype -ContentClasses[]=frontpage -# The subtree node ID from which to fetch objects with Layout datatype -RootSubtree=1 - -#[Example] -# Name of the block type as shown in the editorial interface. -# Name=Fetch Name Shown In Editorial Interface -# How many items are valid, as the new ones are being added, the oldest ones -# are moved to archive (or moved to another block) so that in any moment, -# max. NumberOfValidItems are valid. -# NumberOfValidItems=10 -# NumberOfArchivedItems=5 -# ManualAddingOfItems=disabled -# TTL=86400 -# FetchClass=ezmExample -# FetchFixedParameters[] -# FetchFixedParameters[Class]=article;folder -# FetchFixedParameters[...]=... -# FetchParameters[] -# FetchParametersIsRequired[] -# FetchParameters[Source]=NodeID -# FetchParametersIsRequired[Source]=true -# single / multiple -# FetchParametersSelectionType[Source]=single -# true / false -# FetchParametersIsRequired[Source]=true -# FetchParameters[...]=string -# FetchParameters[...]=integer -# CustomAttributes[]=node_id -# CustomAttributes[]=color -# Name of the custom attribute shown in the editorial interface -# CustomAttributeNames[node_id]=Node ID -# CustomAttributeNames[color]=Color -# text / checkbox / select / string (default) -# CustomAttributeTypes[node_id]=string -# CustomAttributeTypes[color]=select -# CustomAttributeSelection_color[] -# CustomAttributeSelection_color[blue]=Blue -# CustomAttributeSelection_color[green]=Green -# UseBrowseMode[node_id]=true -# ViewList[]=variation1 -# ViewName[variation1]=Main story 1 -# -# Used by browse mode for manual block, -# possibility to limit block items to specific class -# AllowedClasses[]=article - -[DemoBlock] -Name=Demo Block -ManualAddingOfItems=disabled -CustomAttributes[] -ViewList[]=demoblock -ViewName[demoblock]=Demo Block - -[Manual2Items] -Name=2 items (Manual) -NumberOfValidItems=2 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=2_items1 -ViewList[]=2_items2 -ViewName[2_items1]=2 items (1) -ViewName[2_items2]=2 items (2) - -[Manual3Items] -Name=3 items (Manual) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=3_items1 -ViewList[]=3_items2 -ViewList[]=3_items3 -ViewName[3_items1]=3 items (1) -ViewName[3_items2]=3 items (2) -ViewName[3_items3]=3 items (3 cols) - -[Manual4Items] -Name=4 items (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=4_items1 -ViewList[]=4_items2 -ViewList[]=4_items3 -ViewName[4_items1]=4 items (1) -ViewName[4_items2]=4 items (2) -ViewName[4_items3]=4 items (3) - -[Manual5Items] -Name=5 items (Manual) -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=5_items1 -ViewList[]=5_items2 -ViewName[5_items1]=5 items (1) -ViewName[5_items2]=5 items (2) - -[Dynamic3Items] -Name=3 items (Dynamic) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestObjects -FetchFixedParameters[Class]=article -FetchFixedParameters[Source]=74 -FetchFixedParameters[Limit]=3 -ViewList[]=3_items1 -ViewName[3_items1]=3 items (1) - -[Gallery] -Name=Gallery (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=gallery1 -ViewName[gallery1]=Gallery (1) - -[Video] -Name=Video (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=video -ViewName[video]=Video player - -[ItemList] -Name=Item list -NumberOfValidItems=12 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=itemlist1 -ViewList[]=itemlist2 -ViewList[]=itemlist3 -ViewName[itemlist1]=List (1 col) -ViewName[itemlist2]=List (2 cols) -ViewName[itemlist3]=List (3 cols) - -[MainStory] -Name=Main story (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=main_story1 -ViewList[]=main_story2 -ViewList[]=main_story3 -ViewName[main_story1]=Main story (1) -ViewName[main_story2]=Main story (2) -ViewName[main_story3]=Main story (3) - -[Banner] -Name=Banner -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -ViewList[]=banner1 -ViewList[]=banner2 -ViewName[banner1]=Banner (medium) -ViewName[banner2]=Banner (small) - -[TagCloud] -Name=Tag cloud -ManualAddingOfItems=disabled -CustomAttributes[]=subtree_node_id -UseBrowseMode[subtree_node_id]=true -ViewList[]=tag_cloud -ViewName[tag_cloud]=Tag cloud - -[Poll] -Name=Poll -ManualAddingOfItems=disabled -CustomAttributes[]=poll_node_id -UseBrowseMode[poll_node_id]=true -ViewList[]=poll -ViewName[poll]=Poll - -[FlashRecorder] -Name=Flash Recorder -NumberOfValidItems=8 -NumberOfArchivedItems=4 -ManualAddingOfItems=enabled -ViewList[]=flash_recorder -ViewName[flash_recorder]=Flash Recorder - -[FeedReader] -Name=Feed reader -ManualAddingOfItems=disabled -CustomAttributes[]=source -CustomAttributes[]=limit -CustomAttributes[]=offset -ViewList[]=feed_reader -ViewName[feed_reader]=Feed reader - -[Keyword] -Name=Keyword -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowKeywordsFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Keywords]=string -FetchParameters[Classes]=string -ViewList[]=keyword -ViewName[keyword]=Keyword - -[GMap] -Name=Google Map -ManualAddingOfItems=disabled -CustomAttributes[]=location -CustomAttributes[]=key -ViewList[]=gmap -ViewName[gmap]=Google Map - -[OnlineUsers] -Name=Online Users -ManualAddingOfItems=disabled -ViewList[]=onlineusers -ViewName[onlineusers]=Online Users - -[MultimediaCarousel] -Name=Multimedia carousel -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowMCFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -ViewList[]=multimediacarousel -ViewName[multimediacarousel]=Multimedia carousel - -[Search] -Name=Search -ManualAddingOfItems=disabled -ViewList[]=search -ViewName[search]=Search - -[Ads] -Name=Advertisement -ManualAddingOfItems=disabled -CustomAttributes[]=code -CustomAttributeTypes[code]=text -ViewList[]=ads -ViewName[ads]=Advertisement - -[LatestContent] -Name=Latest content -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestContent -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -FetchFixedParameters[Limit]=3 -ViewList[]=latest_content -ViewName[latest_content]=Latest content - -[TopRated] -Name=Top Rated -ManualAddingOfItems=disabled -CustomAttributes[]=source_node_id -CustomAttributes[]=limit -UseBrowseMode[source_node_id]=true -ViewList[]=toprated -ViewName[toprated]=TopRated - -[GMapItems] -Name=Google Map Items -ManualAddingOfItems=disabled -CustomAttributes[]=parent_node_id -CustomAttributes[]=class -CustomAttributes[]=attribute -CustomAttributes[]=limit -CustomAttributes[]=width -CustomAttributes[]=height -UseBrowseMode[parent_node_id]=true -ViewList[]=geo_located_content -ViewName[geo_located_content]=Geo-Located Content +# Setting file for ezflow blocks as used by the Layout datatype +# A layout is divided into zones and then blocks, take a look in +# zone.ini for zone definitions. + +[General] +#AllowedTypes[]=Example +AllowedTypes[]=DemoBlock +AllowedTypes[]=Manual2Items +AllowedTypes[]=Manual3Items +AllowedTypes[]=Manual4Items +AllowedTypes[]=Manual5Items +AllowedTypes[]=Dynamic3Items +AllowedTypes[]=Gallery +AllowedTypes[]=Video +AllowedTypes[]=ItemList +AllowedTypes[]=MainStory +AllowedTypes[]=Banner +AllowedTypes[]=TagCloud +AllowedTypes[]=Poll +AllowedTypes[]=FlashRecorder +AllowedTypes[]=FeedReader +AllowedTypes[]=Keyword +AllowedTypes[]=GMap +AllowedTypes[]=OnlineUsers +AllowedTypes[]=MultimediaCarousel +AllowedTypes[]=Search +AllowedTypes[]=Ads +AllowedTypes[]=LatestContent +AllowedTypes[]=TopRated +AllowedTypes[]=GMapItems + +[PushToBlock] +# List of content classes using Layout datatype +ContentClasses[]=frontpage +# The subtree node ID from which to fetch objects with Layout datatype +RootSubtree=1 + +#[Example] +# Name of the block type as shown in the editorial interface. +# Name=Fetch Name Shown In Editorial Interface +# How many items are valid, as the new ones are being added, the oldest ones +# are moved to archive (or moved to another block) so that in any moment, +# max. NumberOfValidItems are valid. +# NumberOfValidItems=10 +# NumberOfArchivedItems=5 +# ManualAddingOfItems=disabled +# TTL=86400 +# FetchClass=ezmExample +# FetchFixedParameters[] +# FetchFixedParameters[Class]=article;folder +# FetchFixedParameters[...]=... +# FetchParameters[] +# FetchParametersIsRequired[] +# FetchParameters[Source]=NodeID +# FetchParametersIsRequired[Source]=true +# single / multiple +# FetchParametersSelectionType[Source]=single +# true / false +# FetchParametersIsRequired[Source]=true +# FetchParameters[...]=string +# FetchParameters[...]=integer +# CustomAttributes[]=node_id +# CustomAttributes[]=desc +# CustomAttributes[]=color +# Name of the custom attribute shown in the editorial interface +# CustomAttributeNames[node_id]=Node ID +# CustomAttributeNames[desc]=Usage +# CustomAttributeNames[color]=Color +# text / checkbox / select / description / string (default) +# CustomAttributeTypes[node_id]=string +# CustomAttributeTypes[desc]=description +# CustomAttributeTypes[color]=select +# CustomAttributeDescription_desc=This selects the color. +# CustomAttributeSelection_color[] +# CustomAttributeSelection_color[blue]=Blue +# CustomAttributeSelection_color[green]=Green +# UseBrowseMode[node_id]=true +# ViewList[]=variation1 +# ViewName[variation1]=Main story 1 +# +# Used by browse mode for manual block, +# possibility to limit block items to specific class +# AllowedClasses[]=article + +[DemoBlock] +Name=Demo Block +ManualAddingOfItems=disabled +CustomAttributes[] +ViewList[]=demoblock +ViewName[demoblock]=Demo Block + +[Manual2Items] +Name=2 items (Manual) +NumberOfValidItems=2 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=2_items1 +ViewList[]=2_items2 +ViewName[2_items1]=2 items (1) +ViewName[2_items2]=2 items (2) + +[Manual3Items] +Name=3 items (Manual) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=3_items1 +ViewList[]=3_items2 +ViewList[]=3_items3 +ViewName[3_items1]=3 items (1) +ViewName[3_items2]=3 items (2) +ViewName[3_items3]=3 items (3 cols) + +[Manual4Items] +Name=4 items (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=4_items1 +ViewList[]=4_items2 +ViewList[]=4_items3 +ViewName[4_items1]=4 items (1) +ViewName[4_items2]=4 items (2) +ViewName[4_items3]=4 items (3) + +[Manual5Items] +Name=5 items (Manual) +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=5_items1 +ViewList[]=5_items2 +ViewName[5_items1]=5 items (1) +ViewName[5_items2]=5 items (2) + +[Dynamic3Items] +Name=3 items (Dynamic) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestObjects +FetchFixedParameters[Class]=article +FetchFixedParameters[Source]=74 +FetchFixedParameters[Limit]=3 +ViewList[]=3_items1 +ViewName[3_items1]=3 items (1) + +[Gallery] +Name=Gallery (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=gallery1 +ViewName[gallery1]=Gallery (1) + +[Video] +Name=Video (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=video +ViewName[video]=Video player + +[ItemList] +Name=Item list +NumberOfValidItems=12 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=itemlist1 +ViewList[]=itemlist2 +ViewList[]=itemlist3 +ViewName[itemlist1]=List (1 col) +ViewName[itemlist2]=List (2 cols) +ViewName[itemlist3]=List (3 cols) + +[MainStory] +Name=Main story (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=main_story1 +ViewList[]=main_story2 +ViewList[]=main_story3 +ViewName[main_story1]=Main story (1) +ViewName[main_story2]=Main story (2) +ViewName[main_story3]=Main story (3) + +[Banner] +Name=Banner +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +ViewList[]=banner1 +ViewList[]=banner2 +ViewName[banner1]=Banner (medium) +ViewName[banner2]=Banner (small) + +[TagCloud] +Name=Tag cloud +ManualAddingOfItems=disabled +CustomAttributes[]=subtree_node_id +UseBrowseMode[subtree_node_id]=true +ViewList[]=tag_cloud +ViewName[tag_cloud]=Tag cloud + +[Poll] +Name=Poll +ManualAddingOfItems=disabled +CustomAttributes[]=poll_node_id +UseBrowseMode[poll_node_id]=true +ViewList[]=poll +ViewName[poll]=Poll + +[FlashRecorder] +Name=Flash Recorder +NumberOfValidItems=8 +NumberOfArchivedItems=4 +ManualAddingOfItems=enabled +ViewList[]=flash_recorder +ViewName[flash_recorder]=Flash Recorder + +[FeedReader] +Name=Feed reader +ManualAddingOfItems=disabled +CustomAttributes[]=source +CustomAttributes[]=limit +CustomAttributes[]=offset +ViewList[]=feed_reader +ViewName[feed_reader]=Feed reader + +[Keyword] +Name=Keyword +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowKeywordsFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Keywords]=string +FetchParameters[Classes]=string +ViewList[]=keyword +ViewName[keyword]=Keyword + +[GMap] +Name=Google Map +ManualAddingOfItems=disabled +CustomAttributes[]=location +CustomAttributes[]=key +ViewList[]=gmap +ViewName[gmap]=Google Map + +[OnlineUsers] +Name=Online Users +ManualAddingOfItems=disabled +ViewList[]=onlineusers +ViewName[onlineusers]=Online Users + +[MultimediaCarousel] +Name=Multimedia carousel +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowMCFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +ViewList[]=multimediacarousel +ViewName[multimediacarousel]=Multimedia carousel + +[Search] +Name=Search +ManualAddingOfItems=disabled +ViewList[]=search +ViewName[search]=Search + +[Ads] +Name=Advertisement +ManualAddingOfItems=disabled +CustomAttributes[]=code +CustomAttributeTypes[code]=text +ViewList[]=ads +ViewName[ads]=Advertisement + +[LatestContent] +Name=Latest content +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestContent +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +FetchFixedParameters[Limit]=3 +ViewList[]=latest_content +ViewName[latest_content]=Latest content + +[TopRated] +Name=Top Rated +ManualAddingOfItems=disabled +CustomAttributes[]=source_node_id +CustomAttributes[]=limit +UseBrowseMode[source_node_id]=true +ViewList[]=toprated +ViewName[toprated]=TopRated + +[GMapItems] +Name=Google Map Items +ManualAddingOfItems=disabled +CustomAttributes[]=parent_node_id +CustomAttributes[]=class +CustomAttributes[]=attribute +CustomAttributes[]=limit +CustomAttributes[]=width +CustomAttributes[]=height +UseBrowseMode[parent_node_id]=true +ViewList[]=geo_located_content +ViewName[geo_located_content]=Geo-Located Content From bb757d9c15e3f79cc55a55784b99efdcc5442dc8 Mon Sep 17 00:00:00 2001 From: "Alexandre \"iksela\" Mathieu" Date: Thu, 18 Oct 2012 10:14:39 +0200 Subject: [PATCH 2/4] Revert "Added description custom attribute" This reverts commit c799a00037a5d70c4dbe0505f5998c8afb313fa5. --- .../standard/templates/block/edit/edit.tpl | 633 +++++++++-------- .../ezextension/ezflow/settings/block.ini | 636 +++++++++--------- 2 files changed, 630 insertions(+), 639 deletions(-) diff --git a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl index 1f870c04..7c53d402 100644 --- a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl +++ b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl @@ -1,319 +1,314 @@ -{def $is_dynamic = false() - $is_custom = false() - $fetch_params = array() - $action = $block.action} - -{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} - {set $is_dynamic = true()} -{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} - {set $is_custom = true()} -{/if} - -{if is_set( $block.fetch_params )} - {set $fetch_params = unserialize( $block.fetch_params )} -{/if} - -
- -
-
- {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} -
-
- -
-
-
- -
-
- - -
-
- {if $is_custom|not} - - {/if} - -
-
- -
-
- {if $is_dynamic} - {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} - {if eq( $fetch_parameter, 'Source' )} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $fetch_params['Source'] )} - {if is_array( $fetch_params['Source'] )} - {foreach $fetch_params['Source'] as $source} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} - {$source_node.name|wash()}{delimiter}, {/delimiter} - {undef $source_node} - {/foreach} - {else} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} - {$source_node.name|wash()} - {undef $source_node} - {/if} - {/if} -
-
- {else} - - {/if} - {/foreach} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {def $custom_attributes = array() - $custom_attribute_types = array() - $custom_attribute_names = array() - $custom_attribute_selections = array() - $custom_attribute_description = '' - $loop_count = 0} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} - {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} - {/if} - {foreach $custom_attributes as $custom_attrib} - {def $use_browse_mode = array()} - {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} - {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} - {/if} - {if eq( $use_browse_mode[$custom_attrib], 'true' )} - {if is_set($custom_attribute_names[$custom_attrib])}{/if} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $block.custom_attributes[$custom_attrib] )} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} - {if $source_node} - {$source_node.name|wash()} - {/if} - {undef $source_node} - {/if} -
- {else} - - {if is_set( $custom_attribute_types[$custom_attrib] )} - {switch match = $custom_attribute_types[$custom_attrib]} - {case match = 'text'} - - {/case} - {case match = 'checkbox'} - - - {/case} - {case match = 'string'} - - {/case} - {case match = 'select'} - {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} - - {/case} - {case match = 'description'} - {set $custom_attribute_description = ezini( $block.type, concat( 'CustomAttributeDescription_', $custom_attrib ), 'block.ini' )} - {$custom_attribute_description} - {/case} - {case} - - {/case} - {/switch} - {else} - - {/if} - {/if} - {undef $use_browse_mode} - {set $loop_count=inc( $loop_count )} - {/foreach} - {undef $loop_count} - {/if} - {if and( not( $is_dynamic ), not( $is_custom ) )} -
- -
- {/if} -
-
- -{if $is_custom|not} - - - {if $block.waiting|count()} - {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} - {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} - - - - - - {undef $item_object} - {/foreach} - {else} - - - - {/if} - -
{$item_object.name|wash()} - {if $block.rotation.interval} - {'Rotating item.'|i18n( 'design/standard/block/edit' )} - {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) - $last_valid_time = $block.last_valid_item.ts_visible - $interval_time = $block.rotation.interval - $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) - $position_left = $block.waiting|count()|sub( $index )|sub('1') - $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) - } - {if $time_left|gt( '0' )} - - {def $days = $time_left|div( '86400' )|floor() - $hours = $time_left|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() - } - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - - {/if} - {undef $time_left} - {else} - {$item.ts_publication|l10n( 'shortdatetime' )} - {if $item.ts_publication|lt( $current_time )|not()} - ( - {def $time_diff = $item.ts_publication|sub( $current_time ) - $days = $time_diff|div( '86400' )|floor() - $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - ) - {/if} - - {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} - {/if} -
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
- - - {if $block.valid|count()} - {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - {/foreach} - {else} - - - - {/if} - - - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} - - - {'Shuffle'|i18n( 'design/standard/block/edit' )}
- - {if $block.archived|count()} - {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - - {/foreach} - {else} - - - - {/if} - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} - {if ne( $item.moved_to , '' )} - {'Moved to:'|i18n( 'design/standard/block/edit' )} - - {foreach $zone.blocks as $index => $dest_block} - {if eq( $dest_block.id, $item.moved_to )} - {if ne( $dest_block.name, '' )} - {$dest_block.name|wash()} - {else} - {ezini( $dest_block.type, 'Name', 'block.ini' )} - {/if} - {/if} - {/foreach} - {else} - {'Not visible'|i18n( 'design/standard/block/edit' )} - {/if} -
{'History: no items.'|i18n( 'design/standard/block/edit' )}
- -
-
- -
-
-
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} -
-
-{/if} -
-
+{def $is_dynamic = false() + $is_custom = false() + $fetch_params = array() + $action = $block.action} + +{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} + {set $is_dynamic = true()} +{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} + {set $is_custom = true()} +{/if} + +{if is_set( $block.fetch_params )} + {set $fetch_params = unserialize( $block.fetch_params )} +{/if} + +
+ +
+
+ {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} +
+
+ +
+
+
+ +
+
+ + +
+
+ {if $is_custom|not} + + {/if} + +
+
+ +
+
+ {if $is_dynamic} + {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} + {if eq( $fetch_parameter, 'Source' )} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $fetch_params['Source'] )} + {if is_array( $fetch_params['Source'] )} + {foreach $fetch_params['Source'] as $source} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} + {$source_node.name|wash()}{delimiter}, {/delimiter} + {undef $source_node} + {/foreach} + {else} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} + {$source_node.name|wash()} + {undef $source_node} + {/if} + {/if} +
+
+ {else} + + {/if} + {/foreach} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {def $custom_attributes = array() + $custom_attribute_types = array() + $custom_attribute_names = array() + $custom_attribute_selections = array() + $loop_count = 0} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} + {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} + {/if} + {foreach $custom_attributes as $custom_attrib} + {def $use_browse_mode = array()} + {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} + {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} + {/if} + {if eq( $use_browse_mode[$custom_attrib], 'true' )} + {if is_set($custom_attribute_names[$custom_attrib])}{/if} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $block.custom_attributes[$custom_attrib] )} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} + {if $source_node} + {$source_node.name|wash()} + {/if} + {undef $source_node} + {/if} +
+ {else} + + {if is_set( $custom_attribute_types[$custom_attrib] )} + {switch match = $custom_attribute_types[$custom_attrib]} + {case match = 'text'} + + {/case} + {case match = 'checkbox'} + + + {/case} + {case match = 'string'} + + {/case} + {case match = 'select'} + {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} + + {/case} + {case} + + {/case} + {/switch} + {else} + + {/if} + {/if} + {undef $use_browse_mode} + {set $loop_count=inc( $loop_count )} + {/foreach} + {undef $loop_count} + {/if} + {if and( not( $is_dynamic ), not( $is_custom ) )} +
+ +
+ {/if} +
+
+ +{if $is_custom|not} + + + {if $block.waiting|count()} + {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} + {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} + + + + + + {undef $item_object} + {/foreach} + {else} + + + + {/if} + +
{$item_object.name|wash()} + {if $block.rotation.interval} + {'Rotating item.'|i18n( 'design/standard/block/edit' )} + {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) + $last_valid_time = $block.last_valid_item.ts_visible + $interval_time = $block.rotation.interval + $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) + $position_left = $block.waiting|count()|sub( $index )|sub('1') + $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) + } + {if $time_left|gt( '0' )} + + {def $days = $time_left|div( '86400' )|floor() + $hours = $time_left|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() + } + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + + {/if} + {undef $time_left} + {else} + {$item.ts_publication|l10n( 'shortdatetime' )} + {if $item.ts_publication|lt( $current_time )|not()} + ( + {def $time_diff = $item.ts_publication|sub( $current_time ) + $days = $time_diff|div( '86400' )|floor() + $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + ) + {/if} + + {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} + {/if} +
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
+ + + {if $block.valid|count()} + {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + {/foreach} + {else} + + + + {/if} + + + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} + + + {'Shuffle'|i18n( 'design/standard/block/edit' )}
+ + {if $block.archived|count()} + {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + + {/foreach} + {else} + + + + {/if} + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} + {if ne( $item.moved_to , '' )} + {'Moved to:'|i18n( 'design/standard/block/edit' )} + + {foreach $zone.blocks as $index => $dest_block} + {if eq( $dest_block.id, $item.moved_to )} + {if ne( $dest_block.name, '' )} + {$dest_block.name|wash()} + {else} + {ezini( $dest_block.type, 'Name', 'block.ini' )} + {/if} + {/if} + {/foreach} + {else} + {'Not visible'|i18n( 'design/standard/block/edit' )} + {/if} +
{'History: no items.'|i18n( 'design/standard/block/edit' )}
+ +
+
+ +
+
+
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} +
+
+{/if} +
+
diff --git a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini index d93d396a..addc1bd2 100644 --- a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini +++ b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini @@ -1,320 +1,316 @@ -# Setting file for ezflow blocks as used by the Layout datatype -# A layout is divided into zones and then blocks, take a look in -# zone.ini for zone definitions. - -[General] -#AllowedTypes[]=Example -AllowedTypes[]=DemoBlock -AllowedTypes[]=Manual2Items -AllowedTypes[]=Manual3Items -AllowedTypes[]=Manual4Items -AllowedTypes[]=Manual5Items -AllowedTypes[]=Dynamic3Items -AllowedTypes[]=Gallery -AllowedTypes[]=Video -AllowedTypes[]=ItemList -AllowedTypes[]=MainStory -AllowedTypes[]=Banner -AllowedTypes[]=TagCloud -AllowedTypes[]=Poll -AllowedTypes[]=FlashRecorder -AllowedTypes[]=FeedReader -AllowedTypes[]=Keyword -AllowedTypes[]=GMap -AllowedTypes[]=OnlineUsers -AllowedTypes[]=MultimediaCarousel -AllowedTypes[]=Search -AllowedTypes[]=Ads -AllowedTypes[]=LatestContent -AllowedTypes[]=TopRated -AllowedTypes[]=GMapItems - -[PushToBlock] -# List of content classes using Layout datatype -ContentClasses[]=frontpage -# The subtree node ID from which to fetch objects with Layout datatype -RootSubtree=1 - -#[Example] -# Name of the block type as shown in the editorial interface. -# Name=Fetch Name Shown In Editorial Interface -# How many items are valid, as the new ones are being added, the oldest ones -# are moved to archive (or moved to another block) so that in any moment, -# max. NumberOfValidItems are valid. -# NumberOfValidItems=10 -# NumberOfArchivedItems=5 -# ManualAddingOfItems=disabled -# TTL=86400 -# FetchClass=ezmExample -# FetchFixedParameters[] -# FetchFixedParameters[Class]=article;folder -# FetchFixedParameters[...]=... -# FetchParameters[] -# FetchParametersIsRequired[] -# FetchParameters[Source]=NodeID -# FetchParametersIsRequired[Source]=true -# single / multiple -# FetchParametersSelectionType[Source]=single -# true / false -# FetchParametersIsRequired[Source]=true -# FetchParameters[...]=string -# FetchParameters[...]=integer -# CustomAttributes[]=node_id -# CustomAttributes[]=desc -# CustomAttributes[]=color -# Name of the custom attribute shown in the editorial interface -# CustomAttributeNames[node_id]=Node ID -# CustomAttributeNames[desc]=Usage -# CustomAttributeNames[color]=Color -# text / checkbox / select / description / string (default) -# CustomAttributeTypes[node_id]=string -# CustomAttributeTypes[desc]=description -# CustomAttributeTypes[color]=select -# CustomAttributeDescription_desc=This selects the color. -# CustomAttributeSelection_color[] -# CustomAttributeSelection_color[blue]=Blue -# CustomAttributeSelection_color[green]=Green -# UseBrowseMode[node_id]=true -# ViewList[]=variation1 -# ViewName[variation1]=Main story 1 -# -# Used by browse mode for manual block, -# possibility to limit block items to specific class -# AllowedClasses[]=article - -[DemoBlock] -Name=Demo Block -ManualAddingOfItems=disabled -CustomAttributes[] -ViewList[]=demoblock -ViewName[demoblock]=Demo Block - -[Manual2Items] -Name=2 items (Manual) -NumberOfValidItems=2 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=2_items1 -ViewList[]=2_items2 -ViewName[2_items1]=2 items (1) -ViewName[2_items2]=2 items (2) - -[Manual3Items] -Name=3 items (Manual) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=3_items1 -ViewList[]=3_items2 -ViewList[]=3_items3 -ViewName[3_items1]=3 items (1) -ViewName[3_items2]=3 items (2) -ViewName[3_items3]=3 items (3 cols) - -[Manual4Items] -Name=4 items (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=4_items1 -ViewList[]=4_items2 -ViewList[]=4_items3 -ViewName[4_items1]=4 items (1) -ViewName[4_items2]=4 items (2) -ViewName[4_items3]=4 items (3) - -[Manual5Items] -Name=5 items (Manual) -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=5_items1 -ViewList[]=5_items2 -ViewName[5_items1]=5 items (1) -ViewName[5_items2]=5 items (2) - -[Dynamic3Items] -Name=3 items (Dynamic) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestObjects -FetchFixedParameters[Class]=article -FetchFixedParameters[Source]=74 -FetchFixedParameters[Limit]=3 -ViewList[]=3_items1 -ViewName[3_items1]=3 items (1) - -[Gallery] -Name=Gallery (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=gallery1 -ViewName[gallery1]=Gallery (1) - -[Video] -Name=Video (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=video -ViewName[video]=Video player - -[ItemList] -Name=Item list -NumberOfValidItems=12 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=itemlist1 -ViewList[]=itemlist2 -ViewList[]=itemlist3 -ViewName[itemlist1]=List (1 col) -ViewName[itemlist2]=List (2 cols) -ViewName[itemlist3]=List (3 cols) - -[MainStory] -Name=Main story (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=main_story1 -ViewList[]=main_story2 -ViewList[]=main_story3 -ViewName[main_story1]=Main story (1) -ViewName[main_story2]=Main story (2) -ViewName[main_story3]=Main story (3) - -[Banner] -Name=Banner -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -ViewList[]=banner1 -ViewList[]=banner2 -ViewName[banner1]=Banner (medium) -ViewName[banner2]=Banner (small) - -[TagCloud] -Name=Tag cloud -ManualAddingOfItems=disabled -CustomAttributes[]=subtree_node_id -UseBrowseMode[subtree_node_id]=true -ViewList[]=tag_cloud -ViewName[tag_cloud]=Tag cloud - -[Poll] -Name=Poll -ManualAddingOfItems=disabled -CustomAttributes[]=poll_node_id -UseBrowseMode[poll_node_id]=true -ViewList[]=poll -ViewName[poll]=Poll - -[FlashRecorder] -Name=Flash Recorder -NumberOfValidItems=8 -NumberOfArchivedItems=4 -ManualAddingOfItems=enabled -ViewList[]=flash_recorder -ViewName[flash_recorder]=Flash Recorder - -[FeedReader] -Name=Feed reader -ManualAddingOfItems=disabled -CustomAttributes[]=source -CustomAttributes[]=limit -CustomAttributes[]=offset -ViewList[]=feed_reader -ViewName[feed_reader]=Feed reader - -[Keyword] -Name=Keyword -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowKeywordsFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Keywords]=string -FetchParameters[Classes]=string -ViewList[]=keyword -ViewName[keyword]=Keyword - -[GMap] -Name=Google Map -ManualAddingOfItems=disabled -CustomAttributes[]=location -CustomAttributes[]=key -ViewList[]=gmap -ViewName[gmap]=Google Map - -[OnlineUsers] -Name=Online Users -ManualAddingOfItems=disabled -ViewList[]=onlineusers -ViewName[onlineusers]=Online Users - -[MultimediaCarousel] -Name=Multimedia carousel -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowMCFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -ViewList[]=multimediacarousel -ViewName[multimediacarousel]=Multimedia carousel - -[Search] -Name=Search -ManualAddingOfItems=disabled -ViewList[]=search -ViewName[search]=Search - -[Ads] -Name=Advertisement -ManualAddingOfItems=disabled -CustomAttributes[]=code -CustomAttributeTypes[code]=text -ViewList[]=ads -ViewName[ads]=Advertisement - -[LatestContent] -Name=Latest content -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestContent -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -FetchFixedParameters[Limit]=3 -ViewList[]=latest_content -ViewName[latest_content]=Latest content - -[TopRated] -Name=Top Rated -ManualAddingOfItems=disabled -CustomAttributes[]=source_node_id -CustomAttributes[]=limit -UseBrowseMode[source_node_id]=true -ViewList[]=toprated -ViewName[toprated]=TopRated - -[GMapItems] -Name=Google Map Items -ManualAddingOfItems=disabled -CustomAttributes[]=parent_node_id -CustomAttributes[]=class -CustomAttributes[]=attribute -CustomAttributes[]=limit -CustomAttributes[]=width -CustomAttributes[]=height -UseBrowseMode[parent_node_id]=true -ViewList[]=geo_located_content -ViewName[geo_located_content]=Geo-Located Content +# Setting file for ezflow blocks as used by the Layout datatype +# A layout is divided into zones and then blocks, take a look in +# zone.ini for zone definitions. + +[General] +#AllowedTypes[]=Example +AllowedTypes[]=DemoBlock +AllowedTypes[]=Manual2Items +AllowedTypes[]=Manual3Items +AllowedTypes[]=Manual4Items +AllowedTypes[]=Manual5Items +AllowedTypes[]=Dynamic3Items +AllowedTypes[]=Gallery +AllowedTypes[]=Video +AllowedTypes[]=ItemList +AllowedTypes[]=MainStory +AllowedTypes[]=Banner +AllowedTypes[]=TagCloud +AllowedTypes[]=Poll +AllowedTypes[]=FlashRecorder +AllowedTypes[]=FeedReader +AllowedTypes[]=Keyword +AllowedTypes[]=GMap +AllowedTypes[]=OnlineUsers +AllowedTypes[]=MultimediaCarousel +AllowedTypes[]=Search +AllowedTypes[]=Ads +AllowedTypes[]=LatestContent +AllowedTypes[]=TopRated +AllowedTypes[]=GMapItems + +[PushToBlock] +# List of content classes using Layout datatype +ContentClasses[]=frontpage +# The subtree node ID from which to fetch objects with Layout datatype +RootSubtree=1 + +#[Example] +# Name of the block type as shown in the editorial interface. +# Name=Fetch Name Shown In Editorial Interface +# How many items are valid, as the new ones are being added, the oldest ones +# are moved to archive (or moved to another block) so that in any moment, +# max. NumberOfValidItems are valid. +# NumberOfValidItems=10 +# NumberOfArchivedItems=5 +# ManualAddingOfItems=disabled +# TTL=86400 +# FetchClass=ezmExample +# FetchFixedParameters[] +# FetchFixedParameters[Class]=article;folder +# FetchFixedParameters[...]=... +# FetchParameters[] +# FetchParametersIsRequired[] +# FetchParameters[Source]=NodeID +# FetchParametersIsRequired[Source]=true +# single / multiple +# FetchParametersSelectionType[Source]=single +# true / false +# FetchParametersIsRequired[Source]=true +# FetchParameters[...]=string +# FetchParameters[...]=integer +# CustomAttributes[]=node_id +# CustomAttributes[]=color +# Name of the custom attribute shown in the editorial interface +# CustomAttributeNames[node_id]=Node ID +# CustomAttributeNames[color]=Color +# text / checkbox / select / string (default) +# CustomAttributeTypes[node_id]=string +# CustomAttributeTypes[color]=select +# CustomAttributeSelection_color[] +# CustomAttributeSelection_color[blue]=Blue +# CustomAttributeSelection_color[green]=Green +# UseBrowseMode[node_id]=true +# ViewList[]=variation1 +# ViewName[variation1]=Main story 1 +# +# Used by browse mode for manual block, +# possibility to limit block items to specific class +# AllowedClasses[]=article + +[DemoBlock] +Name=Demo Block +ManualAddingOfItems=disabled +CustomAttributes[] +ViewList[]=demoblock +ViewName[demoblock]=Demo Block + +[Manual2Items] +Name=2 items (Manual) +NumberOfValidItems=2 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=2_items1 +ViewList[]=2_items2 +ViewName[2_items1]=2 items (1) +ViewName[2_items2]=2 items (2) + +[Manual3Items] +Name=3 items (Manual) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=3_items1 +ViewList[]=3_items2 +ViewList[]=3_items3 +ViewName[3_items1]=3 items (1) +ViewName[3_items2]=3 items (2) +ViewName[3_items3]=3 items (3 cols) + +[Manual4Items] +Name=4 items (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=4_items1 +ViewList[]=4_items2 +ViewList[]=4_items3 +ViewName[4_items1]=4 items (1) +ViewName[4_items2]=4 items (2) +ViewName[4_items3]=4 items (3) + +[Manual5Items] +Name=5 items (Manual) +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=5_items1 +ViewList[]=5_items2 +ViewName[5_items1]=5 items (1) +ViewName[5_items2]=5 items (2) + +[Dynamic3Items] +Name=3 items (Dynamic) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestObjects +FetchFixedParameters[Class]=article +FetchFixedParameters[Source]=74 +FetchFixedParameters[Limit]=3 +ViewList[]=3_items1 +ViewName[3_items1]=3 items (1) + +[Gallery] +Name=Gallery (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=gallery1 +ViewName[gallery1]=Gallery (1) + +[Video] +Name=Video (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=video +ViewName[video]=Video player + +[ItemList] +Name=Item list +NumberOfValidItems=12 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=itemlist1 +ViewList[]=itemlist2 +ViewList[]=itemlist3 +ViewName[itemlist1]=List (1 col) +ViewName[itemlist2]=List (2 cols) +ViewName[itemlist3]=List (3 cols) + +[MainStory] +Name=Main story (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=main_story1 +ViewList[]=main_story2 +ViewList[]=main_story3 +ViewName[main_story1]=Main story (1) +ViewName[main_story2]=Main story (2) +ViewName[main_story3]=Main story (3) + +[Banner] +Name=Banner +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +ViewList[]=banner1 +ViewList[]=banner2 +ViewName[banner1]=Banner (medium) +ViewName[banner2]=Banner (small) + +[TagCloud] +Name=Tag cloud +ManualAddingOfItems=disabled +CustomAttributes[]=subtree_node_id +UseBrowseMode[subtree_node_id]=true +ViewList[]=tag_cloud +ViewName[tag_cloud]=Tag cloud + +[Poll] +Name=Poll +ManualAddingOfItems=disabled +CustomAttributes[]=poll_node_id +UseBrowseMode[poll_node_id]=true +ViewList[]=poll +ViewName[poll]=Poll + +[FlashRecorder] +Name=Flash Recorder +NumberOfValidItems=8 +NumberOfArchivedItems=4 +ManualAddingOfItems=enabled +ViewList[]=flash_recorder +ViewName[flash_recorder]=Flash Recorder + +[FeedReader] +Name=Feed reader +ManualAddingOfItems=disabled +CustomAttributes[]=source +CustomAttributes[]=limit +CustomAttributes[]=offset +ViewList[]=feed_reader +ViewName[feed_reader]=Feed reader + +[Keyword] +Name=Keyword +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowKeywordsFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Keywords]=string +FetchParameters[Classes]=string +ViewList[]=keyword +ViewName[keyword]=Keyword + +[GMap] +Name=Google Map +ManualAddingOfItems=disabled +CustomAttributes[]=location +CustomAttributes[]=key +ViewList[]=gmap +ViewName[gmap]=Google Map + +[OnlineUsers] +Name=Online Users +ManualAddingOfItems=disabled +ViewList[]=onlineusers +ViewName[onlineusers]=Online Users + +[MultimediaCarousel] +Name=Multimedia carousel +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowMCFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +ViewList[]=multimediacarousel +ViewName[multimediacarousel]=Multimedia carousel + +[Search] +Name=Search +ManualAddingOfItems=disabled +ViewList[]=search +ViewName[search]=Search + +[Ads] +Name=Advertisement +ManualAddingOfItems=disabled +CustomAttributes[]=code +CustomAttributeTypes[code]=text +ViewList[]=ads +ViewName[ads]=Advertisement + +[LatestContent] +Name=Latest content +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestContent +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +FetchFixedParameters[Limit]=3 +ViewList[]=latest_content +ViewName[latest_content]=Latest content + +[TopRated] +Name=Top Rated +ManualAddingOfItems=disabled +CustomAttributes[]=source_node_id +CustomAttributes[]=limit +UseBrowseMode[source_node_id]=true +ViewList[]=toprated +ViewName[toprated]=TopRated + +[GMapItems] +Name=Google Map Items +ManualAddingOfItems=disabled +CustomAttributes[]=parent_node_id +CustomAttributes[]=class +CustomAttributes[]=attribute +CustomAttributes[]=limit +CustomAttributes[]=width +CustomAttributes[]=height +UseBrowseMode[parent_node_id]=true +ViewList[]=geo_located_content +ViewName[geo_located_content]=Geo-Located Content From 9ba39ee232058d9f045fdfba224f28716c7206ac Mon Sep 17 00:00:00 2001 From: "Alexandre \"iksela\" Mathieu" Date: Thu, 18 Oct 2012 10:21:47 +0200 Subject: [PATCH 3/4] Added description custom attribute Allows inline help for end-users --- .../standard/templates/block/edit/edit.tpl | 633 ++++++++--------- .../ezextension/ezflow/settings/block.ini | 636 +++++++++--------- 2 files changed, 639 insertions(+), 630 deletions(-) diff --git a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl index 7c53d402..1f870c04 100644 --- a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl +++ b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl @@ -1,314 +1,319 @@ -{def $is_dynamic = false() - $is_custom = false() - $fetch_params = array() - $action = $block.action} - -{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} - {set $is_dynamic = true()} -{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} - {set $is_custom = true()} -{/if} - -{if is_set( $block.fetch_params )} - {set $fetch_params = unserialize( $block.fetch_params )} -{/if} - -
- -
-
- {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} -
-
- -
-
-
- -
-
- - -
-
- {if $is_custom|not} - - {/if} - -
-
- -
-
- {if $is_dynamic} - {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} - {if eq( $fetch_parameter, 'Source' )} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $fetch_params['Source'] )} - {if is_array( $fetch_params['Source'] )} - {foreach $fetch_params['Source'] as $source} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} - {$source_node.name|wash()}{delimiter}, {/delimiter} - {undef $source_node} - {/foreach} - {else} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} - {$source_node.name|wash()} - {undef $source_node} - {/if} - {/if} -
-
- {else} - - {/if} - {/foreach} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {def $custom_attributes = array() - $custom_attribute_types = array() - $custom_attribute_names = array() - $custom_attribute_selections = array() - $loop_count = 0} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} - {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} - {/if} - {foreach $custom_attributes as $custom_attrib} - {def $use_browse_mode = array()} - {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} - {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} - {/if} - {if eq( $use_browse_mode[$custom_attrib], 'true' )} - {if is_set($custom_attribute_names[$custom_attrib])}{/if} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $block.custom_attributes[$custom_attrib] )} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} - {if $source_node} - {$source_node.name|wash()} - {/if} - {undef $source_node} - {/if} -
- {else} - - {if is_set( $custom_attribute_types[$custom_attrib] )} - {switch match = $custom_attribute_types[$custom_attrib]} - {case match = 'text'} - - {/case} - {case match = 'checkbox'} - - - {/case} - {case match = 'string'} - - {/case} - {case match = 'select'} - {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} - - {/case} - {case} - - {/case} - {/switch} - {else} - - {/if} - {/if} - {undef $use_browse_mode} - {set $loop_count=inc( $loop_count )} - {/foreach} - {undef $loop_count} - {/if} - {if and( not( $is_dynamic ), not( $is_custom ) )} -
- -
- {/if} -
-
- -{if $is_custom|not} - - - {if $block.waiting|count()} - {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} - {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} - - - - - - {undef $item_object} - {/foreach} - {else} - - - - {/if} - -
{$item_object.name|wash()} - {if $block.rotation.interval} - {'Rotating item.'|i18n( 'design/standard/block/edit' )} - {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) - $last_valid_time = $block.last_valid_item.ts_visible - $interval_time = $block.rotation.interval - $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) - $position_left = $block.waiting|count()|sub( $index )|sub('1') - $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) - } - {if $time_left|gt( '0' )} - - {def $days = $time_left|div( '86400' )|floor() - $hours = $time_left|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() - } - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - - {/if} - {undef $time_left} - {else} - {$item.ts_publication|l10n( 'shortdatetime' )} - {if $item.ts_publication|lt( $current_time )|not()} - ( - {def $time_diff = $item.ts_publication|sub( $current_time ) - $days = $time_diff|div( '86400' )|floor() - $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - ) - {/if} - - {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} - {/if} -
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
- - - {if $block.valid|count()} - {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - {/foreach} - {else} - - - - {/if} - - - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} - - - {'Shuffle'|i18n( 'design/standard/block/edit' )}
- - {if $block.archived|count()} - {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - - {/foreach} - {else} - - - - {/if} - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} - {if ne( $item.moved_to , '' )} - {'Moved to:'|i18n( 'design/standard/block/edit' )} - - {foreach $zone.blocks as $index => $dest_block} - {if eq( $dest_block.id, $item.moved_to )} - {if ne( $dest_block.name, '' )} - {$dest_block.name|wash()} - {else} - {ezini( $dest_block.type, 'Name', 'block.ini' )} - {/if} - {/if} - {/foreach} - {else} - {'Not visible'|i18n( 'design/standard/block/edit' )} - {/if} -
{'History: no items.'|i18n( 'design/standard/block/edit' )}
- -
-
- -
-
-
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} -
-
-{/if} -
-
+{def $is_dynamic = false() + $is_custom = false() + $fetch_params = array() + $action = $block.action} + +{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} + {set $is_dynamic = true()} +{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} + {set $is_custom = true()} +{/if} + +{if is_set( $block.fetch_params )} + {set $fetch_params = unserialize( $block.fetch_params )} +{/if} + +
+ +
+
+ {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} +
+
+ +
+
+
+ +
+
+ + +
+
+ {if $is_custom|not} + + {/if} + +
+
+ +
+
+ {if $is_dynamic} + {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} + {if eq( $fetch_parameter, 'Source' )} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $fetch_params['Source'] )} + {if is_array( $fetch_params['Source'] )} + {foreach $fetch_params['Source'] as $source} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} + {$source_node.name|wash()}{delimiter}, {/delimiter} + {undef $source_node} + {/foreach} + {else} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} + {$source_node.name|wash()} + {undef $source_node} + {/if} + {/if} +
+
+ {else} + + {/if} + {/foreach} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {def $custom_attributes = array() + $custom_attribute_types = array() + $custom_attribute_names = array() + $custom_attribute_selections = array() + $custom_attribute_description = '' + $loop_count = 0} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} + {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} + {/if} + {foreach $custom_attributes as $custom_attrib} + {def $use_browse_mode = array()} + {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} + {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} + {/if} + {if eq( $use_browse_mode[$custom_attrib], 'true' )} + {if is_set($custom_attribute_names[$custom_attrib])}{/if} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $block.custom_attributes[$custom_attrib] )} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} + {if $source_node} + {$source_node.name|wash()} + {/if} + {undef $source_node} + {/if} +
+ {else} + + {if is_set( $custom_attribute_types[$custom_attrib] )} + {switch match = $custom_attribute_types[$custom_attrib]} + {case match = 'text'} + + {/case} + {case match = 'checkbox'} + + + {/case} + {case match = 'string'} + + {/case} + {case match = 'select'} + {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} + + {/case} + {case match = 'description'} + {set $custom_attribute_description = ezini( $block.type, concat( 'CustomAttributeDescription_', $custom_attrib ), 'block.ini' )} + {$custom_attribute_description} + {/case} + {case} + + {/case} + {/switch} + {else} + + {/if} + {/if} + {undef $use_browse_mode} + {set $loop_count=inc( $loop_count )} + {/foreach} + {undef $loop_count} + {/if} + {if and( not( $is_dynamic ), not( $is_custom ) )} +
+ +
+ {/if} +
+
+ +{if $is_custom|not} + + + {if $block.waiting|count()} + {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} + {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} + + + + + + {undef $item_object} + {/foreach} + {else} + + + + {/if} + +
{$item_object.name|wash()} + {if $block.rotation.interval} + {'Rotating item.'|i18n( 'design/standard/block/edit' )} + {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) + $last_valid_time = $block.last_valid_item.ts_visible + $interval_time = $block.rotation.interval + $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) + $position_left = $block.waiting|count()|sub( $index )|sub('1') + $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) + } + {if $time_left|gt( '0' )} + + {def $days = $time_left|div( '86400' )|floor() + $hours = $time_left|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() + } + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + + {/if} + {undef $time_left} + {else} + {$item.ts_publication|l10n( 'shortdatetime' )} + {if $item.ts_publication|lt( $current_time )|not()} + ( + {def $time_diff = $item.ts_publication|sub( $current_time ) + $days = $time_diff|div( '86400' )|floor() + $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + ) + {/if} + + {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} + {/if} +
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
+ + + {if $block.valid|count()} + {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + {/foreach} + {else} + + + + {/if} + + + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} + + + {'Shuffle'|i18n( 'design/standard/block/edit' )}
+ + {if $block.archived|count()} + {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + + {/foreach} + {else} + + + + {/if} + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} + {if ne( $item.moved_to , '' )} + {'Moved to:'|i18n( 'design/standard/block/edit' )} + + {foreach $zone.blocks as $index => $dest_block} + {if eq( $dest_block.id, $item.moved_to )} + {if ne( $dest_block.name, '' )} + {$dest_block.name|wash()} + {else} + {ezini( $dest_block.type, 'Name', 'block.ini' )} + {/if} + {/if} + {/foreach} + {else} + {'Not visible'|i18n( 'design/standard/block/edit' )} + {/if} +
{'History: no items.'|i18n( 'design/standard/block/edit' )}
+ +
+
+ +
+
+
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} +
+
+{/if} +
+
diff --git a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini index addc1bd2..d93d396a 100644 --- a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini +++ b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini @@ -1,316 +1,320 @@ -# Setting file for ezflow blocks as used by the Layout datatype -# A layout is divided into zones and then blocks, take a look in -# zone.ini for zone definitions. - -[General] -#AllowedTypes[]=Example -AllowedTypes[]=DemoBlock -AllowedTypes[]=Manual2Items -AllowedTypes[]=Manual3Items -AllowedTypes[]=Manual4Items -AllowedTypes[]=Manual5Items -AllowedTypes[]=Dynamic3Items -AllowedTypes[]=Gallery -AllowedTypes[]=Video -AllowedTypes[]=ItemList -AllowedTypes[]=MainStory -AllowedTypes[]=Banner -AllowedTypes[]=TagCloud -AllowedTypes[]=Poll -AllowedTypes[]=FlashRecorder -AllowedTypes[]=FeedReader -AllowedTypes[]=Keyword -AllowedTypes[]=GMap -AllowedTypes[]=OnlineUsers -AllowedTypes[]=MultimediaCarousel -AllowedTypes[]=Search -AllowedTypes[]=Ads -AllowedTypes[]=LatestContent -AllowedTypes[]=TopRated -AllowedTypes[]=GMapItems - -[PushToBlock] -# List of content classes using Layout datatype -ContentClasses[]=frontpage -# The subtree node ID from which to fetch objects with Layout datatype -RootSubtree=1 - -#[Example] -# Name of the block type as shown in the editorial interface. -# Name=Fetch Name Shown In Editorial Interface -# How many items are valid, as the new ones are being added, the oldest ones -# are moved to archive (or moved to another block) so that in any moment, -# max. NumberOfValidItems are valid. -# NumberOfValidItems=10 -# NumberOfArchivedItems=5 -# ManualAddingOfItems=disabled -# TTL=86400 -# FetchClass=ezmExample -# FetchFixedParameters[] -# FetchFixedParameters[Class]=article;folder -# FetchFixedParameters[...]=... -# FetchParameters[] -# FetchParametersIsRequired[] -# FetchParameters[Source]=NodeID -# FetchParametersIsRequired[Source]=true -# single / multiple -# FetchParametersSelectionType[Source]=single -# true / false -# FetchParametersIsRequired[Source]=true -# FetchParameters[...]=string -# FetchParameters[...]=integer -# CustomAttributes[]=node_id -# CustomAttributes[]=color -# Name of the custom attribute shown in the editorial interface -# CustomAttributeNames[node_id]=Node ID -# CustomAttributeNames[color]=Color -# text / checkbox / select / string (default) -# CustomAttributeTypes[node_id]=string -# CustomAttributeTypes[color]=select -# CustomAttributeSelection_color[] -# CustomAttributeSelection_color[blue]=Blue -# CustomAttributeSelection_color[green]=Green -# UseBrowseMode[node_id]=true -# ViewList[]=variation1 -# ViewName[variation1]=Main story 1 -# -# Used by browse mode for manual block, -# possibility to limit block items to specific class -# AllowedClasses[]=article - -[DemoBlock] -Name=Demo Block -ManualAddingOfItems=disabled -CustomAttributes[] -ViewList[]=demoblock -ViewName[demoblock]=Demo Block - -[Manual2Items] -Name=2 items (Manual) -NumberOfValidItems=2 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=2_items1 -ViewList[]=2_items2 -ViewName[2_items1]=2 items (1) -ViewName[2_items2]=2 items (2) - -[Manual3Items] -Name=3 items (Manual) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=3_items1 -ViewList[]=3_items2 -ViewList[]=3_items3 -ViewName[3_items1]=3 items (1) -ViewName[3_items2]=3 items (2) -ViewName[3_items3]=3 items (3 cols) - -[Manual4Items] -Name=4 items (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=4_items1 -ViewList[]=4_items2 -ViewList[]=4_items3 -ViewName[4_items1]=4 items (1) -ViewName[4_items2]=4 items (2) -ViewName[4_items3]=4 items (3) - -[Manual5Items] -Name=5 items (Manual) -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=5_items1 -ViewList[]=5_items2 -ViewName[5_items1]=5 items (1) -ViewName[5_items2]=5 items (2) - -[Dynamic3Items] -Name=3 items (Dynamic) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestObjects -FetchFixedParameters[Class]=article -FetchFixedParameters[Source]=74 -FetchFixedParameters[Limit]=3 -ViewList[]=3_items1 -ViewName[3_items1]=3 items (1) - -[Gallery] -Name=Gallery (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=gallery1 -ViewName[gallery1]=Gallery (1) - -[Video] -Name=Video (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=video -ViewName[video]=Video player - -[ItemList] -Name=Item list -NumberOfValidItems=12 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=itemlist1 -ViewList[]=itemlist2 -ViewList[]=itemlist3 -ViewName[itemlist1]=List (1 col) -ViewName[itemlist2]=List (2 cols) -ViewName[itemlist3]=List (3 cols) - -[MainStory] -Name=Main story (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=main_story1 -ViewList[]=main_story2 -ViewList[]=main_story3 -ViewName[main_story1]=Main story (1) -ViewName[main_story2]=Main story (2) -ViewName[main_story3]=Main story (3) - -[Banner] -Name=Banner -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -ViewList[]=banner1 -ViewList[]=banner2 -ViewName[banner1]=Banner (medium) -ViewName[banner2]=Banner (small) - -[TagCloud] -Name=Tag cloud -ManualAddingOfItems=disabled -CustomAttributes[]=subtree_node_id -UseBrowseMode[subtree_node_id]=true -ViewList[]=tag_cloud -ViewName[tag_cloud]=Tag cloud - -[Poll] -Name=Poll -ManualAddingOfItems=disabled -CustomAttributes[]=poll_node_id -UseBrowseMode[poll_node_id]=true -ViewList[]=poll -ViewName[poll]=Poll - -[FlashRecorder] -Name=Flash Recorder -NumberOfValidItems=8 -NumberOfArchivedItems=4 -ManualAddingOfItems=enabled -ViewList[]=flash_recorder -ViewName[flash_recorder]=Flash Recorder - -[FeedReader] -Name=Feed reader -ManualAddingOfItems=disabled -CustomAttributes[]=source -CustomAttributes[]=limit -CustomAttributes[]=offset -ViewList[]=feed_reader -ViewName[feed_reader]=Feed reader - -[Keyword] -Name=Keyword -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowKeywordsFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Keywords]=string -FetchParameters[Classes]=string -ViewList[]=keyword -ViewName[keyword]=Keyword - -[GMap] -Name=Google Map -ManualAddingOfItems=disabled -CustomAttributes[]=location -CustomAttributes[]=key -ViewList[]=gmap -ViewName[gmap]=Google Map - -[OnlineUsers] -Name=Online Users -ManualAddingOfItems=disabled -ViewList[]=onlineusers -ViewName[onlineusers]=Online Users - -[MultimediaCarousel] -Name=Multimedia carousel -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowMCFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -ViewList[]=multimediacarousel -ViewName[multimediacarousel]=Multimedia carousel - -[Search] -Name=Search -ManualAddingOfItems=disabled -ViewList[]=search -ViewName[search]=Search - -[Ads] -Name=Advertisement -ManualAddingOfItems=disabled -CustomAttributes[]=code -CustomAttributeTypes[code]=text -ViewList[]=ads -ViewName[ads]=Advertisement - -[LatestContent] -Name=Latest content -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestContent -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -FetchFixedParameters[Limit]=3 -ViewList[]=latest_content -ViewName[latest_content]=Latest content - -[TopRated] -Name=Top Rated -ManualAddingOfItems=disabled -CustomAttributes[]=source_node_id -CustomAttributes[]=limit -UseBrowseMode[source_node_id]=true -ViewList[]=toprated -ViewName[toprated]=TopRated - -[GMapItems] -Name=Google Map Items -ManualAddingOfItems=disabled -CustomAttributes[]=parent_node_id -CustomAttributes[]=class -CustomAttributes[]=attribute -CustomAttributes[]=limit -CustomAttributes[]=width -CustomAttributes[]=height -UseBrowseMode[parent_node_id]=true -ViewList[]=geo_located_content -ViewName[geo_located_content]=Geo-Located Content +# Setting file for ezflow blocks as used by the Layout datatype +# A layout is divided into zones and then blocks, take a look in +# zone.ini for zone definitions. + +[General] +#AllowedTypes[]=Example +AllowedTypes[]=DemoBlock +AllowedTypes[]=Manual2Items +AllowedTypes[]=Manual3Items +AllowedTypes[]=Manual4Items +AllowedTypes[]=Manual5Items +AllowedTypes[]=Dynamic3Items +AllowedTypes[]=Gallery +AllowedTypes[]=Video +AllowedTypes[]=ItemList +AllowedTypes[]=MainStory +AllowedTypes[]=Banner +AllowedTypes[]=TagCloud +AllowedTypes[]=Poll +AllowedTypes[]=FlashRecorder +AllowedTypes[]=FeedReader +AllowedTypes[]=Keyword +AllowedTypes[]=GMap +AllowedTypes[]=OnlineUsers +AllowedTypes[]=MultimediaCarousel +AllowedTypes[]=Search +AllowedTypes[]=Ads +AllowedTypes[]=LatestContent +AllowedTypes[]=TopRated +AllowedTypes[]=GMapItems + +[PushToBlock] +# List of content classes using Layout datatype +ContentClasses[]=frontpage +# The subtree node ID from which to fetch objects with Layout datatype +RootSubtree=1 + +#[Example] +# Name of the block type as shown in the editorial interface. +# Name=Fetch Name Shown In Editorial Interface +# How many items are valid, as the new ones are being added, the oldest ones +# are moved to archive (or moved to another block) so that in any moment, +# max. NumberOfValidItems are valid. +# NumberOfValidItems=10 +# NumberOfArchivedItems=5 +# ManualAddingOfItems=disabled +# TTL=86400 +# FetchClass=ezmExample +# FetchFixedParameters[] +# FetchFixedParameters[Class]=article;folder +# FetchFixedParameters[...]=... +# FetchParameters[] +# FetchParametersIsRequired[] +# FetchParameters[Source]=NodeID +# FetchParametersIsRequired[Source]=true +# single / multiple +# FetchParametersSelectionType[Source]=single +# true / false +# FetchParametersIsRequired[Source]=true +# FetchParameters[...]=string +# FetchParameters[...]=integer +# CustomAttributes[]=node_id +# CustomAttributes[]=desc +# CustomAttributes[]=color +# Name of the custom attribute shown in the editorial interface +# CustomAttributeNames[node_id]=Node ID +# CustomAttributeNames[desc]=Usage +# CustomAttributeNames[color]=Color +# text / checkbox / select / description / string (default) +# CustomAttributeTypes[node_id]=string +# CustomAttributeTypes[desc]=description +# CustomAttributeTypes[color]=select +# CustomAttributeDescription_desc=This selects the color. +# CustomAttributeSelection_color[] +# CustomAttributeSelection_color[blue]=Blue +# CustomAttributeSelection_color[green]=Green +# UseBrowseMode[node_id]=true +# ViewList[]=variation1 +# ViewName[variation1]=Main story 1 +# +# Used by browse mode for manual block, +# possibility to limit block items to specific class +# AllowedClasses[]=article + +[DemoBlock] +Name=Demo Block +ManualAddingOfItems=disabled +CustomAttributes[] +ViewList[]=demoblock +ViewName[demoblock]=Demo Block + +[Manual2Items] +Name=2 items (Manual) +NumberOfValidItems=2 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=2_items1 +ViewList[]=2_items2 +ViewName[2_items1]=2 items (1) +ViewName[2_items2]=2 items (2) + +[Manual3Items] +Name=3 items (Manual) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=3_items1 +ViewList[]=3_items2 +ViewList[]=3_items3 +ViewName[3_items1]=3 items (1) +ViewName[3_items2]=3 items (2) +ViewName[3_items3]=3 items (3 cols) + +[Manual4Items] +Name=4 items (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=4_items1 +ViewList[]=4_items2 +ViewList[]=4_items3 +ViewName[4_items1]=4 items (1) +ViewName[4_items2]=4 items (2) +ViewName[4_items3]=4 items (3) + +[Manual5Items] +Name=5 items (Manual) +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=5_items1 +ViewList[]=5_items2 +ViewName[5_items1]=5 items (1) +ViewName[5_items2]=5 items (2) + +[Dynamic3Items] +Name=3 items (Dynamic) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestObjects +FetchFixedParameters[Class]=article +FetchFixedParameters[Source]=74 +FetchFixedParameters[Limit]=3 +ViewList[]=3_items1 +ViewName[3_items1]=3 items (1) + +[Gallery] +Name=Gallery (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=gallery1 +ViewName[gallery1]=Gallery (1) + +[Video] +Name=Video (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=video +ViewName[video]=Video player + +[ItemList] +Name=Item list +NumberOfValidItems=12 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=itemlist1 +ViewList[]=itemlist2 +ViewList[]=itemlist3 +ViewName[itemlist1]=List (1 col) +ViewName[itemlist2]=List (2 cols) +ViewName[itemlist3]=List (3 cols) + +[MainStory] +Name=Main story (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=main_story1 +ViewList[]=main_story2 +ViewList[]=main_story3 +ViewName[main_story1]=Main story (1) +ViewName[main_story2]=Main story (2) +ViewName[main_story3]=Main story (3) + +[Banner] +Name=Banner +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +ViewList[]=banner1 +ViewList[]=banner2 +ViewName[banner1]=Banner (medium) +ViewName[banner2]=Banner (small) + +[TagCloud] +Name=Tag cloud +ManualAddingOfItems=disabled +CustomAttributes[]=subtree_node_id +UseBrowseMode[subtree_node_id]=true +ViewList[]=tag_cloud +ViewName[tag_cloud]=Tag cloud + +[Poll] +Name=Poll +ManualAddingOfItems=disabled +CustomAttributes[]=poll_node_id +UseBrowseMode[poll_node_id]=true +ViewList[]=poll +ViewName[poll]=Poll + +[FlashRecorder] +Name=Flash Recorder +NumberOfValidItems=8 +NumberOfArchivedItems=4 +ManualAddingOfItems=enabled +ViewList[]=flash_recorder +ViewName[flash_recorder]=Flash Recorder + +[FeedReader] +Name=Feed reader +ManualAddingOfItems=disabled +CustomAttributes[]=source +CustomAttributes[]=limit +CustomAttributes[]=offset +ViewList[]=feed_reader +ViewName[feed_reader]=Feed reader + +[Keyword] +Name=Keyword +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowKeywordsFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Keywords]=string +FetchParameters[Classes]=string +ViewList[]=keyword +ViewName[keyword]=Keyword + +[GMap] +Name=Google Map +ManualAddingOfItems=disabled +CustomAttributes[]=location +CustomAttributes[]=key +ViewList[]=gmap +ViewName[gmap]=Google Map + +[OnlineUsers] +Name=Online Users +ManualAddingOfItems=disabled +ViewList[]=onlineusers +ViewName[onlineusers]=Online Users + +[MultimediaCarousel] +Name=Multimedia carousel +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowMCFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +ViewList[]=multimediacarousel +ViewName[multimediacarousel]=Multimedia carousel + +[Search] +Name=Search +ManualAddingOfItems=disabled +ViewList[]=search +ViewName[search]=Search + +[Ads] +Name=Advertisement +ManualAddingOfItems=disabled +CustomAttributes[]=code +CustomAttributeTypes[code]=text +ViewList[]=ads +ViewName[ads]=Advertisement + +[LatestContent] +Name=Latest content +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestContent +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +FetchFixedParameters[Limit]=3 +ViewList[]=latest_content +ViewName[latest_content]=Latest content + +[TopRated] +Name=Top Rated +ManualAddingOfItems=disabled +CustomAttributes[]=source_node_id +CustomAttributes[]=limit +UseBrowseMode[source_node_id]=true +ViewList[]=toprated +ViewName[toprated]=TopRated + +[GMapItems] +Name=Google Map Items +ManualAddingOfItems=disabled +CustomAttributes[]=parent_node_id +CustomAttributes[]=class +CustomAttributes[]=attribute +CustomAttributes[]=limit +CustomAttributes[]=width +CustomAttributes[]=height +UseBrowseMode[parent_node_id]=true +ViewList[]=geo_located_content +ViewName[geo_located_content]=Geo-Located Content From 94aece8074f11722b461aef9fae6082be1ad5153 Mon Sep 17 00:00:00 2001 From: "Alexandre \"iksela\" Mathieu" Date: Thu, 18 Oct 2012 11:52:58 +0200 Subject: [PATCH 4/4] Added description custom attribute --- .../standard/templates/block/edit/edit.tpl | 638 ++++++++--------- .../ezextension/ezflow/settings/block.ini | 640 +++++++++--------- 2 files changed, 639 insertions(+), 639 deletions(-) diff --git a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl index 1f870c04..f5130453 100644 --- a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl +++ b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl @@ -1,319 +1,319 @@ -{def $is_dynamic = false() - $is_custom = false() - $fetch_params = array() - $action = $block.action} - -{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} - {set $is_dynamic = true()} -{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), - ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} - {set $is_custom = true()} -{/if} - -{if is_set( $block.fetch_params )} - {set $fetch_params = unserialize( $block.fetch_params )} -{/if} - -
- -
-
- {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} -
-
- -
-
-
- -
-
- - -
-
- {if $is_custom|not} - - {/if} - -
-
- -
-
- {if $is_dynamic} - {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} - {if eq( $fetch_parameter, 'Source' )} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $fetch_params['Source'] )} - {if is_array( $fetch_params['Source'] )} - {foreach $fetch_params['Source'] as $source} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} - {$source_node.name|wash()}{delimiter}, {/delimiter} - {undef $source_node} - {/foreach} - {else} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} - {$source_node.name|wash()} - {undef $source_node} - {/if} - {/if} -
-
- {else} - - {/if} - {/foreach} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {def $custom_attributes = array() - $custom_attribute_types = array() - $custom_attribute_names = array() - $custom_attribute_selections = array() - $custom_attribute_description = '' - $loop_count = 0} - {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} - {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} - {/if} - {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} - {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} - {/if} - {foreach $custom_attributes as $custom_attrib} - {def $use_browse_mode = array()} - {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} - {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} - {/if} - {if eq( $use_browse_mode[$custom_attrib], 'true' )} - {if is_set($custom_attribute_names[$custom_attrib])}{/if} - -
- {'Current source:'|i18n( 'design/standard/block/edit' )} - {if is_set( $block.custom_attributes[$custom_attrib] )} - {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} - {if $source_node} - {$source_node.name|wash()} - {/if} - {undef $source_node} - {/if} -
- {else} - - {if is_set( $custom_attribute_types[$custom_attrib] )} - {switch match = $custom_attribute_types[$custom_attrib]} - {case match = 'text'} - - {/case} - {case match = 'checkbox'} - - - {/case} - {case match = 'string'} - - {/case} - {case match = 'select'} - {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} - - {/case} - {case match = 'description'} - {set $custom_attribute_description = ezini( $block.type, concat( 'CustomAttributeDescription_', $custom_attrib ), 'block.ini' )} - {$custom_attribute_description} - {/case} - {case} - - {/case} - {/switch} - {else} - - {/if} - {/if} - {undef $use_browse_mode} - {set $loop_count=inc( $loop_count )} - {/foreach} - {undef $loop_count} - {/if} - {if and( not( $is_dynamic ), not( $is_custom ) )} -
- -
- {/if} -
-
- -{if $is_custom|not} - - - {if $block.waiting|count()} - {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} - {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} - - - - - - {undef $item_object} - {/foreach} - {else} - - - - {/if} - -
{$item_object.name|wash()} - {if $block.rotation.interval} - {'Rotating item.'|i18n( 'design/standard/block/edit' )} - {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) - $last_valid_time = $block.last_valid_item.ts_visible - $interval_time = $block.rotation.interval - $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) - $position_left = $block.waiting|count()|sub( $index )|sub('1') - $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) - } - {if $time_left|gt( '0' )} - - {def $days = $time_left|div( '86400' )|floor() - $hours = $time_left|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() - } - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - - {/if} - {undef $time_left} - {else} - {$item.ts_publication|l10n( 'shortdatetime' )} - {if $item.ts_publication|lt( $current_time )|not()} - ( - {def $time_diff = $item.ts_publication|sub( $current_time ) - $days = $time_diff|div( '86400' )|floor() - $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() - $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() - $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} - - {if $days|gt( '0' )} - {$days} {'d'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $hours|gt( '0' )} - {$hours} {'h'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $minutes|gt( '0' )} - {$minutes} {'m'|i18n( 'design/standard/block/edit' )} - {/if} - - {if $seconds|gt( '0' )} - {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} - {/if} - ) - {/if} - - {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} - {/if} -
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
- - - {if $block.valid|count()} - {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - {/foreach} - {else} - - - - {/if} - - - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} - - - {'Shuffle'|i18n( 'design/standard/block/edit' )}
- - {if $block.archived|count()} - {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} - - - - - - {/foreach} - {else} - - - - {/if} - -
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} - {if ne( $item.moved_to , '' )} - {'Moved to:'|i18n( 'design/standard/block/edit' )} - - {foreach $zone.blocks as $index => $dest_block} - {if eq( $dest_block.id, $item.moved_to )} - {if ne( $dest_block.name, '' )} - {$dest_block.name|wash()} - {else} - {ezini( $dest_block.type, 'Name', 'block.ini' )} - {/if} - {/if} - {/foreach} - {else} - {'Not visible'|i18n( 'design/standard/block/edit' )} - {/if} -
{'History: no items.'|i18n( 'design/standard/block/edit' )}
- -
-
- -
-
-
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} -
-
-{/if} -
-
+{def $is_dynamic = false() + $is_custom = false() + $fetch_params = array() + $action = $block.action} + +{if and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' ) )} + {set $is_dynamic = true()} +{elseif and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), + ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not )} + {set $is_custom = true()} +{/if} + +{if is_set( $block.fetch_params )} + {set $fetch_params = unserialize( $block.fetch_params )} +{/if} + +
+ +
+
+ {ezini( $block.type, 'Name', 'block.ini' )} {if ne( $block.name, '' )}- {$block.name|wash()}{/if} +
+
+ +
+
+
+ +
+
+ + +
+
+ {if $is_custom|not} + + {/if} + +
+
+ +
+
+ {if $is_dynamic} + {foreach ezini( $block.type, 'FetchParameters', 'block.ini' ) as $fetch_parameter => $value} + {if eq( $fetch_parameter, 'Source' )} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $fetch_params['Source'] )} + {if is_array( $fetch_params['Source'] )} + {foreach $fetch_params['Source'] as $source} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $source ) )} + {$source_node.name|wash()}{delimiter}, {/delimiter} + {undef $source_node} + {/foreach} + {else} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )} + {$source_node.name|wash()} + {undef $source_node} + {/if} + {/if} +
+
+ {else} + + {/if} + {/foreach} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {def $custom_attributes = array() + $custom_attribute_types = array() + $custom_attribute_names = array() + $custom_attribute_selections = array() + $custom_attribute_description = '' + $loop_count = 0} + {if ezini_hasvariable( $block.type, 'CustomAttributes', 'block.ini' )} + {set $custom_attributes = ezini( $block.type, 'CustomAttributes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {set $custom_attribute_types = ezini( $block.type, 'CustomAttributeTypes', 'block.ini' )} + {/if} + {if ezini_hasvariable( $block.type, 'CustomAttributeNames', 'block.ini' )} + {set $custom_attribute_names = ezini( $block.type, 'CustomAttributeNames', 'block.ini' )} + {/if} + {foreach $custom_attributes as $custom_attrib} + {def $use_browse_mode = array()} + {if ezini_hasvariable( $block.type, 'UseBrowseMode', 'block.ini' )} + {set $use_browse_mode = ezini( $block.type, 'UseBrowseMode', 'block.ini' )} + {/if} + {if eq( $use_browse_mode[$custom_attrib], 'true' )} + {if is_set($custom_attribute_names[$custom_attrib])}{/if} + +
+ {'Current source:'|i18n( 'design/standard/block/edit' )} + {if is_set( $block.custom_attributes[$custom_attrib] )} + {def $source_node = fetch( 'content', 'node', hash( 'node_id', $block.custom_attributes[$custom_attrib] ) )} + {if $source_node} + {$source_node.name|wash()} + {/if} + {undef $source_node} + {/if} +
+ {else} + + {if is_set( $custom_attribute_types[$custom_attrib] )} + {switch match = $custom_attribute_types[$custom_attrib]} + {case match = 'text'} + + {/case} + {case match = 'checkbox'} + + + {/case} + {case match = 'string'} + + {/case} + {case match = 'select'} + {set $custom_attribute_selections = ezini( $block.type, concat( 'CustomAttributeSelection_', $custom_attrib ), 'block.ini' )} + + {/case} + {case match = 'description'} + {set $custom_attribute_description = ezini( $block.type, concat( 'CustomAttributeDescription_', $custom_attrib ), 'block.ini' )} + {$custom_attribute_description} + {/case} + {case} + + {/case} + {/switch} + {else} + + {/if} + {/if} + {undef $use_browse_mode} + {set $loop_count=inc( $loop_count )} + {/foreach} + {undef $loop_count} + {/if} + {if and( not( $is_dynamic ), not( $is_custom ) )} +
+ +
+ {/if} +
+
+ +{if $is_custom|not} + + + {if $block.waiting|count()} + {foreach $block.waiting as $index => $item sequence array( 'bglight', 'bgdark') as $style} + {def $item_object = fetch( 'content', 'object', hash( 'object_id', $item.object_id ) )} + + + + + + {undef $item_object} + {/foreach} + {else} + + + + {/if} + +
{$item_object.name|wash()} + {if $block.rotation.interval} + {'Rotating item.'|i18n( 'design/standard/block/edit' )} + {def $number_of_valid_setting = ezini( $block.type, 'NumberOfValidItems', 'block.ini' ) + $last_valid_time = $block.last_valid_item.ts_visible + $interval_time = $block.rotation.interval + $time_left_latest = $last_valid_time|sub( $current_time )|sum( $interval_time ) + $position_left = $block.waiting|count()|sub( $index )|sub('1') + $time_left = sum( $position_left|div( $number_of_valid_setting )|floor|mul( $interval_time ),$time_left_latest ) + } + {if $time_left|gt( '0' )} + + {def $days = $time_left|div( '86400' )|floor() + $hours = $time_left|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_left|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_left|mod( '86400' )|mod( '3600' )|mod( '60' )|round() + } + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + + {/if} + {undef $time_left} + {else} + {$item.ts_publication|l10n( 'shortdatetime' )} + {if $item.ts_publication|lt( $current_time )|not()} + ( + {def $time_diff = $item.ts_publication|sub( $current_time ) + $days = $time_diff|div( '86400' )|floor() + $hours = $time_diff|mod( '86400' )|div( '3600' )|floor() + $minutes = $time_diff|mod( '86400' )|mod( '3600' )|div( '60' )|floor() + $seconds = $time_diff|mod( '86400' )|mod( '3600' )|mod( '60' )|round()} + + {if $days|gt( '0' )} + {$days} {'d'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $hours|gt( '0' )} + {$hours} {'h'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $minutes|gt( '0' )} + {$minutes} {'m'|i18n( 'design/standard/block/edit' )} + {/if} + + {if $seconds|gt( '0' )} + {$seconds} {'s'|i18n( 'design/standard/block/edit' )} {'left'|i18n( 'design/standard/block/edit' )} + {/if} + ) + {/if} + + {concat( 'Publishing schedule for: '|i18n( 'design/standard/block/edit' ), $item_object.name|wash() )|shorten( '50' )} + {/if} +
{'Queue: no items.'|i18n( 'design/standard/block/edit' )}
+ + + {if $block.valid|count()} + {foreach $block.valid as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + {/foreach} + {else} + + + + {/if} + + + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()}
{'Online: no items.'|i18n( 'design/standard/block/edit' )}
{'Rotation:'|i18n( 'design/standard/block/edit' )} + + + {'Shuffle'|i18n( 'design/standard/block/edit' )}
+ + {if $block.archived|count()} + {foreach $block.archived as $item sequence array( 'bglight', 'bgdark') as $style} + + + + + + {/foreach} + {else} + + + + {/if} + +
{fetch( 'content', 'object', hash( 'object_id', $item.object_id ) ).name|wash()} + {if ne( $item.moved_to , '' )} + {'Moved to:'|i18n( 'design/standard/block/edit' )} + + {foreach $zone.blocks as $index => $dest_block} + {if eq( $dest_block.id, $item.moved_to )} + {if ne( $dest_block.name, '' )} + {$dest_block.name|wash()} + {else} + {ezini( $dest_block.type, 'Name', 'block.ini' )} + {/if} + {/if} + {/foreach} + {else} + {'Not visible'|i18n( 'design/standard/block/edit' )} + {/if} +
{'History: no items.'|i18n( 'design/standard/block/edit' )}
+ +
+
+ +
+
+
 
{'Queue:'|i18n( 'design/standard/block/edit' )} {$block.waiting|count()}
 
{'Online:'|i18n( 'design/standard/block/edit' )} {$block.valid|count()}
 
{'History:'|i18n( 'design/standard/block/edit' )} {$block.archived|count()} +
+
+{/if} +
+
diff --git a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini index d93d396a..c0314225 100644 --- a/packages/ezflow_extension/ezextension/ezflow/settings/block.ini +++ b/packages/ezflow_extension/ezextension/ezflow/settings/block.ini @@ -1,320 +1,320 @@ -# Setting file for ezflow blocks as used by the Layout datatype -# A layout is divided into zones and then blocks, take a look in -# zone.ini for zone definitions. - -[General] -#AllowedTypes[]=Example -AllowedTypes[]=DemoBlock -AllowedTypes[]=Manual2Items -AllowedTypes[]=Manual3Items -AllowedTypes[]=Manual4Items -AllowedTypes[]=Manual5Items -AllowedTypes[]=Dynamic3Items -AllowedTypes[]=Gallery -AllowedTypes[]=Video -AllowedTypes[]=ItemList -AllowedTypes[]=MainStory -AllowedTypes[]=Banner -AllowedTypes[]=TagCloud -AllowedTypes[]=Poll -AllowedTypes[]=FlashRecorder -AllowedTypes[]=FeedReader -AllowedTypes[]=Keyword -AllowedTypes[]=GMap -AllowedTypes[]=OnlineUsers -AllowedTypes[]=MultimediaCarousel -AllowedTypes[]=Search -AllowedTypes[]=Ads -AllowedTypes[]=LatestContent -AllowedTypes[]=TopRated -AllowedTypes[]=GMapItems - -[PushToBlock] -# List of content classes using Layout datatype -ContentClasses[]=frontpage -# The subtree node ID from which to fetch objects with Layout datatype -RootSubtree=1 - -#[Example] -# Name of the block type as shown in the editorial interface. -# Name=Fetch Name Shown In Editorial Interface -# How many items are valid, as the new ones are being added, the oldest ones -# are moved to archive (or moved to another block) so that in any moment, -# max. NumberOfValidItems are valid. -# NumberOfValidItems=10 -# NumberOfArchivedItems=5 -# ManualAddingOfItems=disabled -# TTL=86400 -# FetchClass=ezmExample -# FetchFixedParameters[] -# FetchFixedParameters[Class]=article;folder -# FetchFixedParameters[...]=... -# FetchParameters[] -# FetchParametersIsRequired[] -# FetchParameters[Source]=NodeID -# FetchParametersIsRequired[Source]=true -# single / multiple -# FetchParametersSelectionType[Source]=single -# true / false -# FetchParametersIsRequired[Source]=true -# FetchParameters[...]=string -# FetchParameters[...]=integer -# CustomAttributes[]=node_id -# CustomAttributes[]=desc -# CustomAttributes[]=color -# Name of the custom attribute shown in the editorial interface -# CustomAttributeNames[node_id]=Node ID -# CustomAttributeNames[desc]=Usage -# CustomAttributeNames[color]=Color -# text / checkbox / select / description / string (default) -# CustomAttributeTypes[node_id]=string -# CustomAttributeTypes[desc]=description -# CustomAttributeTypes[color]=select -# CustomAttributeDescription_desc=This selects the color. -# CustomAttributeSelection_color[] -# CustomAttributeSelection_color[blue]=Blue -# CustomAttributeSelection_color[green]=Green -# UseBrowseMode[node_id]=true -# ViewList[]=variation1 -# ViewName[variation1]=Main story 1 -# -# Used by browse mode for manual block, -# possibility to limit block items to specific class -# AllowedClasses[]=article - -[DemoBlock] -Name=Demo Block -ManualAddingOfItems=disabled -CustomAttributes[] -ViewList[]=demoblock -ViewName[demoblock]=Demo Block - -[Manual2Items] -Name=2 items (Manual) -NumberOfValidItems=2 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=2_items1 -ViewList[]=2_items2 -ViewName[2_items1]=2 items (1) -ViewName[2_items2]=2 items (2) - -[Manual3Items] -Name=3 items (Manual) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=3_items1 -ViewList[]=3_items2 -ViewList[]=3_items3 -ViewName[3_items1]=3 items (1) -ViewName[3_items2]=3 items (2) -ViewName[3_items3]=3 items (3 cols) - -[Manual4Items] -Name=4 items (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=4_items1 -ViewList[]=4_items2 -ViewList[]=4_items3 -ViewName[4_items1]=4 items (1) -ViewName[4_items2]=4 items (2) -ViewName[4_items3]=4 items (3) - -[Manual5Items] -Name=5 items (Manual) -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=5_items1 -ViewList[]=5_items2 -ViewName[5_items1]=5 items (1) -ViewName[5_items2]=5 items (2) - -[Dynamic3Items] -Name=3 items (Dynamic) -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestObjects -FetchFixedParameters[Class]=article -FetchFixedParameters[Source]=74 -FetchFixedParameters[Limit]=3 -ViewList[]=3_items1 -ViewName[3_items1]=3 items (1) - -[Gallery] -Name=Gallery (Manual) -NumberOfValidItems=4 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=gallery1 -ViewName[gallery1]=Gallery (1) - -[Video] -Name=Video (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=video -ViewName[video]=Video player - -[ItemList] -Name=Item list -NumberOfValidItems=12 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=itemlist1 -ViewList[]=itemlist2 -ViewList[]=itemlist3 -ViewName[itemlist1]=List (1 col) -ViewName[itemlist2]=List (2 cols) -ViewName[itemlist3]=List (3 cols) - -[MainStory] -Name=Main story (Manual) -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=enabled -ViewList[]=main_story1 -ViewList[]=main_story2 -ViewList[]=main_story3 -ViewName[main_story1]=Main story (1) -ViewName[main_story2]=Main story (2) -ViewName[main_story3]=Main story (3) - -[Banner] -Name=Banner -NumberOfValidItems=1 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -ViewList[]=banner1 -ViewList[]=banner2 -ViewName[banner1]=Banner (medium) -ViewName[banner2]=Banner (small) - -[TagCloud] -Name=Tag cloud -ManualAddingOfItems=disabled -CustomAttributes[]=subtree_node_id -UseBrowseMode[subtree_node_id]=true -ViewList[]=tag_cloud -ViewName[tag_cloud]=Tag cloud - -[Poll] -Name=Poll -ManualAddingOfItems=disabled -CustomAttributes[]=poll_node_id -UseBrowseMode[poll_node_id]=true -ViewList[]=poll -ViewName[poll]=Poll - -[FlashRecorder] -Name=Flash Recorder -NumberOfValidItems=8 -NumberOfArchivedItems=4 -ManualAddingOfItems=enabled -ViewList[]=flash_recorder -ViewName[flash_recorder]=Flash Recorder - -[FeedReader] -Name=Feed reader -ManualAddingOfItems=disabled -CustomAttributes[]=source -CustomAttributes[]=limit -CustomAttributes[]=offset -ViewList[]=feed_reader -ViewName[feed_reader]=Feed reader - -[Keyword] -Name=Keyword -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowKeywordsFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Keywords]=string -FetchParameters[Classes]=string -ViewList[]=keyword -ViewName[keyword]=Keyword - -[GMap] -Name=Google Map -ManualAddingOfItems=disabled -CustomAttributes[]=location -CustomAttributes[]=key -ViewList[]=gmap -ViewName[gmap]=Google Map - -[OnlineUsers] -Name=Online Users -ManualAddingOfItems=disabled -ViewList[]=onlineusers -ViewName[onlineusers]=Online Users - -[MultimediaCarousel] -Name=Multimedia carousel -NumberOfValidItems=5 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowMCFetch -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -ViewList[]=multimediacarousel -ViewName[multimediacarousel]=Multimedia carousel - -[Search] -Name=Search -ManualAddingOfItems=disabled -ViewList[]=search -ViewName[search]=Search - -[Ads] -Name=Advertisement -ManualAddingOfItems=disabled -CustomAttributes[]=code -CustomAttributeTypes[code]=text -ViewList[]=ads -ViewName[ads]=Advertisement - -[LatestContent] -Name=Latest content -NumberOfValidItems=3 -NumberOfArchivedItems=5 -ManualAddingOfItems=disabled -FetchClass=eZFlowLatestContent -FetchParameters[Source]=NodeID -FetchParametersSelectionType[Source]=single -FetchParametersIsRequired[Source]=true -FetchParameters[Classes]=string -FetchFixedParameters[Limit]=3 -ViewList[]=latest_content -ViewName[latest_content]=Latest content - -[TopRated] -Name=Top Rated -ManualAddingOfItems=disabled -CustomAttributes[]=source_node_id -CustomAttributes[]=limit -UseBrowseMode[source_node_id]=true -ViewList[]=toprated -ViewName[toprated]=TopRated - -[GMapItems] -Name=Google Map Items -ManualAddingOfItems=disabled -CustomAttributes[]=parent_node_id -CustomAttributes[]=class -CustomAttributes[]=attribute -CustomAttributes[]=limit -CustomAttributes[]=width -CustomAttributes[]=height -UseBrowseMode[parent_node_id]=true -ViewList[]=geo_located_content -ViewName[geo_located_content]=Geo-Located Content +# Setting file for ezflow blocks as used by the Layout datatype +# A layout is divided into zones and then blocks, take a look in +# zone.ini for zone definitions. + +[General] +#AllowedTypes[]=Example +AllowedTypes[]=DemoBlock +AllowedTypes[]=Manual2Items +AllowedTypes[]=Manual3Items +AllowedTypes[]=Manual4Items +AllowedTypes[]=Manual5Items +AllowedTypes[]=Dynamic3Items +AllowedTypes[]=Gallery +AllowedTypes[]=Video +AllowedTypes[]=ItemList +AllowedTypes[]=MainStory +AllowedTypes[]=Banner +AllowedTypes[]=TagCloud +AllowedTypes[]=Poll +AllowedTypes[]=FlashRecorder +AllowedTypes[]=FeedReader +AllowedTypes[]=Keyword +AllowedTypes[]=GMap +AllowedTypes[]=OnlineUsers +AllowedTypes[]=MultimediaCarousel +AllowedTypes[]=Search +AllowedTypes[]=Ads +AllowedTypes[]=LatestContent +AllowedTypes[]=TopRated +AllowedTypes[]=GMapItems + +[PushToBlock] +# List of content classes using Layout datatype +ContentClasses[]=frontpage +# The subtree node ID from which to fetch objects with Layout datatype +RootSubtree=1 + +#[Example] +# Name of the block type as shown in the editorial interface. +# Name=Fetch Name Shown In Editorial Interface +# How many items are valid, as the new ones are being added, the oldest ones +# are moved to archive (or moved to another block) so that in any moment, +# max. NumberOfValidItems are valid. +# NumberOfValidItems=10 +# NumberOfArchivedItems=5 +# ManualAddingOfItems=disabled +# TTL=86400 +# FetchClass=ezmExample +# FetchFixedParameters[] +# FetchFixedParameters[Class]=article;folder +# FetchFixedParameters[...]=... +# FetchParameters[] +# FetchParametersIsRequired[] +# FetchParameters[Source]=NodeID +# FetchParametersIsRequired[Source]=true +# single / multiple +# FetchParametersSelectionType[Source]=single +# true / false +# FetchParametersIsRequired[Source]=true +# FetchParameters[...]=string +# FetchParameters[...]=integer +# CustomAttributes[]=node_id +# CustomAttributes[]=desc +# CustomAttributes[]=color +# Name of the custom attribute shown in the editorial interface +# CustomAttributeNames[node_id]=Node ID +# CustomAttributeNames[desc]=Usage +# CustomAttributeNames[color]=Color +# text / checkbox / select / description / string (default) +# CustomAttributeTypes[node_id]=string +# CustomAttributeTypes[desc]=description +# CustomAttributeTypes[color]=select +# CustomAttributeDescription_desc=This selects the color. +# CustomAttributeSelection_color[] +# CustomAttributeSelection_color[blue]=Blue +# CustomAttributeSelection_color[green]=Green +# UseBrowseMode[node_id]=true +# ViewList[]=variation1 +# ViewName[variation1]=Main story 1 +# +# Used by browse mode for manual block, +# possibility to limit block items to specific class +# AllowedClasses[]=article + +[DemoBlock] +Name=Demo Block +ManualAddingOfItems=disabled +CustomAttributes[] +ViewList[]=demoblock +ViewName[demoblock]=Demo Block + +[Manual2Items] +Name=2 items (Manual) +NumberOfValidItems=2 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=2_items1 +ViewList[]=2_items2 +ViewName[2_items1]=2 items (1) +ViewName[2_items2]=2 items (2) + +[Manual3Items] +Name=3 items (Manual) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=3_items1 +ViewList[]=3_items2 +ViewList[]=3_items3 +ViewName[3_items1]=3 items (1) +ViewName[3_items2]=3 items (2) +ViewName[3_items3]=3 items (3 cols) + +[Manual4Items] +Name=4 items (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=4_items1 +ViewList[]=4_items2 +ViewList[]=4_items3 +ViewName[4_items1]=4 items (1) +ViewName[4_items2]=4 items (2) +ViewName[4_items3]=4 items (3) + +[Manual5Items] +Name=5 items (Manual) +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=5_items1 +ViewList[]=5_items2 +ViewName[5_items1]=5 items (1) +ViewName[5_items2]=5 items (2) + +[Dynamic3Items] +Name=3 items (Dynamic) +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestObjects +FetchFixedParameters[Class]=article +FetchFixedParameters[Source]=74 +FetchFixedParameters[Limit]=3 +ViewList[]=3_items1 +ViewName[3_items1]=3 items (1) + +[Gallery] +Name=Gallery (Manual) +NumberOfValidItems=4 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=gallery1 +ViewName[gallery1]=Gallery (1) + +[Video] +Name=Video (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=video +ViewName[video]=Video player + +[ItemList] +Name=Item list +NumberOfValidItems=12 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=itemlist1 +ViewList[]=itemlist2 +ViewList[]=itemlist3 +ViewName[itemlist1]=List (1 col) +ViewName[itemlist2]=List (2 cols) +ViewName[itemlist3]=List (3 cols) + +[MainStory] +Name=Main story (Manual) +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=enabled +ViewList[]=main_story1 +ViewList[]=main_story2 +ViewList[]=main_story3 +ViewName[main_story1]=Main story (1) +ViewName[main_story2]=Main story (2) +ViewName[main_story3]=Main story (3) + +[Banner] +Name=Banner +NumberOfValidItems=1 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +ViewList[]=banner1 +ViewList[]=banner2 +ViewName[banner1]=Banner (medium) +ViewName[banner2]=Banner (small) + +[TagCloud] +Name=Tag cloud +ManualAddingOfItems=disabled +CustomAttributes[]=subtree_node_id +UseBrowseMode[subtree_node_id]=true +ViewList[]=tag_cloud +ViewName[tag_cloud]=Tag cloud + +[Poll] +Name=Poll +ManualAddingOfItems=disabled +CustomAttributes[]=poll_node_id +UseBrowseMode[poll_node_id]=true +ViewList[]=poll +ViewName[poll]=Poll + +[FlashRecorder] +Name=Flash Recorder +NumberOfValidItems=8 +NumberOfArchivedItems=4 +ManualAddingOfItems=enabled +ViewList[]=flash_recorder +ViewName[flash_recorder]=Flash Recorder + +[FeedReader] +Name=Feed reader +ManualAddingOfItems=disabled +CustomAttributes[]=source +CustomAttributes[]=limit +CustomAttributes[]=offset +ViewList[]=feed_reader +ViewName[feed_reader]=Feed reader + +[Keyword] +Name=Keyword +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowKeywordsFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Keywords]=string +FetchParameters[Classes]=string +ViewList[]=keyword +ViewName[keyword]=Keyword + +[GMap] +Name=Google Map +ManualAddingOfItems=disabled +CustomAttributes[]=location +CustomAttributes[]=key +ViewList[]=gmap +ViewName[gmap]=Google Map + +[OnlineUsers] +Name=Online Users +ManualAddingOfItems=disabled +ViewList[]=onlineusers +ViewName[onlineusers]=Online Users + +[MultimediaCarousel] +Name=Multimedia carousel +NumberOfValidItems=5 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowMCFetch +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +ViewList[]=multimediacarousel +ViewName[multimediacarousel]=Multimedia carousel + +[Search] +Name=Search +ManualAddingOfItems=disabled +ViewList[]=search +ViewName[search]=Search + +[Ads] +Name=Advertisement +ManualAddingOfItems=disabled +CustomAttributes[]=code +CustomAttributeTypes[code]=text +ViewList[]=ads +ViewName[ads]=Advertisement + +[LatestContent] +Name=Latest content +NumberOfValidItems=3 +NumberOfArchivedItems=5 +ManualAddingOfItems=disabled +FetchClass=eZFlowLatestContent +FetchParameters[Source]=NodeID +FetchParametersSelectionType[Source]=single +FetchParametersIsRequired[Source]=true +FetchParameters[Classes]=string +FetchFixedParameters[Limit]=3 +ViewList[]=latest_content +ViewName[latest_content]=Latest content + +[TopRated] +Name=Top Rated +ManualAddingOfItems=disabled +CustomAttributes[]=source_node_id +CustomAttributes[]=limit +UseBrowseMode[source_node_id]=true +ViewList[]=toprated +ViewName[toprated]=TopRated + +[GMapItems] +Name=Google Map Items +ManualAddingOfItems=disabled +CustomAttributes[]=parent_node_id +CustomAttributes[]=class +CustomAttributes[]=attribute +CustomAttributes[]=limit +CustomAttributes[]=width +CustomAttributes[]=height +UseBrowseMode[parent_node_id]=true +ViewList[]=geo_located_content +ViewName[geo_located_content]=Geo-Located Content