Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F805301
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
Thu, Feb 27, 1:40 AM
Size
93 KB
Mime Type
text/x-diff
Expires
Sat, Mar 1, 1:40 AM (39 m, 49 s)
Engine
blob
Format
Raw Data
Handle
577466
Attached To
rMCUS Modules.Custom
custom
View Options
Index: branches/1.2.x/units/widgets/widgets_config.php
===================================================================
--- branches/1.2.x/units/widgets/widgets_config.php (revision 14561)
+++ branches/1.2.x/units/widgets/widgets_config.php (revision 14562)
@@ -1,218 +1,217 @@
<?php
/**
* Sample config file for widgets
*
* @author dmitrya
* @package Development Kit
*/
defined('FULL_PATH') or die('restricted access!');
$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 => 'PerPage',
4 => 'event',
5 => 'mode',
),
// 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',
/*
'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', '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',
'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
// 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'),
)
),
'VirtualFields' => Array (
'VirtualActionField' => Array ('type' => 'string', 'default' => ''),
),
'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 (
'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;*.gif;*.png', '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)
'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
),
),
'Grids' => Array (
'Default' => Array (
// 'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
'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_custom_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'),
'VirtualActionField' => Array ('title' => 'la_col_Action', 'data_block' => 'grid_delete_td'),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Widgets',
'ShortListPerPage' => 'Comm_Perpage_Widgets_Short',
),
);
Index: branches/1.2.x/units/sections/e_link_tp.php
===================================================================
--- branches/1.2.x/units/sections/e_link_tp.php (revision 14561)
+++ branches/1.2.x/units/sections/e_link_tp.php (nonexistent)
@@ -1,28 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * 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;
- }
-
- }
\ No newline at end of file
Property changes on: branches/1.2.x/units/sections/e_link_tp.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_review_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_review_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_review_eh.php (nonexistent)
@@ -1,127 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends/overrides methods of default ReviewsEventHandler class
- *
- */
-
- class EReviewEventHandler extends ReviewsEventHandler {
- /**
- * Makes left join to item's table, when in separate grid
- *
- * @param kEvent $event
- */
- function OnAfterConfigRead(&$event)
- {
- parent::OnAfterConfigRead($event);
-
- // 1. add fields
-// $fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
-// $this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
-
- // 2. calculated fields
-// $calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
-// $this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
- }
-
-
- /**
- * 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);
-
-
- }
-
- }
Property changes on: branches/1.2.x/units/sections/e_review_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_article_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_article_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_article_eh.php (nonexistent)
@@ -1,188 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default ArticlesEventHandler class
- *
- */
- class EArticleEventHandler extends ArticlesEventHandler {
-
- /**
- * Allows to override standard 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-news/units/articles/articles_config.php
- $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
-// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
- $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save fields
-
- # 2. Virtual Fields from /in-news/units/articles/articles_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->isAdminUser) {
-// $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);
-
-
- }
-
- }
Property changes on: branches/1.2.x/units/sections/e_article_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_user_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_user_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_user_eh.php (nonexistent)
@@ -1,188 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default UsersEventHandler class
- *
- */
- class EUserEventHandler extends UsersEventHandler {
-
- /**
- * Allows to override standard 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->isAdminUser) {
-// $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/1.2.x/units/sections/e_user_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_category_tp.php
===================================================================
--- branches/1.2.x/units/sections/e_category_tp.php (revision 14561)
+++ branches/1.2.x/units/sections/e_category_tp.php (nonexistent)
@@ -1,28 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default CategoriesTagProcessor class
- *
- */
- class ECategoryTagProcessor extends CategoriesTagProcessor {
-
- /**
- * 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;
- }
-
- }
Property changes on: branches/1.2.x/units/sections/e_category_tp.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_product_tp.php
===================================================================
--- branches/1.2.x/units/sections/e_product_tp.php (revision 14561)
+++ branches/1.2.x/units/sections/e_product_tp.php (nonexistent)
@@ -1,28 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends/overrides methods of default ProductsTagProcessor class
- *
- */
- class EProductTagProcessor extends ProductsTagProcessor {
-
- /**
- * 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;
- }
-
- }
\ No newline at end of file
Property changes on: branches/1.2.x/units/sections/e_product_tp.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_link_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_link_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_link_eh.php (nonexistent)
@@ -1,188 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default LinksEventHandler class
- *
- */
- class ELinkEventHandler extends LinksEventHandler {
-
- /**
- * Allows to override standard 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-link/units/links/links_config.php
- $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
-// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
- $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->isAdminUser) {
-// $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/1.2.x/units/sections/e_link_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_article_tp.php
===================================================================
--- branches/1.2.x/units/sections/e_article_tp.php (revision 14561)
+++ branches/1.2.x/units/sections/e_article_tp.php (nonexistent)
@@ -1,28 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default ArticlesTagProcessor class
- *
- */
- class EArticleTagProcessor extends ArticlesTagProcessor {
-
- /**
- * 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;
- }
-
- }
Property changes on: branches/1.2.x/units/sections/e_article_tp.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_user_tp.php
===================================================================
--- branches/1.2.x/units/sections/e_user_tp.php (revision 14561)
+++ branches/1.2.x/units/sections/e_user_tp.php (nonexistent)
@@ -1,37 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default UsersTagProcessor class
- *
- */
- class EUserTagProcessor extends UsersTagProcessor {
-
- /**
- * Returns formated user address
- *
- * @param Array
- * @return string
- */
- function PrintFormattedUserAddress($params)
- {
- $object =& $this->getObject($params);
- /* @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/1.2.x/units/sections/e_user_tp.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_category_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_category_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_category_eh.php (nonexistent)
@@ -1,188 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends default CategoriesEventHandler class
- *
- */
- class ECategoryEventHandler extends CategoriesEventHandler {
-
- /**
- * Allows to override standard 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/categories/categories_config.php
- $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
-// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
- $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save fields
-
- # 2. Virtual Fields from /core/units/categories/categories_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->isAdminUser) {
-// $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);
-
-
- }
-
- }
Property changes on: branches/1.2.x/units/sections/e_category_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/e_product_eh.php
===================================================================
--- branches/1.2.x/units/sections/e_product_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/e_product_eh.php (nonexistent)
@@ -1,189 +0,0 @@
-<?php
-
- defined('FULL_PATH') or die('restricted access!');
-
- /**
- * Extends/overrides methods of default ProductsEventHandler class
- *
- */
- class EProductEventHandler extends ProductsEventHandler {
-
- /**
- * Allows to override standard 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'] = STATUS_ACTIVE; #add/edit field configuration (make default = STATUS_ACTIVE)
- $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->isAdminUser) {
-// $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/1.2.x/units/sections/e_product_eh.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/links/e_link_eh.php
===================================================================
--- branches/1.2.x/units/sections/links/e_link_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/links/e_link_eh.php (revision 14562)
@@ -0,0 +1,188 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default LinksEventHandler class
+ *
+ */
+ class ELinkEventHandler extends LinksEventHandler {
+
+ /**
+ * Allows to override standard 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-link/units/links/links_config.php
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
+ $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->isAdminUser) {
+// $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/1.2.x/units/sections/links/e_link_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/links/e_link_tp.php
===================================================================
--- branches/1.2.x/units/sections/links/e_link_tp.php (nonexistent)
+++ branches/1.2.x/units/sections/links/e_link_tp.php (revision 14562)
@@ -0,0 +1,28 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * 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;
+ }
+
+ }
\ No newline at end of file
Property changes on: branches/1.2.x/units/sections/links/e_link_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/users/e_user_eh.php
===================================================================
--- branches/1.2.x/units/sections/users/e_user_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/users/e_user_eh.php (revision 14562)
@@ -0,0 +1,188 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default UsersEventHandler class
+ *
+ */
+ class EUserEventHandler extends UsersEventHandler {
+
+ /**
+ * Allows to override standard 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->isAdminUser) {
+// $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/1.2.x/units/sections/users/e_user_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/users/e_user_tp.php
===================================================================
--- branches/1.2.x/units/sections/users/e_user_tp.php (nonexistent)
+++ branches/1.2.x/units/sections/users/e_user_tp.php (revision 14562)
@@ -0,0 +1,37 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default UsersTagProcessor class
+ *
+ */
+ class EUserTagProcessor extends UsersTagProcessor {
+
+ /**
+ * Returns formated user address
+ *
+ * @param Array
+ * @return string
+ */
+ function PrintFormattedUserAddress($params)
+ {
+ $object =& $this->getObject($params);
+ /* @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/1.2.x/units/sections/users/e_user_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/sections_config.php
===================================================================
--- branches/1.2.x/units/sections/sections_config.php (revision 14561)
+++ branches/1.2.x/units/sections/sections_config.php (revision 14562)
@@ -1,108 +1,108 @@
<?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' => 'e_user_tp.php'),
-// Array ('pseudo' => 'u_EventHandler', 'class' => 'EUserEventHandler', 'file' => 'e_user_eh.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' => 'e_product_tp.php'),
-// Array ('pseudo' => 'p_EventHandler', 'class' => 'EProductEventHandler', 'file' => 'e_product_eh.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' => 'e_link_tp.php'),
-// Array ('pseudo' => 'l_EventHandler', 'class' => 'ELinkEventHandler', 'file' => 'e_link_eh.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' => 'e_category_tp.php'),
-// Array ('pseudo' => 'c_EventHandler', 'class' => 'ECategoryEventHandler', 'file' => 'e_category_eh.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' => 'e_article_tp.php'),
-// Array ('pseudo' => 'n_EventHandler', 'class' => 'EArticleEventHandler', 'file' => 'e_article_eh.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' => 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' => '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,
),
),
);
\ No newline at end of file
Index: branches/1.2.x/units/sections/products/e_product_eh.php
===================================================================
--- branches/1.2.x/units/sections/products/e_product_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/products/e_product_eh.php (revision 14562)
@@ -0,0 +1,189 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends/overrides methods of default ProductsEventHandler class
+ *
+ */
+ class EProductEventHandler extends ProductsEventHandler {
+
+ /**
+ * Allows to override standard 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'] = STATUS_ACTIVE; #add/edit field configuration (make default = STATUS_ACTIVE)
+ $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->isAdminUser) {
+// $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/1.2.x/units/sections/products/e_product_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/products/e_product_tp.php
===================================================================
--- branches/1.2.x/units/sections/products/e_product_tp.php (nonexistent)
+++ branches/1.2.x/units/sections/products/e_product_tp.php (revision 14562)
@@ -0,0 +1,28 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends/overrides methods of default ProductsTagProcessor class
+ *
+ */
+ class EProductTagProcessor extends ProductsTagProcessor {
+
+ /**
+ * 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;
+ }
+
+ }
\ No newline at end of file
Property changes on: branches/1.2.x/units/sections/products/e_product_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/reviews/e_review_eh.php
===================================================================
--- branches/1.2.x/units/sections/reviews/e_review_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/reviews/e_review_eh.php (revision 14562)
@@ -0,0 +1,127 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends/overrides methods of default ReviewsEventHandler class
+ *
+ */
+
+ class EReviewEventHandler extends ReviewsEventHandler {
+ /**
+ * Makes left join to item's table, when in separate grid
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ // 1. add fields
+// $fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+// $this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+
+ // 2. calculated fields
+// $calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
+// $this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
+ }
+
+
+ /**
+ * 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);
+
+
+ }
+
+ }
Property changes on: branches/1.2.x/units/sections/reviews/e_review_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/categories/e_category_eh.php
===================================================================
--- branches/1.2.x/units/sections/categories/e_category_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/categories/e_category_eh.php (revision 14562)
@@ -0,0 +1,188 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default CategoriesEventHandler class
+ *
+ */
+ class ECategoryEventHandler extends CategoriesEventHandler {
+
+ /**
+ * Allows to override standard 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/categories/categories_config.php
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save fields
+
+ # 2. Virtual Fields from /core/units/categories/categories_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->isAdminUser) {
+// $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);
+
+
+ }
+
+ }
Property changes on: branches/1.2.x/units/sections/categories/e_category_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/categories/e_category_tp.php
===================================================================
--- branches/1.2.x/units/sections/categories/e_category_tp.php (nonexistent)
+++ branches/1.2.x/units/sections/categories/e_category_tp.php (revision 14562)
@@ -0,0 +1,28 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default CategoriesTagProcessor class
+ *
+ */
+ class ECategoryTagProcessor extends CategoriesTagProcessor {
+
+ /**
+ * 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;
+ }
+
+ }
Property changes on: branches/1.2.x/units/sections/categories/e_category_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/articles/e_article_tp.php
===================================================================
--- branches/1.2.x/units/sections/articles/e_article_tp.php (nonexistent)
+++ branches/1.2.x/units/sections/articles/e_article_tp.php (revision 14562)
@@ -0,0 +1,28 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default ArticlesTagProcessor class
+ *
+ */
+ class EArticleTagProcessor extends ArticlesTagProcessor {
+
+ /**
+ * 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;
+ }
+
+ }
Property changes on: branches/1.2.x/units/sections/articles/e_article_tp.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/articles/e_article_eh.php
===================================================================
--- branches/1.2.x/units/sections/articles/e_article_eh.php (nonexistent)
+++ branches/1.2.x/units/sections/articles/e_article_eh.php (revision 14562)
@@ -0,0 +1,188 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ /**
+ * Extends default ArticlesEventHandler class
+ *
+ */
+ class EArticleEventHandler extends ArticlesEventHandler {
+
+ /**
+ * Allows to override standard 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-news/units/articles/articles_config.php
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); #get regular fields
+// $fields['Status']['default'] = STATUS_ACTIVE; #add/edit configuration (make default = STATUS_ACTIVE)
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); #save fields
+
+ # 2. Virtual Fields from /in-news/units/articles/articles_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->isAdminUser) {
+// $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);
+
+
+ }
+
+ }
Property changes on: branches/1.2.x/units/sections/articles/e_article_eh.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/units/sections/custom_eh.php
===================================================================
--- branches/1.2.x/units/sections/custom_eh.php (revision 14561)
+++ branches/1.2.x/units/sections/custom_eh.php (revision 14562)
@@ -1,36 +1,36 @@
<?php
defined('FULL_PATH') or die('restricted access!');
/**
* Custom event handler class
*
*/
class CustomEventHandler extends kEventHandler {
/**
* [HOOK] Override cloned sub-items (ie. register extended classes for clones from Reviews, Images)
*
* @param kEvent $event
*/
function OnOverrideClonedSubItems(&$event)
{
# register EReviewEventHandler class as extented from cloned ReviewEventHandler for article reviews ("n" prefix)
-// $this->Application->registerClass('EReviewEventHandler', dirname(__FILE__) . '/e_review_eh.php', 'n-rev_EventHandler');
+// $this->Application->registerClass('EReviewEventHandler', dirname(__FILE__) . '/reviews/e_review_eh.php', 'n-rev_EventHandler');
}
/**
* [HOOK] Modify config stored in "categories_config.php" without extending CategoriesEventHandler class
*
* @param kEvent $event
*/
function OnModifyCategoriesConfig(&$event)
{
# get Fields configuration from /core/units/categories/categories_config.php
$fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields');
# set configuration fields
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Fields', $fields);
}
}
\ No newline at end of file
Index: branches/1.2.x/admin_templates/widgets/widget_edit.tpl
===================================================================
--- branches/1.2.x/admin_templates/widgets/widget_edit.tpl (revision 14561)
+++ branches/1.2.x/admin_templates/widgets/widget_edit.tpl (revision 14562)
@@ -1,90 +1,91 @@
<inp2:adm_SetPopupSize width="750" height="570"/>
+<inp2:m_DefaultParam prefix="widget" grid="Default" title_preset="widget_edit" section="custom:widgets" id_field="WidgetId"/>
+
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="custom:widgets" prefix="widget" title_preset="widget_edit"/>
+<inp2:m_RenderElement name="combined_header" section="$section" prefix="$prefix" title_preset="$title_preset"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
- submit_event('widget','<inp2:widget_SaveEvent/>');
+ submit_event('<inp2:m_Param name="prefix"/>','<inp2:{$prefix}_SaveEvent/>');
}
));
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- cancel_edit('widget','OnCancelEdit','<inp2:widget_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+ cancel_edit('<inp2:m_Param name="prefix"/>','OnCancelEdit','<inp2:{$prefix}_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
));
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
- reset_form('widget', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ reset_form('<inp2:m_Param name="prefix"/>', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
));
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
- go_to_id('widget', '<inp2:widget_PrevId/>');
+ go_to_id('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_PrevId/>');
}
));
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('widget', '<inp2:widget_NextId/>');
+ go_to_id('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_NextId/>');
}
));
a_toolbar.Render();
- <inp2:m_if check="widget_IsSingle" >
+ <inp2:m_if check="{$prefix}_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
- <inp2:m_if check="widget_IsLast" >
+ <inp2:m_if check="{$prefix}_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
- <inp2:m_if check="widget_IsFirst" >
+ <inp2:m_if check="{$prefix}_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
</td>
</tr>
</tbody>
</table>
-<inp2:widget_SaveWarning name="grid_save_warning"/>
-<inp2:widget_ErrorWarning name="form_error_warning"/>
+<inp2:{$prefix}_SaveWarning name="grid_save_warning"/>
+<inp2:{$prefix}_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_Page"/>
- <inp2:m_RenderElement name="inp_id_label" prefix="widget" field="WidgetId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="widget" field="Title" title="la_fld_Title" style="width: 100px"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="widget" field="Good" title="la_fld_Good"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="widget" field="Description" title="la_fld_Description"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="widget" field="Status" title="la_fld_Status"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="widget" field="Type" title="la_fld_Type" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="$prefix" field="$id_field" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Title" title="la_fld_Title" style="width: 100px"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="$prefix" field="Good" title="la_fld_Good"/>
+ <inp2:m_RenderElement name="inp_edit_fck" prefix="$prefix" field="Description" title="la_fld_Description"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="$prefix" field="Status" title="la_fld_Status"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="$prefix" field="Type" title="la_fld_Type" has_empty="1"/>
<!--##
- <inp2:m_RenderElement name="inp_edit_date" prefix="widget" field="CreatedOn" title="la_fld_CreatedOn"/>
- <inp2:m_RenderElement name="inp_edit_time" prefix="widget" field="BirthTime" title="la_fld_BirthTime"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="widget" field="IsSystem" title="la_fld_IsSystemTemplate" onchange="OnSystemClick()"/>
+ <inp2:m_RenderElement name="inp_edit_date" prefix="$prefix" field="CreatedOn" title="la_fld_CreatedOn"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="$prefix" field="IsSystem" title="la_fld_IsSystemTemplate" onchange="OnSystemClick()"/>
##-->
- <inp2:m_RenderElement name="inp_edit_box" prefix="widget" field="Qty" title="la_fld_Qty" style="width: 50px"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="widget" field="Phone" title="la_fld_Phone"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="widget" field="Email" title="la_fld_Email" style="width: 200px"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Qty" title="la_fld_Qty" style="width: 50px"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="$prefix" field="Phone" title="la_fld_Phone"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Email" title="la_fld_Email" style="width: 200px"/>
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="widget" field="Image" title="la_fld_Image"/>
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="widget" field="DataFile" title="la_fld_DataFile"/>
+ <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="Image" title="la_fld_Image"/>
+ <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="DataFile" title="la_fld_DataFile"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/1.2.x/admin_templates/widgets/widget_list.tpl
===================================================================
--- branches/1.2.x/admin_templates/widgets/widget_list.tpl (revision 14561)
+++ branches/1.2.x/admin_templates/widgets/widget_list.tpl (revision 14562)
@@ -1,139 +1,140 @@
-<inp2:m_include t="incs/header" />
+<inp2:m_DefaultParam prefix="widget" grid="Default" title_preset="widget_list" section="custom:widgets" edit_template="custom/widgets/widget_edit" id_field="WidgetId"/>
-<inp2:m_RenderElement name="combined_header" prefix="widget" section="custom:widgets" title_preset="widget_list" pagination="1"/>
+<inp2:m_include t="incs/header" />
+<inp2:m_RenderElement name="combined_header" prefix="$prefix" section="$section" title_preset="$title_preset" 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('sep3') );
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'view',
- '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
- function(id) {
- show_viewmenu(a_toolbar,'view');
- }
- )
- );
+ <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('<inp2:m_Param name="prefix"/>', '<inp2:m_Param name="edit_template"/>')
+ }
+ )
+ );
+
+ function edit() {
+ std_edit_item('<inp2:m_Param name="prefix"/>', '<inp2:m_Param name="edit_template"/>');
+ }
+
+ 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('<inp2:m_Param name="prefix"/>');
+ }
+ )
+ );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'approve',
+ '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
+ function() {
+ submit_event('<inp2:m_Param name="prefix"/>', 'OnMassApprove');
+ }
+ )
+ );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'decline',
+ '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
+ function() {
+ submit_event('<inp2:m_Param name="prefix"/>', '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('<inp2:m_Param name="prefix"/>', '<inp2:m_Param name="grid"/>', 'export/export_progress');
+ }
+ )
+ );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'import',
+ '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>',
+ function() {
+ std_csv_import('<inp2:m_Param name="prefix"/>', '<inp2:m_Param name="grid"/>', 'import/import_start');
+ }
+ )
+ );
+
+ 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>
+ a_toolbar.Render();
+ </script>
</td>
- <inp2:m_RenderElement name="search_main_toolbar" prefix="widget" grid="Default"/>
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="$prefix" grid="$grid"/>
</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?')">Delete</a>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_custom_td">
<a href="<inp2:ItemEditLink/>" title="<inp2:m_Phrase name='la_Text_Edit' no_editing='1'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
</inp2:m_DefineElement>
-<inp2:m_RenderElement name="grid" PrefixSpecial="widget" IdField="WidgetId" grid="Default" max_row_height="100"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="$prefix" IdField="$id_field" grid="$grid" max_row_height="100"/>
<script type="text/javascript">
- Grids['widget'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
+ Grids['<inp2:m_Param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/1.2.x/install/upgrades.php
===================================================================
--- branches/1.2.x/install/upgrades.php (revision 14561)
+++ branches/1.2.x/install/upgrades.php (revision 14562)
@@ -1,50 +1,53 @@
<?php
/**
* @version $Id$
* @package Custom
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$upgrade_class = 'CustomUpgrades';
/**
* Class, that holds all upgrade scripts for "Custom" module
*
*/
class CustomUpgrades extends kUpgradeHelper {
public function __construct()
{
parent::__construct();
$this->dependencies = Array (
'1.0.0' => Array ('Core' => '5.0.0'),
'1.0.1' => Array ('Core' => '5.0.1'),
'1.0.2-B1' => Array ('Core' => '5.0.2-B1'),
'1.0.2-B2' => Array ('Core' => '5.0.2-B2'),
'1.0.2-RC1' => Array ('Core' => '5.0.2-RC1'),
'1.0.2' => Array ('Core' => '5.0.2'),
'1.0.3-B1' => Array ('Core' => '5.0.3-B1'),
'1.0.3-RC1' => Array ('Core' => '5.0.3-RC1'),
'1.0.3' => Array ('Core' => '5.0.3'),
'1.0.4-B1' => Array ('Core' => '5.0.4-B1'),
'1.0.4' => Array ('Core' => '5.0.4'),
'1.1.0-B1' => Array ('Core' => '5.1.0-B1'),
'1.1.0-B2' => Array ('Core' => '5.1.0-B2'),
'1.1.0-RC1' => Array ('Core' => '5.1.0-RC1'),
'1.1.0' => Array ('Core' => '5.1.0'),
'1.1.1-B1' => Array ('Core' => '5.1.1-B1'),
'1.1.1-RC1' => Array ('Core' => '5.1.1-RC1'),
'1.1.1' => Array ('Core' => '5.1.1'),
+ '1.1.2-B1' => Array ('Core' => '5.1.2-B1'),
+ '1.1.2-RC1' => Array ('Core' => '5.1.2-RC1'),
+ '1.1.2' => Array ('Core' => '5.1.2'),
);
}
}
Index: branches/1.2.x/install/upgrades.sql
===================================================================
--- branches/1.2.x/install/upgrades.sql (revision 14561)
+++ branches/1.2.x/install/upgrades.sql (revision 14562)
@@ -1,39 +1,45 @@
# ===== v 1.0.0 =====
# ===== v 1.0.1 =====
UPDATE Modules SET LoadOrder = 10 WHERE `Name` = 'Custom';
# ===== v 1.0.2-B1 =====
ALTER TABLE Widgets CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL;
UPDATE Modules SET TemplatePath = 'custom/' WHERE Name = 'Custom';
# ===== v 1.0.2-B2 =====
# ===== v 1.0.2-RC1 =====
# ===== v 1.0.2 =====
# ===== v 1.0.3-B1 =====
# ===== v 1.0.3-RC1 =====
# ===== v 1.0.3 =====
# ===== v 1.0.4-B1 =====
# ===== v 1.0.4 =====
# ===== v 1.1.0-B1 =====
UPDATE Modules SET Path = 'modules/custom/' WHERE `Name` = 'Custom';
# ===== v 1.1.0-B2 =====
# ===== v 1.1.0-RC1 =====
# ===== v 1.1.0 =====
# ===== v 1.1.1-B1 =====
# ===== v 1.1.1-RC1 =====
-# ===== v 1.1.1 =====
\ No newline at end of file
+# ===== v 1.1.1 =====
+
+# ===== v 1.1.2-B1 =====
+
+# ===== v 1.1.2-RC1 =====
+
+# ===== v 1.1.2 =====
\ No newline at end of file
Index: branches/1.2.x
===================================================================
--- branches/1.2.x (revision 14561)
+++ branches/1.2.x (revision 14562)
Property changes on: branches/1.2.x
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,2 ##
Merged /modules/custom/releases/1.1.2:r14314-14561
Merged /modules/custom/branches/1.1.x:r14078-14313
Event Timeline
Log In to Comment