Page MenuHomeIn-Portal Phabricator

custom
No OneTemporary

File Metadata

Created
Sun, Apr 20, 2:09 AM
Index: branches/RC/custom/units/helpers/test_helper.php
===================================================================
--- branches/RC/custom/units/helpers/test_helper.php (revision 11990)
+++ branches/RC/custom/units/helpers/test_helper.php (nonexistent)
@@ -1,5 +0,0 @@
-<?php
- class TestHelper extends kHelper
- {
-
- }
\ No newline at end of file
Property changes on: branches/RC/custom/units/helpers/test_helper.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.2.1
\ No newline at end of property
Index: branches/RC/custom/units/helpers/sample_helper.php
===================================================================
--- branches/RC/custom/units/helpers/sample_helper.php (nonexistent)
+++ branches/RC/custom/units/helpers/sample_helper.php (revision 11991)
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Sample helper contains methods used in different classes
+ *
+ */
+ class SampleHelper extends kHelper
+ {
+
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/helpers/sample_helper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/RC/custom/units/helpers/helpers_config.php
===================================================================
--- branches/RC/custom/units/helpers/helpers_config.php (revision 11990)
+++ branches/RC/custom/units/helpers/helpers_config.php (revision 11991)
@@ -1,10 +1,12 @@
<?php
$config = Array (
+
'Prefix' => 'custom-helpers',
- 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array ('pseudo' => 'TestHelper', 'class' => 'TestHelper', 'file' => 'test_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
),
);
\ No newline at end of file
Index: branches/RC/custom/units/widgets/widgets_config.php
===================================================================
--- branches/RC/custom/units/widgets/widgets_config.php (revision 11990)
+++ branches/RC/custom/units/widgets/widgets_config.php (revision 11991)
@@ -1,212 +1,187 @@
<?php
/**
* Sample config file for widgets
*
* @author dmitrya
* @package Development Kit
*/
$config = Array(
'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'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
- 'IDField' => 'TestId',
+ 'IDField' => 'WidgetId',
'StatusField' => Array ('Status'),
'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
'ParentPrefix' => 'parent',
'AutoDelete' => true, // delete these items when parent is being deleted
'AutoClone' => true, // clone these items when parent is being cloned
*/
'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_New_Widget!'),
+ 'new_titlefield' => Array ('widget' => '!la_title_NewWidget!'),
),
'widget_list' => Array (
'prefixes' => Array ('widget_List'), 'format' => '#section_label#',
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'import', 'view', 'dbl-click',),
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'export', 'import', 'view', 'dbl-click',),
),
'widget_edit' => Array (
- 'prefixes' => Array ('widget'), 'format' => '#widget_status# #widget_titlefield#',
+ 'prefixes' => Array ('widget'), 'format' => '#widget_status# - #widget_titlefield#',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array('main' => 'custom:widgets'),
- // don't forget to add corresponding permissions to install script
- // INSERT INTO Permissions VALUES (0, 'custom:custom.view', 11, 1, 1, 0);
- // INSERT INTO Permissions VALUES (0, 'custom:widgets.view', 11, 1, 1, 0), (0, 'custom:widgets.add', 11, 1, 1, 0), (0, 'custom:widgets.edit', 11, 1, 1, 0), (0, 'custom:widgets.delete', 11, 1, 1, 0);
'Sections' => Array (
- 'custom:tests' => Array (
+ 'custom:widgets' => Array (
'parent' => 'custom',
'icon' => 'custom:widgets',
'label' => 'la_tab_Widgets',
'url' => Array ('t' => 'custom/widgets/widget_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 1,
'type' => stTREE,
),
),
- 'TitleField' => 'LastName', // 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',
),
'ListSortings' => Array (
'' => Array (
// 'ForcedSorting' => Array ('Priority' => 'desc'),
'Sorting' => Array ('Title' => 'asc'),
)
),
'Fields' => Array (
'WidgetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Title' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => true, 'max_len' => 255),
'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_default_type',
- 2 => 'la_some_type',
- 3 => 'la_another_type',
+ 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 (
'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#', 'not_null' => true),
'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;*.gif;*.png', 'files_description'=>'!la_ImageFiles!',
'upload_dir' => '/system/user_files/', // relative to project's home
'as_image' => true, 'thumb_width' => 100, 'thumb_height' => 100,
'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)
'required' => 1, 'default' => null
),
'DataFile' => Array(
'type' => 'string', 'formatter'=>'kUploadFormatter',
'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
'file_types' => '*.*',
'files_description' => '!la_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
),
),
'Grids' => Array (
'Default' => Array (
// 'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
- 'TestId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Title' => Array ('title' => 'la_col_TestName', 'data_block' => 'grid_delete_td'),
+ 'WidgetId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Title' => Array ('title' => 'la_col_Name', 'data_block' => 'grid_delete_td'),
'Image' => Array ('title' => 'la_col_Image', 'data_block' => 'grid_image_td'),
'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
'Good' => Array ('title' => 'la_col_Good'),
'Qty' => Array ('title' => 'la_col_Qty', 'header_block' => 'grid_column_title_no_sorting', 'filter_block' => 'grid_float_range_filter'),
'Email' => Array ('title' => 'la_col_Email'),
'Phone' => Array ('title' => 'la_col_Phone'),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter'),
'Description' => Array ('title' => 'la_col_Description'),
// 'BirthTime' => Array ('title' => 'la_col_BirthTime', 'filter_block' => 'grid_date_range_filter'),
),
),
),
'ConfigMapping' => Array (
- 'PerPage' => 'Comm_Perpage_Tests',
- 'ShortListPerPage' => 'Comm_Perpage_Tests_Short',
+ 'PerPage' => 'Comm_Perpage_Widgets',
+ 'ShortListPerPage' => 'Comm_Perpage_Widgets_Short',
),
);
-
-/**
-/* DO NOT FORGET TO:
-
-1. Add table create statement to install_schema.sql
- CREATE TABLE Widgets (
- `WidgetId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
- `Title` VARCHAR( 255 ) NOT NULL ,
- `Description` TEXT NULL ,
- `Email` VARCHAR( 255 ) NOT NULL ,
- `Type` TINYINT NOT NULL ,
- `Phone` VARCHAR( 50 ) NOT NULL ,
- `Qty` DOUBLE NOT NULL ,
- `Status` TINYINT NOT NULL ,
- `CreatedOn` INT NOT NULL ,
- `Good` TINYINT NOT NULL
-)
-
-2. Add permissions for admin gorup to install script (see 'Sections' key above)
-
-*/
\ No newline at end of file
Index: branches/RC/custom/units/widgets/widget_eh.php
===================================================================
--- branches/RC/custom/units/widgets/widget_eh.php (revision 11990)
+++ branches/RC/custom/units/widgets/widget_eh.php (revision 11991)
@@ -1,157 +1,167 @@
<?php
/**
* Widgets Event Handler (sample)
*
*/
class WidgetEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
- 'OnCustomEvent' => Array ('self' => true),
+ 'OnCustomEvent' => Array ('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Permission exceptions
*
* @param kEvent $event
*/
function CheckPermission(&$event)
{
-
- $system_events = Array (
+ $skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
);
- if (in_array($event->Name, $system_events)) {
+ if (in_array($event->Name, $skip_permissions_check_events)) {
return true;
}
return parent::CheckPermission($event);
}
+ /**
+ * Set custom query for the list
+ *
+ * @param kEvent $event
+ */
+ function OnCustomEvent(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ }
/**
* Set custom query for the list
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
$object =& $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
if ($event->Special == 'custom-special') {
// $object->addFilter('primary_filter', '%1$s.Status = '.STATUS_DISABLED);
}
}
/**
* Before new item created
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
}
/**
* Before existing item updated
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
}
/**
* Before item deleted
*
* @param kEvent $event
*/
function OnBeforeItemDelete(&$event)
{
parent::OnBeforeItemDelete($event);
}
/**
* After item loaded
*
* @param kEvent $event
*/
function OnBeforeItemLoad(&$event)
{
parent::OnBeforeItemLoad($event);
}
/**
* After new item created
*
* @param kEvent $event
*/
function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
}
/**
* After existing item updated
*
* @param kEvent $event
*/
function OnAfterItemUpdate(&$event)
{
parent::OnAfterItemUpdate($event);
}
/**
* After item deleted
*
* @param kEvent $event
*/
function OnAfterItemDelete(&$event)
{
parent::OnAfterItemDelete($event);
}
/**
* After item loaded
*
* @param kEvent $event
*/
function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
}
}
\ No newline at end of file
Index: branches/RC/custom/units/sections/sections_config.php
===================================================================
--- branches/RC/custom/units/sections/sections_config.php (revision 11990)
+++ branches/RC/custom/units/sections/sections_config.php (revision 11991)
@@ -1,54 +1,90 @@
<?php
- // INSERT INTO `inp_Modules` VALUES ('Custom', 'custom/', 'custom-sections', '5.0.0', 1, 3, 'custom/', 0, 0);
+ /**
+ * Custom-sections prefix
+ *
+ * @author dmitrya
+ * @package Custom (Development Kit)
+ */
$config = Array (
+
'Prefix' => 'custom-sections',
'ConfigPriority' => 2,
- 'EventHandlerClass' => Array ('class' => 'CustomEventHandler', 'file' => 'custom_eh.php', 'build_event' => 'OnBuild'), // for OnAfterConfigRead event
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), // for tree drawing
+ # 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)
'RegisterClasses' => Array (
-// Array ('pseudo' => 'c_TagProcessor', 'class' => 'ECategoriesTagProcessor', 'file' => 'categories_tp.php'),
-// Array ('pseudo' => 'u_EventHandler', 'class' => 'EUsersEventHandler', 'file' => 'users_event_handler.php'),
+
+ # extend default User core/units/users/users_tag_processor.php / users_event_handler.php
+// Array ('pseudo' => 'u_TagProcessor', 'class' => 'EUserTagProcessor', 'file' => 'e_user_tp.php'),
+// Array ('pseudo' => 'u_EventHandler', 'class' => 'EUserEventHandler', 'file' => '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' => 'e_product_tp.php'),
+// Array ('pseudo' => 'p_EventHandler', 'class' => 'EProductEventHandler', 'file' => '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' => 'e_link_tp.php'),
+// Array ('pseudo' => 'l_EventHandler', 'class' => 'ELinkEventHandler', 'file' => 'e_link_eh.php'),
+
),
-// 'ReplacementTemplates' => Array (
+ # 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',
-// 'in-news/articles/articles_edit' => 'custom/articles/articles_edit',
+
+ # 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 (
- /*'Hooks' => Array (
+ # hook to category OnAfterConfigRead event called to customize category configuration settings
Array (
+ /*
'Mode' => hAFTER,
'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' => 'custom',
'label' => 'la_title_In-Custom',
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 2.4,
'container' => true,
'type' => stTREE,
),
+ */
),
);
\ No newline at end of file
Index: branches/RC/custom/units/sections/e_link_eh.php
===================================================================
--- branches/RC/custom/units/sections/e_link_eh.php (nonexistent)
+++ branches/RC/custom/units/sections/e_link_eh.php (revision 11991)
@@ -0,0 +1,187 @@
+<?php
+
+ /**
+ * Extends default LinksEventHandler class
+ *
+ */
+ class ELinkEventHandler extends LinksEventHandler {
+
+ /**
+ * Allows to override standart permission mapping
+ *
+ */
+ function mapPermissions()
+ {
+ parent::mapPermissions();
+
+ $permissions = Array (
+ # admin
+ 'OnCustomEvent1' => Array ('self' => true),
+
+ # front
+ 'OnCustomEvent2' => Array ('self' => true),
+ );
+
+ $this->permMapping = array_merge($this->permMapping, $permissions);
+ }
+
+ /**
+ * Permission exceptions
+ *
+ * @param kEvent $event
+ */
+ function CheckPermission(&$event)
+ {
+ $skip_permissions_check_events = Array (
+ 'OnAnotherCustomEvent',
+ );
+
+ if ( in_array($event->Name, $skip_permissions_check_events) ) {
+ return true;
+ }
+
+ return parent::CheckPermission($event);
+ }
+
+ /**
+ * Updates structure config
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ # 1. Regular Fields from
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = 1; #add/edit configuration (make default = 1)
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save fields
+
+ # 2. Virtual Fields from /in-link/units/links/links_config.php
+ $virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields'); #get virtual fields
+// $virtual_fields['UserName']['default'] = ''; #add/edit configuration
+ $this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields); #save virtual fields
+ }
+
+ /**
+ * Sets custom query for the list
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ # identifying event based on special and setting filter
+ if ( $event->Special == 'custom-special' ) {
+// $object->addFilter('primary_filter', '%1$s.Status = ' . STATUS_DISABLED);
+ }
+
+ # identifying event based not admin condition and setting filter
+ if ( !$this->Application->IsAdmin() ) {
+// $object->addFilter('status_filter', '%1$s.Status = ' . STATUS_ACTIVE);
+ }
+ }
+
+ /**
+ * Before new item created
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+
+ }
+
+ /**
+ * Before existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+
+ }
+
+ /**
+ * Before item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemLoad(&$event)
+ {
+ parent::OnBeforeItemLoad($event);
+
+
+ }
+
+
+ /**
+ * After new item created
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemCreate(&$event)
+ {
+ parent::OnAfterItemCreate($event);
+
+
+ }
+
+ /**
+ * After existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemUpdate(&$event)
+ {
+ parent::OnAfterItemUpdate($event);
+
+
+ }
+
+ /**
+ * After item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemDelete(&$event)
+ {
+ parent::OnAfterItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+
+ }
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_link_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/units/sections/e_user_eh.php
===================================================================
--- branches/RC/custom/units/sections/e_user_eh.php (nonexistent)
+++ branches/RC/custom/units/sections/e_user_eh.php (revision 11991)
@@ -0,0 +1,187 @@
+<?php
+
+ /**
+ * Extends default UsersEventHandler class
+ *
+ */
+ class EUserEventHandler extends UsersEventHandler {
+
+ /**
+ * Allows to override standart permission mapping
+ *
+ */
+ function mapPermissions()
+ {
+ parent::mapPermissions();
+
+ $permissions = Array (
+ # admin
+ 'OnCustomEvent1' => Array ('self' => true),
+
+ # front
+ 'OnCustomEvent2' => Array ('self' => true),
+ );
+
+ $this->permMapping = array_merge($this->permMapping, $permissions);
+ }
+
+ /**
+ * Permission exceptions
+ *
+ * @param kEvent $event
+ */
+ function CheckPermission(&$event)
+ {
+ $skip_permissions_check_events = Array (
+ 'OnAnotherCustomEvent',
+ );
+
+ if ( in_array($event->Name, $skip_permissions_check_events) ) {
+ return true;
+ }
+
+ return parent::CheckPermission($event);
+ }
+
+ /**
+ * Updates structure config
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ # 1. Regular Fields from /core/units/users/users_config.php
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = 1; #add/edit configuration (make default = 1)
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save regular fields
+
+ # 2. Virtual Fields from /core/units/users/users_config.php
+ $virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields'); #get virtual fields
+// $virtual_fields['FullName']['default'] = ''; #add/edit configuration
+ $this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields); #save virtual fields
+ }
+
+ /**
+ * Sets custom query for the list
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ # identifying event based on special and setting filter
+ if ( $event->Special == 'custom-special' ) {
+// $object->addFilter('primary_filter', '%1$s.Status = ' . STATUS_DISABLED);
+ }
+
+ # identifying event based not admin condition and setting filter
+ if ( !$this->Application->IsAdmin() ) {
+// $object->addFilter('status_filter', '%1$s.Status = ' . STATUS_ACTIVE);
+ }
+ }
+
+ /**
+ * Before new item created
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+
+ }
+
+ /**
+ * Before existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+
+ }
+
+ /**
+ * Before item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemLoad(&$event)
+ {
+ parent::OnBeforeItemLoad($event);
+
+
+ }
+
+
+ /**
+ * After new item created
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemCreate(&$event)
+ {
+ parent::OnAfterItemCreate($event);
+
+
+ }
+
+ /**
+ * After existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemUpdate(&$event)
+ {
+ parent::OnAfterItemUpdate($event);
+
+
+ }
+
+ /**
+ * After item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemDelete(&$event)
+ {
+ parent::OnAfterItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+
+ }
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_user_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/units/sections/e_product_eh.php
===================================================================
--- branches/RC/custom/units/sections/e_product_eh.php (nonexistent)
+++ branches/RC/custom/units/sections/e_product_eh.php (revision 11991)
@@ -0,0 +1,188 @@
+<?php
+
+ /**
+ * Extends/overrides methods of default ProductsEventHandler class
+ *
+ */
+ class EProductEventHandler extends ProductsEventHandler {
+
+ /**
+ * Allows to override standart permission mapping
+ *
+ */
+ function mapPermissions()
+ {
+ parent::mapPermissions();
+
+ $permissions = Array (
+ # admin
+ 'OnCustomEvent1' => Array ('self' => true),
+
+ # front
+ 'OnCustomEvent2' => Array ('self' => true),
+ );
+
+ $this->permMapping = array_merge($this->permMapping, $permissions);
+ }
+
+ /**
+ * Permission exceptions
+ *
+ * @param kEvent $event
+ */
+ function CheckPermission(&$event)
+ {
+ $skip_permissions_check_events = Array (
+ 'OnAnotherCustomEvent',
+ );
+
+ if ( in_array($event->Name, $skip_permissions_check_events) ) {
+ return true;
+ }
+
+ return parent::CheckPermission($event);
+ }
+
+ /**
+ * Updates structure config
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ # 1. Regular Fields from /in-commerce/units/products/products_config.php
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = 1; #add/edit field configuration (make default = 1)
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save regular fields
+
+
+ # 2. Virtual Fields from /in-commerce/units/products/products_config.php
+ $virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields'); #get virtual fields
+// $virtual_fields['Qty']['default'] = 1; #add/edit field configuration
+ $this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields); # save virtual fields
+ }
+
+ /**
+ * Sets custom query for the list
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ # identifying event based on special and setting filter
+ if ( $event->Special == 'custom-special' ) {
+// $object->addFilter('primary_filter', '%1$s.Status = '.STATUS_DISABLED);
+ }
+
+ # identifying event based not admin condition and setting filter
+ if ( !$this->Application->IsAdmin() ) {
+// $object->addFilter('status_filter', '%1$s.Status = '.STATUS_ACTIVE);
+ }
+ }
+
+ /**
+ * Before new item created
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+
+ }
+
+ /**
+ * Before existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+
+ }
+
+ /**
+ * Before item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemLoad(&$event)
+ {
+ parent::OnBeforeItemLoad($event);
+
+
+ }
+
+
+ /**
+ * After new item created
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemCreate(&$event)
+ {
+ parent::OnAfterItemCreate($event);
+
+
+ }
+
+ /**
+ * After existing item updated
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemUpdate(&$event)
+ {
+ parent::OnAfterItemUpdate($event);
+
+
+ }
+
+ /**
+ * After item deleted
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemDelete(&$event)
+ {
+ parent::OnAfterItemDelete($event);
+
+
+ }
+
+ /**
+ * After item loaded
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+
+ }
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_product_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/units/sections/e_link_tp.php
===================================================================
--- branches/RC/custom/units/sections/e_link_tp.php (nonexistent)
+++ branches/RC/custom/units/sections/e_link_tp.php (revision 11991)
@@ -0,0 +1,55 @@
+<?php
+
+ /**
+ * Extends default LinkTagProcessor class
+ *
+ */
+ class ELinkTagProcessor extends LinkTagProcessor {
+
+ /**
+ * Adding custom processing to existing Field method
+ *
+ * @param Array $params
+ * @return string
+ */
+ function FormattedField($params)
+ {
+ // get from parent
+ $o = parent::Field($params);
+
+ // do some custom stuff here
+ $o = trim($o);
+
+ return $o;
+ }
+
+ /**
+ * Variantion of overriding Field method for Link
+ *
+ * @param Array $params
+ * @return string
+ */
+ function Field($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $o = '';
+
+ // do some custom stuff here
+ if ( $object->isLoaded() ) {
+ $o = $object->GetField($this->SelectParam($params, 'name,field') ); #field Formatter applied
+
+// $o = $object->GetDBField($this->SelectParam($params, 'name,field') ); #field Formatter NOT applied
+ }
+
+ // in case if no data found
+ if ($o != '') {
+ $this->Application->Parser->DataExists = true;
+ }
+
+ return $o;
+ }
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_link_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/units/sections/e_user_tp.php
===================================================================
--- branches/RC/custom/units/sections/e_user_tp.php (nonexistent)
+++ branches/RC/custom/units/sections/e_user_tp.php (revision 11991)
@@ -0,0 +1,38 @@
+<?php
+
+ /**
+ * Extends default UsersTagProcessor class
+ *
+ */
+ class EUserTagProcessor extends UsersTagProcessor {
+
+
+ /**
+ * Returns formated user address
+ *
+ * @param Array
+ * @return string
+ */
+ function PrintFormattedUserAddress($param)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $ret = '';
+ $newline = '<br/>';
+
+ if ($object->isLoaded()) {
+ $ret = $object->GetField('Street') ? $object->GetField('Street') . $newline : '';
+ $ret .= $object->GetField('Street2') ? $object->GetField('Street2') . $newline : '';
+ $ret .= $object->GetField('City') ? $object->GetField('City') . ', ' : '';
+ $ret .= $object->GetField('State') ? $object->GetField('State') . ' ' : '';
+ $ret .= $object->GetField('Zip') ? $object->GetField('Zip') . $newline : '';
+ $ret .= $object->GetField('Country');
+ }
+
+ return $ret;
+ }
+
+
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_user_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/units/sections/custom_eh.php
===================================================================
--- branches/RC/custom/units/sections/custom_eh.php (revision 11990)
+++ branches/RC/custom/units/sections/custom_eh.php (revision 11991)
@@ -1,39 +1,37 @@
<?php
-
+ /**
+ * Custom event handler class
+ *
+ */
class CustomEventHandler extends kEventHandler {
-
+
/**
* Connection to database
*
* @var kDBConnection
* @access public
*/
var $Conn;
function CustomEventHandler()
{
parent::kEventHandler();
$this->Conn =& $this->Application->GetADODBConnection();
}
-
+
/**
- * [HOOK] Modify config stored in "categories_config.php"
+ * [HOOK] Modify config stored in "categories_config.php" without extending CategoriesEventHandler class
*
* @param kEvent $event
*/
function OnModifyCategoriesConfig(&$event)
{
- $i = 1;
+ # get Fields configuration from /core/units/categories/categories_config.php
$fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields');
-
- while ($i <= ZONE_COUNT) {
- $fields['Zone'.$i] = Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => ''), 'options_sql' => 'SELECT %s FROM phpads_zones ORDER BY zoneid', 'option_key_field' => 'zoneid', 'option_title_field' => 'zonename', 'not_null' => 1, 'default' => 0);
- $i++;
- }
-
+
+ # set configuration fields
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Fields', $fields);
}
- }
-?>
\ No newline at end of file
+ }
\ No newline at end of file
Index: branches/RC/custom/units/sections/e_product_tp.php
===================================================================
--- branches/RC/custom/units/sections/e_product_tp.php (nonexistent)
+++ branches/RC/custom/units/sections/e_product_tp.php (revision 11991)
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Extends/overrides methods of default ProductsTagProcessor class
+ *
+ */
+ class EProductTagProcessor extends ProductsTagProcessor {
+
+
+ /**
+ * Adding custom processing to existing Field method
+ *
+ * @param Array $params
+ * @return string
+ */
+ function Field($params)
+ {
+ $o = parent::Field($params);
+
+ // do some custom stuff here
+ $o = trim($o);
+
+ return $o;
+ }
+
+ }
\ No newline at end of file
Property changes on: branches/RC/custom/units/sections/e_product_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/RC/custom/admin_templates/widgets/widget_list.tpl
===================================================================
--- branches/RC/custom/admin_templates/widgets/widget_list.tpl (revision 11990)
+++ branches/RC/custom/admin_templates/widgets/widget_list.tpl (revision 11991)
@@ -1,114 +1,136 @@
<inp2:m_include t="incs/header" />
<inp2:m_RenderElement name="combined_header" prefix="widget" section="custom:widgets" title_preset="widget_list" pagination="1"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td >
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton(
new ToolBarButton(
'new_item',
'<inp2:m_phrase label="la_ToolTip_NewWidget" escape="1"/>::<inp2:m_phrase label="la_Add" escape="1"/>',
function() {
std_precreate_item('widget', 'custom/widgets/widget_edit')
}
)
);
function edit() {
std_edit_item('widget', 'custom/widgets/widget_edit');
}
a_toolbar.AddButton(
new ToolBarButton(
'edit',
'<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>',
edit
)
);
a_toolbar.AddButton(
new ToolBarButton(
'delete',
'<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('widget');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
+ 'approve',
+ '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
+ function() {
+ submit_event('widget', 'OnMassApprove');
+ }
+ )
+ );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'decline',
+ '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
+ function() {
+ submit_event('widget', 'OnMassDecline');
+ }
+ )
+ );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
'export',
'<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>',
function() {
std_csv_export('widget', 'Default', 'export/export_progress');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'import',
'<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>',
function() {
std_csv_import('widget', 'Default', 'import/import_start');
}
)
);
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton(
new ToolBarButton(
'view',
'<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
function(id) {
show_viewmenu(a_toolbar,'view');
}
)
);
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="widget" grid="Default"/>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<style type="text/css">
.red-row td.Status {
background-color: red;
}
</style>
<inp2:m_DefineElement name="grid_image_td">
<img src="<inp2:Field name='$field' format='resize:120x120'/>" <inp2:Field name='$field' format='resize:120x120;img_size' no_special='1'/> alt=""/><br />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_delete_td">
<a href="<inp2:m_Link {$PrefixSpecial}_event='OnDelete' pass='m,$PrefixSpecial'/>" onclick="return confirm('Delete Record?')"><inp2:Field name="$field"/></a>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="widget" IdField="WidgetId" grid="Default" grid_filters="1" limited_heights="true" max_row_height="100"/>
<script type="text/javascript">
- Grids['widget'].SetDependantToolbarButtons( new Array('edit', 'delete') );
+ Grids['widget'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/RC/custom/install/install_schema.sql
===================================================================
--- branches/RC/custom/install/install_schema.sql (revision 11990)
+++ branches/RC/custom/install/install_schema.sql (revision 11991)
@@ -1,26 +1,27 @@
# place here only sql queries, that were executed on live AND dev sites !!!
-CREATE TABLE Tests (
- TestId int(11) NOT NULL auto_increment,
+
+CREATE TABLE Widgets (
+ WidgetId int(11) NOT NULL auto_increment,
Title varchar(255) NOT NULL default '',
Description text,
Email varchar(255) NOT NULL default '',
`Type` tinyint(4) NOT NULL default '1',
Phone varchar(50) NOT NULL default '',
Qty double NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '2',
CreatedOn int(11) NOT NULL default '0',
Good tinyint(4) NOT NULL default '0',
BirthTime int(10) unsigned default NULL,
`Image` text,
`DataFile` text,
- PRIMARY KEY (TestId)
+ PRIMARY KEY (WidgetId)
);
# ===== SQLs above this line already on LIVE ================================================================================================
# place here only sql queries, that were executed on dev site !!!
# ===== SQLs above this line already on DEV ========================================================================================================
# place here only sql queries, that were executed on prod server !!!
Index: branches/RC/custom/install/upgrades.sql
===================================================================
--- branches/RC/custom/install/upgrades.sql (revision 11990)
+++ branches/RC/custom/install/upgrades.sql (revision 11991)
@@ -1,12 +1,3 @@
-# ===== v 4.1.0 =====
-ALTER TABLE Tests ADD `Image` VARCHAR( 255 ) NULL ;
-ALTER TABLE Tests ADD `DataFile` VARCHAR( 255 ) NULL ;
+# ===== v 1.0.0 =====
-# ===== v 5.0.0 =====
-INSERT INTO Permissions VALUES(DEFAULT, 'custom.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.delete', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.add', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.view', 11, 1, 1, 0);
-
-UPDATE Modules SET Var = 'custom-sections' WHERE Name = 'Custom';
\ No newline at end of file
+# ===== v 1.0.1 =====
\ No newline at end of file
Index: branches/RC/custom/install/english.lang
===================================================================
--- branches/RC/custom/install/english.lang (revision 11990)
+++ branches/RC/custom/install/english.lang (revision 11991)
@@ -1,8 +1,18 @@
<LANGUAGES>
<LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i:s A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><UNITSYSTEM>2</UNITSYSTEM>
<PHRASES>
- <PHRASE Label="la_tab_Tests" Module="Custom" Type="1">U2FtcGxl</PHRASE>
+ <PHRASE Label="la_col_Good" Module="Custom" Type="1">R29vZA==</PHRASE>
+ <PHRASE Label="la_col_Phone" Module="Custom" Type="1">UGhvbmU=</PHRASE>
+ <PHRASE Label="la_fld_DataFile" Module="Custom" Type="1">RGF0YSBmaWxl</PHRASE>
+ <PHRASE Label="la_fld_Good" Module="Custom" Type="1">R29vZA==</PHRASE>
+ <PHRASE Label="la_opt_Custom" Module="Custom" Type="1">Q3VzdG9t</PHRASE>
+ <PHRASE Label="la_opt_Default" Module="Custom" Type="1">RGVmYXVsdA==</PHRASE>
+ <PHRASE Label="la_tab_Widgets" Module="Custom" Type="1">V2lkZ2V0cw==</PHRASE>
+ <PHRASE Label="la_title_AddingWidget" Module="Custom" Type="1">QWRkaW5nIFdpZGdldA==</PHRASE>
+ <PHRASE Label="la_title_EditingWidget" Module="Custom" Type="1">RWRpdGluZyBXaWRnZXQ=</PHRASE>
<PHRASE Label="la_title_In-Custom" Module="Custom" Type="1">Q3VzdG9t</PHRASE>
+ <PHRASE Label="la_title_NewWidget" Module="Custom" Type="1">TmV3IFdpZGdldA==</PHRASE>
+ <PHRASE Label="la_ToolTip_NewWidget" Module="Custom" Type="1">TmV3IFdpZGdldA==</PHRASE>
</PHRASES>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file
Index: branches/RC/custom/install/install_data.sql
===================================================================
--- branches/RC/custom/install/install_data.sql (revision 11990)
+++ branches/RC/custom/install/install_data.sql (revision 11991)
@@ -1,17 +1,19 @@
# place here only sql queries, that were executed on live AND dev sites !!!
+
INSERT INTO Permissions VALUES(DEFAULT, 'custom.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.delete', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.add', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES(DEFAULT, 'custom:tests.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'custom:widgets.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'custom:widgets.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'custom:widgets.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'custom:widgets.view', 11, 1, 1, 0);
INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('Custom', 'custom/', 'custom-sections', '0.0.0', 1, 2, '', 0, '0');
+
# ===== SQLs above this line already on LIVE ================================================================================================
# place here only sql queries, that were executed on dev site !!!
# ===== SQLs above this line already on DEV ========================================================================================================
# place here only sql queries, that were executed on prod server !!!

Event Timeline