Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1123551
custom
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 2, 9:42 AM
Size
20 KB
Mime Type
text/x-diff
Expires
Thu, Sep 4, 9:42 AM (1 h, 14 m)
Engine
blob
Format
Raw Data
Handle
726685
Attached To
rMCUS Modules.Custom
custom
View Options
Index: branches/1.2.x/units/helpers/helpers_config.php
===================================================================
--- branches/1.2.x/units/helpers/helpers_config.php (revision 16382)
+++ branches/1.2.x/units/helpers/helpers_config.php (revision 16383)
@@ -1,14 +1,13 @@
<?php
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
===================================================================
--- branches/1.2.x/units/widgets/widgets_config.php (revision 16382)
+++ branches/1.2.x/units/widgets/widgets_config.php (revision 16383)
@@ -1,249 +1,243 @@
<?php
/**
* Sample config file for widgets
*
* @author dmitrya
* @package Development Kit
*/
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,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'Hooks' => array(
array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'priority',
'HookToSpecial' => '*',
'HookToEvent' => array('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnModifyPrioritiesConfig',
),
),
// in case, when one method does everything
'RewriteListener' => 'WidgetRewriteListener',
// in case, when building and parsing is done by separate methods
// 'RewriteListener' => Array ('WidgetRewriteBuilder', 'WidgetRewriteParser'),
'IDField' => 'WidgetId',
'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
*/
// used to build editing links in admin grids
'AdminTemplatePath' => 'widgets',
'AdminTemplatePrefix' => 'widget_',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('widget' => '!la_title_AddingWidget!'),
'edit_status_labels' => Array ('widget' => '!la_title_EditingWidget!'),
'new_titlefield' => Array ('widget' => '!la_title_NewWidget!'),
),
'widget_list' => Array (
'prefixes' => Array ('widget_List'), 'format' => '#section_label#',
'toolbar_buttons' => array('new_item', 'edit', 'delete', 'approve', 'decline', 'move_up', 'move_down', 'refresh', 'export', 'import', 'view', 'dbl-click'),
),
'widget_edit' => Array (
'prefixes' => Array ('widget'), 'format' => '#widget_status# - #widget_titlefield#',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array ('main' => 'custom:widgets'),
'Sections' => Array (
'custom:widgets' => Array (
- 'parent' => 'custom',
+ 'parent' => 'custom',
'icon' => 'custom',
'label' => 'la_tab_Widgets',
'url' => Array ('t' => 'custom/widgets/widget_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 1,
'type' => stTREE,
),
),
- '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',
- ),
-
- 'ItemSQLs' => Array (
- '' => 'SELECT %1$s.* %2$s
- FROM %1$s',
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
),
- 'ListSortings' => Array (
+ 'ListSortings' => Array (
'' => Array (
'Sorting' => array('Priority' => 'desc'),
)
),
'CalculatedFields' => array(
'' => array(
'VirtualActionField' => '%1$s.WidgetId',
)
),
- '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,
'required' => 1, 'default' => '', 'not_null' => 1,
),
'Description' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'using_fck' => 1,
'default' => null,
),
'Email' => Array (
'type' => 'string', 'formatter' => 'kFormatter',
'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'sample_value' => 'email@domain.com',
'not_null' => 1, 'default' => '',
'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'),
),
'Type' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
1 => 'la_opt_Default',
2 => 'la_opt_Custom',
),
'not_null' => 1,
'default' => 1,
'required' => 1,
),
'Phone' => Array (
'type' => 'string',
'formatter' => 'kFormatter',
'default' => '', 'using_fck' => 1, 'not_null' => 1),
'Qty' => Array (
'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,
),
'CreatedOn' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter',
'time_format' => '', 'input_time_format' => '',
'default' => '#NOW#',
),
'Good' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Yes', 0 => 'la_No'),
'use_phrases' => 1, 'not_null' => 1, 'default' => 0
),
'BirthTime' => Array (
'type' => 'int', 'formatter' => 'kDateFormatter',
'date_format' => '', 'input_date_format' => '',
'default' => null
),
'Image' => Array (
'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
'file_types' => '*.jpg;*.jpeg;*.gif;*.png;*.bmp', 'files_description' => '!la_hint_ImageFiles!',
'upload_dir' => '/system/user_files/', // relative to project's home
'as_image' => true, 'thumb_format' => 'resize:100x100',
'multiple' => false, // false or max number of files - will be stored as serialized array of paths
'direct_links' => false, // use direct file urls or send files through wrapper (requires mod_mime_magic)
'filename_prefix' => '',
'filename_suffix' => '',
'storage_engine' => StorageEngine::HASH,
'required' => 1, 'default' => null
),
'DataFile' => Array (
'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
'file_types' => '*.*',
'files_description' => '!la_hint_AllFiles!',
'upload_dir' => '/system/user_files/', // relative to project's home
'as_image' => false,
'multiple' => 5, // false or max number of files - will be stored as serialized array of paths
'direct_links' => true, // use direct file urls or send files through wrapper (requires mod_mime_magic)
'default' => null
),
'Priority' => array(
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => array(),
'not_null' => 1, 'default' => 0,
),
),
- 'Grids' => Array (
+ 'Grids' => Array (
'Default' => Array (
'Icons' => array(
'default' => 'icon16_item.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
0 => 'icon16_disabled.png',
'module' => 'core',
),
'Fields' => Array (
'WidgetId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Title' => Array ('title' => 'column:la_fld_Name', 'data_block' => 'grid_custom_td'),
'Image' => Array ('data_block' => 'grid_image_td', 'filter_block' => 'grid_empty_filter', 'width' => 120),
'Type' => Array ('filter_block' => 'grid_options_filter'),
'Status' => Array ('filter_block' => 'grid_options_filter'),
'Good' => Array ('filter_block' => 'grid_like_filter'),
'Qty' => Array ('header_block' => 'grid_column_title_no_sorting', 'filter_block' => 'grid_range_filter'),
'Email' => Array ('filter_block' => 'grid_like_filter'),
'Phone' => Array ('filter_block' => 'grid_like_filter'),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
'Description' => Array ('filter_block' => 'grid_like_filter'),
'VirtualActionField' => Array ('title' => 'column:la_fld_Action', 'data_block' => 'grid_delete_td'),
'Priority' => array('filter_block' => 'grid_options_filter'),
),
),
),
/*'ConfigMapping' => Array (
'PerPage' => 'Perpage_Widgets',
'ShortListPerPage' => 'Perpage_Widgets_Short',
),*/
);
Index: branches/1.2.x/units/sections/sections_config.php
===================================================================
--- branches/1.2.x/units/sections/sections_config.php (revision 16382)
+++ branches/1.2.x/units/sections/sections_config.php (revision 16383)
@@ -1,130 +1,126 @@
<?php
- /**
- * Custom-sections prefix
- *
- * @author dmitrya
- * @package Custom (Development Kit)
- */
-
- defined('FULL_PATH') or die('restricted access!');
-
- $config = Array (
-
- 'Prefix' => 'custom-sections',
-
- 'ConfigPriority' => 2,
-
- # 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'),
-
- # 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 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 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'),
-
- ),
-
- # 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 default edit category template
-// 'categories/categories_edit' => 'custom/categories/categories_edit',
+/**
+ * Custom-sections prefix
+ *
+ * @author dmitrya
+ * @package Custom (Development Kit)
+ */
+
+defined('FULL_PATH') or die('restricted access!');
+
+$config = Array (
+ 'Prefix' => 'custom-sections',
+
+ 'ConfigPriority' => 2,
+
+ # 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'),
+
+ # 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 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 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'),
+ ),
+
+ # 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 default edit category template
+// 'categories/categories_edit' => 'custom/categories/categories_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',
+ ),*/
+
+ # 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',
+ ),*/
+ ),
+
+ '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,
),
- # 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',
- ),*/
-
- # 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',
- ),*/
+ '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,
),
- '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: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
===================================================================
--- branches/1.2.x (revision 16382)
+++ branches/1.2.x (revision 16383)
Property changes on: branches/1.2.x
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
Merged /modules/custom/branches/1.3.x:r15653
Event Timeline
Log In to Comment