Index: branches/1.2.x/units/sections/sections_config.php =================================================================== diff -u -N -r16258 -r16383 --- branches/1.2.x/units/sections/sections_config.php (.../sections_config.php) (revision 16258) +++ branches/1.2.x/units/sections/sections_config.php (.../sections_config.php) (revision 16383) @@ -1,130 +1,126 @@ 'custom-sections', - 'Prefix' => 'custom-sections', + 'ConfigPriority' => 2, - 'ConfigPriority' => 2, + # Event handler class used for HOOKing to existing events (ie. ) + 'EventHandlerClass' => Array ('class' => 'CustomEventHandler', 'file' => 'custom_eh.php', 'build_event' => 'OnBuild'), - # Event handler class used for HOOKing to existing events (ie. ) - 'EventHandlerClass' => Array ('class' => 'CustomEventHandler', 'file' => 'custom_eh.php', 'build_event' => 'OnBuild'), + # Defined to draw new sections (if any) in left nav. tree, normally each unit has it's own Tag Processor + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - # Defined to draw new sections (if any) in left nav. tree, normally each unit has it's own Tag Processor - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), + # Extend/override already existing classes (ie. Event Handlers, Tag Processors, Helpers) + 'RegisterClasses' => Array ( - # Extend/override already existing classes (ie. Event Handlers, Tag Processors, Helpers) - 'RegisterClasses' => Array ( + # extend default User core/units/users/users_tag_processor.php / users_event_handler.php +// Array ('pseudo' => 'u_TagProcessor', 'class' => 'EUserTagProcessor', 'file' => 'users/e_user_tp.php'), +// Array ('pseudo' => 'u_EventHandler', 'class' => 'EUserEventHandler', 'file' => 'users/e_user_eh.php'), - # extend default User core/units/users/users_tag_processor.php / users_event_handler.php -// Array ('pseudo' => 'u_TagProcessor', 'class' => 'EUserTagProcessor', 'file' => 'users/e_user_tp.php'), -// Array ('pseudo' => 'u_EventHandler', 'class' => 'EUserEventHandler', 'file' => 'users/e_user_eh.php'), + # extend default Product classes /in-commerce/units/products/products_tag_processor.php / products_event_handler.php +// Array ('pseudo' => 'p_TagProcessor', 'class' => 'EProductTagProcessor', 'file' => 'products/e_product_tp.php'), +// Array ('pseudo' => 'p_EventHandler', 'class' => 'EProductEventHandler', 'file' => 'products/e_product_eh.php'), - # extend default Product classes /in-commerce/units/products/products_tag_processor.php / products_event_handler.php -// Array ('pseudo' => 'p_TagProcessor', 'class' => 'EProductTagProcessor', 'file' => 'products/e_product_tp.php'), -// Array ('pseudo' => 'p_EventHandler', 'class' => 'EProductEventHandler', 'file' => 'products/e_product_eh.php'), + # extend default Link /in-link/units/links/link_tag_processor.php / links_event_handler.php +// Array ('pseudo' => 'l_TagProcessor', 'class' => 'ELinkTagProcessor', 'file' => 'links/e_link_tp.php'), +// Array ('pseudo' => 'l_EventHandler', 'class' => 'ELinkEventHandler', 'file' => 'links/e_link_eh.php'), - # extend default Link /in-link/units/links/link_tag_processor.php / links_event_handler.php -// Array ('pseudo' => 'l_TagProcessor', 'class' => 'ELinkTagProcessor', 'file' => 'links/e_link_tp.php'), -// Array ('pseudo' => 'l_EventHandler', 'class' => 'ELinkEventHandler', 'file' => 'links/e_link_eh.php'), + # extend default Category /core/units/categories/categories_tag_processor.php / categories_event_handler.php +// Array ('pseudo' => 'c_TagProcessor', 'class' => 'ECategoryTagProcessor', 'file' => 'categories/e_category_tp.php'), +// Array ('pseudo' => 'c_EventHandler', 'class' => 'ECategoryEventHandler', 'file' => 'categories/e_category_eh.php'), - # extend default Category /core/units/categories/categories_tag_processor.php / categories_event_handler.php -// Array ('pseudo' => 'c_TagProcessor', 'class' => 'ECategoryTagProcessor', 'file' => 'categories/e_category_tp.php'), -// Array ('pseudo' => 'c_EventHandler', 'class' => 'ECategoryEventHandler', 'file' => 'categories/e_category_eh.php'), + # extend default Article /in-news/units/articles/article_tag_processor.php / articles_event_handler.php +// Array ('pseudo' => 'n_TagProcessor', 'class' => 'EArticleTagProcessor', 'file' => 'articles/e_article_tp.php'), +// Array ('pseudo' => 'n_EventHandler', 'class' => 'EArticleEventHandler', 'file' => 'articles/e_article_eh.php'), + ), - # extend default Article /in-news/units/articles/article_tag_processor.php / articles_event_handler.php -// Array ('pseudo' => 'n_TagProcessor', 'class' => 'EArticleTagProcessor', 'file' => 'articles/e_article_tp.php'), -// Array ('pseudo' => 'n_EventHandler', 'class' => 'EArticleEventHandler', 'file' => 'articles/e_article_eh.php'), + # Replace/substiture any admin default templates with custom ones + 'ReplacementTemplates' => Array ( + # replace default image block with custom template +// 'incs/image_blocks' => 'custom/incs/image_blocks', - ), + # replace default edit link template +// 'in-links/links/links_edit' => 'custom/links/links_edit', - # Replace/substiture any admin default templates with custom ones - 'ReplacementTemplates' => Array ( - # replace default image block with custom template -// 'incs/image_blocks' => 'custom/incs/image_blocks', + # replace default edit category template +// 'categories/categories_edit' => 'custom/categories/categories_edit', + ), - # replace default edit link template -// 'in-links/links/links_edit' => 'custom/links/links_edit', + # Hooks to events that may call any other events + 'Hooks' => Array ( + # hook to OnAfterCacheRebuild event of "adm" prefix (tiggered when unit cache is rebuild and stored) called + # to override cloned sub-items (ie. register extended classes for cloned unit configs such as n-img, n-rev) + /*Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'adm', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterCacheRebuild'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnOverrideClonedSubItems', + ),*/ - # replace default edit category template -// 'categories/categories_edit' => 'custom/categories/categories_edit', - ), + # hook to category OnAfterConfigRead event called to customize category configuration settings + /*Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'c', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnModifyCategoriesConfig', + ),*/ + ), - # Hooks to events that may call any other events - 'Hooks' => Array ( + 'PermSection' => Array ('main' => 'custom', 'email' => 'custom:configuration_email'), - # hook to OnAfterCacheRebuild event of "adm" prefix (tiggered when unit cache is rebuild and stored) called - # to override cloned sub-items (ie. register extended classes for cloned unit configs such as n-img, n-rev) - /*Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'adm', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterCacheRebuild'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnOverrideClonedSubItems', - ),*/ - - # hook to category OnAfterConfigRead event called to customize category configuration settings - /*Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnModifyCategoriesConfig', - ),*/ + # New sections in left navigation + 'Sections' => Array ( + 'custom' => Array ( + 'parent' => 'in-portal:root', + 'icon' => 'conf_custom', + 'label' => 'la_title_Custom', + 'url' => Array ('t' => 'index', 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 2.4, + 'container' => true, + 'show_mode' => smDEBUG, + 'type' => stTREE, ), - 'PermSection' => Array ('main' => 'custom', 'email' => 'custom:configuration_email'), - - # New sections in left navigation - 'Sections' => Array ( - 'custom' => Array ( - 'parent' => 'in-portal:root', - 'icon' => 'conf_custom', - 'label' => 'la_title_Custom', - 'url' => Array ('t' => 'index', 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 2.4, - 'container' => true, - 'show_mode' => smDEBUG, - 'type' => stTREE, - ), - - 'custom:setting_folder' => Array ( - 'parent' => 'in-portal:system', - 'icon' => 'conf_custom', - 'label' => 'la_title_Custom', - 'use_parent_header' => 1, - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 3.6, - 'container' => true, - 'show_mode' => smDEBUG, - 'type' => stTREE, - ), - - 'custom:configuration_custom' => array( - 'parent' => 'custom:setting_folder', - 'icon' => 'conf_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => array('view', 'edit'), - 'priority' => 50, - 'type' => stTREE, - ), + 'custom:setting_folder' => Array ( + 'parent' => 'in-portal:system', + 'icon' => 'conf_custom', + 'label' => 'la_title_Custom', + 'use_parent_header' => 1, + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 3.6, + 'container' => true, + 'show_mode' => smDEBUG, + 'type' => stTREE, ), - ); + 'custom:configuration_custom' => array( + 'parent' => 'custom:setting_folder', + 'icon' => 'conf_output', + 'label' => 'la_tab_ConfigOutput', + 'url' => array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => array('view', 'edit'), + 'priority' => 50, + 'type' => stTREE, + ), + ), +); Index: branches/1.2.x/units/helpers/helpers_config.php =================================================================== diff -u -N -r15131 -r16383 --- branches/1.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 15131) +++ branches/1.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 16383) @@ -2,13 +2,12 @@ defined('FULL_PATH') or die('restricted access!'); - $config = Array ( +$config = Array ( + 'Prefix' => 'custom-helpers', - 'Prefix' => 'custom-helpers', + 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - - 'RegisterClasses' => Array ( - Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => ''), - ), - ); \ No newline at end of file + 'RegisterClasses' => Array ( + Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => ''), + ), +); \ No newline at end of file Index: branches/1.2.x/units/widgets/widgets_config.php =================================================================== diff -u -N -r16265 -r16383 --- branches/1.2.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 16265) +++ branches/1.2.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 16383) @@ -9,14 +9,13 @@ defined('FULL_PATH') or die('restricted access!'); $config = Array ( + 'Prefix' => 'widget', - 'Prefix' => 'widget', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'WidgetEventHandler', 'file' => 'widget_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'WidgetTagProcessor', 'file' => 'widget_tp.php', 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'WidgetEventHandler', 'file' => 'widget_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'WidgetTagProcessor', 'file' => 'widget_tp.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, @@ -51,11 +50,11 @@ 'StatusField' => Array ('Status'), - 'TableName' => TABLE_PREFIX.'Widgets', + 'TableName' => TABLE_PREFIX.'Widgets', /* - 'ForeignKey' => 'ParentId', // field title in TableName, linking record to a parent - 'ParentTableKey' => 'ParentId', // id (or other key) field title in parent's table + 'ForeignKey' => 'ParentId', // field title in TableName, linking record to a parent + 'ParentTableKey' => 'ParentId', // id (or other key) field title in parent's table 'ParentPrefix' => 'parent', 'AutoDelete' => true, // delete these items when parent is being deleted 'AutoClone' => true, // clone these items when parent is being cloned @@ -87,7 +86,7 @@ 'Sections' => Array ( 'custom:widgets' => Array ( - 'parent' => 'custom', + 'parent' => 'custom', 'icon' => 'custom', 'label' => 'la_tab_Widgets', 'url' => Array ('t' => 'custom/widgets/widget_list', 'pass' => 'm'), @@ -97,20 +96,15 @@ ), ), - 'TitleField' => 'Title', // field, used in bluebar when editing existing item + 'TitleField' => 'Title', // field, used in bluebar when editing existing item // Use %1$s for local table name with prefix, %2$s for calculated fields 'ListSQLs' => Array ( // key - special, value - list select sql - '' => 'SELECT %1$s.* %2$s - FROM %1$s', + '' => ' SELECT %1$s.* %2$s + FROM %1$s', ), - 'ItemSQLs' => Array ( - '' => 'SELECT %1$s.* %2$s - FROM %1$s', - ), - - 'ListSortings' => Array ( + 'ListSortings' => Array ( '' => Array ( 'Sorting' => array('Priority' => 'desc'), ) @@ -122,11 +116,11 @@ ) ), - 'VirtualFields' => Array ( + 'VirtualFields' => Array ( 'VirtualActionField' => Array ('type' => 'string', 'default' => ''), ), - 'Fields' => Array ( + 'Fields' => Array ( 'WidgetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Title' => Array ( 'type' => 'string', 'max_len' => 255, @@ -163,7 +157,7 @@ 'type' => 'double', 'required' => 0, 'not_null' => 1, 'default' => 0 ), - 'Status' => Array ( + 'Status' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2, @@ -215,7 +209,7 @@ ), ), - 'Grids' => Array ( + 'Grids' => Array ( 'Default' => Array ( 'Icons' => array( 'default' => 'icon16_item.png',