Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Apr 19, 1:13 PM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.3.x/core/kernel/utility/formatters/formatters_config.php
===================================================================
--- branches/5.3.x/core/kernel/utility/formatters/formatters_config.php (revision 15658)
+++ branches/5.3.x/core/kernel/utility/formatters/formatters_config.php (revision 15659)
@@ -1,37 +1,37 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'formatters',
+$config = Array (
+ 'Prefix' => 'formatters',
- 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo'=>'kFormatter','class'=>'kFormatter','file'=>'formatter.php','build_event'=>''),
- Array('pseudo'=>'kOptionsFormatter','class'=>'kOptionsFormatter','file'=>'options_formatter.php','build_event'=>''),
- Array('pseudo'=>'kLEFTFormatter','class'=>'kLEFTFormatter','file'=>'left_formatter.php','build_event'=>''),
- Array('pseudo'=>'kDateFormatter','class'=>'kDateFormatter','file'=>'date_formatter.php','build_event'=>''),
- Array('pseudo'=>'kUploadFormatter','class'=>'kUploadFormatter','file'=>'upload_formatter.php','build_event'=>''),
- Array('pseudo'=>'kPictureFormatter','class'=>'kPictureFormatter','file'=>'upload_formatter.php','build_event'=>''),
- Array('pseudo'=>'kMultiLanguage','class'=>'kMultiLanguage','file'=>'multilang_formatter.php','build_event'=>''),
- Array('pseudo'=>'kPasswordFormatter','class'=>'kPasswordFormatter','file'=>'password_formatter.php','build_event'=>''),
- Array('pseudo'=>'kCCDateFormatter','class'=>'kCCDateFormatter','file'=>'ccdate_formatter.php','build_event'=>''),
- Array('pseudo'=>'kUnitFormatter','class'=>'kUnitFormatter','file'=>'unit_formatter.php','build_event'=>''),
- Array('pseudo'=>'kFilesizeFormatter','class'=>'kFilesizeFormatter','file'=>'filesize_formatter.php','build_event'=>''),
- Array('pseudo'=>'kSerializedFormatter','class'=>'kSerializedFormatter','file'=>'serialized_formatter.php','build_event'=>''),
- Array('pseudo'=>'kCustomFieldFormatter','class'=>'kCustomFieldFormatter','file'=>'customfield_formatter.php','build_event'=>''),
- ),
- );
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kFormatter', 'class' => 'kFormatter', 'file' => 'formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kOptionsFormatter', 'class' => 'kOptionsFormatter', 'file' => 'options_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kLEFTFormatter', 'class' => 'kLEFTFormatter', 'file' => 'left_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kDateFormatter', 'class' => 'kDateFormatter', 'file' => 'date_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kUploadFormatter', 'class' => 'kUploadFormatter', 'file' => 'upload_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kPictureFormatter', 'class' => 'kPictureFormatter', 'file' => 'upload_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kMultiLanguage', 'class' => 'kMultiLanguage', 'file' => 'multilang_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kPasswordFormatter', 'class' => 'kPasswordFormatter', 'file' => 'password_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kCCDateFormatter', 'class' => 'kCCDateFormatter', 'file' => 'ccdate_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kUnitFormatter', 'class' => 'kUnitFormatter', 'file' => 'unit_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kFilesizeFormatter', 'class' => 'kFilesizeFormatter', 'file' => 'filesize_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kSerializedFormatter', 'class' => 'kSerializedFormatter', 'file' => 'serialized_formatter.php', 'build_event' => ''),
+ Array ('pseudo' => 'kCustomFieldFormatter', 'class' => 'kCustomFieldFormatter', 'file' => 'customfield_formatter.php', 'build_event' => ''),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/kernel/nparser/nparser_config.php
===================================================================
--- branches/5.3.x/core/kernel/nparser/nparser_config.php (revision 15658)
+++ branches/5.3.x/core/kernel/nparser/nparser_config.php (revision 15659)
@@ -1,25 +1,25 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'nparser',
+$config = Array (
+ 'Prefix' => 'nparser',
- 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo' => 'NParserCompiler', 'class' => 'NParserCompiler', 'file' => 'compiler.php', 'build_event' => ''),
- ),
- );
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'NParserCompiler', 'class' => 'NParserCompiler', 'file' => 'compiler.php', 'build_event' => ''),
+ ),
+);
Index: branches/5.3.x/core/units/priorites/priorites_config.php
===================================================================
--- branches/5.3.x/core/units/priorites/priorites_config.php (revision 15658)
+++ branches/5.3.x/core/units/priorites/priorites_config.php (revision 15659)
@@ -1,45 +1,45 @@
<?php
/**
* @version $Id$
* @package In-Bulletin
* @copyright Copyright (C) 1997 - 2011 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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'priority',
- 'EventHandlerClass' => Array ('class' => 'PriorityEventHandler', 'file' => 'priority_eh.php', 'build_event' => 'OnBuild'),
-
- 'QueryString' => Array (
- 1 => 'prefix',
- 2 => 'event',
+$config = Array (
+ 'Prefix' => 'priority',
+ 'EventHandlerClass' => Array ('class' => 'PriorityEventHandler', 'file' => 'priority_eh.php', 'build_event' => 'OnBuild'),
+
+ 'QueryString' => Array (
+ 1 => 'prefix',
+ 2 => 'event',
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'adm',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnBeforeShutdown'),
+ 'DoPrefix' => 'priority',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnBeforeShutdown',
+ 'Conditional' => false,
),
+ ),
- 'Hooks' => Array (
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnBeforeShutdown'),
- 'DoPrefix' => 'priority',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnBeforeShutdown',
- 'Conditional' => false,
- ),
- ),
-
- 'PermSection' => Array ('main' => 'custom'),
+ 'PermSection' => Array ('main' => 'custom'),
- 'ProcessPrefixes' => Array(
- 'c', 'st', 'promo-block',
- ),
- );
+ 'ProcessPrefixes' => Array (
+ 'c', 'st', 'promo-block',
+ ),
+);
Index: branches/5.3.x/core/units/visits/visits_config.php
===================================================================
--- branches/5.3.x/core/units/visits/visits_config.php (revision 15658)
+++ branches/5.3.x/core/units/visits/visits_config.php (revision 15659)
@@ -1,178 +1,166 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'visits',
- 'ItemClass' => Array ('class' => 'kDBItem','file' => '','build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'VisitsList','file' => 'visits_list.php','build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'VisitsEventHandler','file' => 'visits_event_handler.php','build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'VisitsTagProcessor','file' => 'visits_tag_processor.php','build_event' => 'OnBuild'),
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'Hooks' => Array (
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array ( 'OnStartup' ),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnRegisterVisit',
- ),
-
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ( 'OnAfterLogin' ),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnUserLogin',
- ),
- ),
-
- 'IDField' => 'VisitId',
- 'TableName' => TABLE_PREFIX.'UserVisits',
-
- 'PermSection' => Array ('main' => 'in-portal:visits'),
-
- 'Sections' => Array (
- 'in-portal:visits' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'visits',
- 'label' => 'la_tab_VisitorLog',
- 'url' => Array ('t' => 'logs/visits/visits_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'delete'),
- 'priority' => 6,
- 'type' => stTREE,
- ),
- ),
-
- 'TitlePresets' => Array (
- 'visits_list' => Array (
- 'prefixes' => Array ('visits_List'), 'format' => "!la_title_Visits!",
- 'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
- ),
-
- 'visits.incommerce_list' => Array (
- 'prefixes' => Array ('visits.incommerce_List'), 'format' => "!la_title_Visits!",
- 'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
- ),
- ),
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
- ),
- 'incommerce' => Array (
- 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
- 'AffiliateUser' => 'IF( LENGTH(au.Username),au.Username,\'!la_None!\')',
- 'AffiliatePortalUserId' => 'af.PortalUserId',
- 'OrderTotalAmount' => 'IF(ord.Status = 4, ord.SubTotal+ord.ShippingCost+ord.VAT, 0)',
- 'OrderAffiliateCommission' => 'IF(ord.Status = 4, ord.AffiliateCommission, 0)',
- 'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
- 'OrderId' => 'ord.OrderId',
- ),
- ),
-
- 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId',
- 'incommerce' => '
- SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId
- LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
- LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId
- LEFT JOIN '.TABLE_PREFIX.'Orders ord ON %1$s.VisitId = ord.VisitId',
- ),
-
-
- 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId',
- 'incommerce' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId
- LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
- LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId
- LEFT JOIN '.TABLE_PREFIX.'Orders ord ON %1$s.VisitId = ord.VisitId',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('VisitDate' => 'desc'),
- )
- ),
-
- 'Fields' => Array (
- 'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'VisitDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'custom_filter' => 'date_range', 'default' => NULL),
- 'Referer' => Array ('type' => 'string','not_null' => '1','default' => ''),
- 'IPAddress' => Array ('type' => 'string','not_null' => '1','default' => ''),
- 'AffiliateId' => Array ('type' => 'int','formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field' => 'AffiliateId','left_title_field' => 'Username','not_null'=>1,'default'=>0),
- 'PortalUserId' => Array ('type' => 'int','not_null' => '1','default' => USER_GUEST),
- ),
-
- 'VirtualFields' => Array (
- 'UserName' => Array ('type' => 'string', 'default' => ''),
- 'AffiliateUser' => Array ('type' => 'string', 'default' => ''),
- 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => null),
- 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00', 'totals' => 'SUM'),
- 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
- 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000', 'totals' => 'SUM'),
- 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000'),
- 'OrderNumber' => Array ('type' => 'string', 'default' => ''),
- 'OrderId' => Array ('type' => 'int', 'default' => '0'),
- ),
-
- 'Grids' => Array (
-
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
- 'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'UserName' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- ),
- ),
-
- 'visitsincommerce' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
- 'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'UserName' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'AffiliateUser' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 105, ),
- 'OrderTotalAmountSum' => Array ( 'title' => 'la_col_OrderTotal', 'filter_block' => 'grid_range_filter', 'width' => 95, ),
- 'OrderAffiliateCommissionSum' => Array ( 'title' => 'la_col_Commission', 'filter_block' => 'grid_range_filter', 'width' => 160, ),
- ),
- ),
- ),
-
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'visits',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'VisitsList', 'file' => 'visits_list.php', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'VisitsEventHandler', 'file' => 'visits_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'VisitsTagProcessor', 'file' => 'visits_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'adm',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array ( 'OnStartup' ),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnRegisterVisit',
+ ),
+
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'u',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ( 'OnAfterLogin' ),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnUserLogin',
+ ),
+ ),
+
+ 'IDField' => 'VisitId',
+ 'TableName' => TABLE_PREFIX.'UserVisits',
+
+ 'PermSection' => Array ('main' => 'in-portal:visits'),
+
+ 'Sections' => Array (
+ 'in-portal:visits' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'visits',
+ 'label' => 'la_tab_VisitorLog',
+ 'url' => Array ('t' => 'logs/visits/visits_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'delete'),
+ 'priority' => 6,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitlePresets' => Array (
+ 'visits_list' => Array (
+ 'prefixes' => Array ('visits_List'), 'format' => "!la_title_Visits!",
+ 'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
+ ),
+
+ 'visits.incommerce_list' => Array (
+ 'prefixes' => Array ('visits.incommerce_List'), 'format' => "!la_title_Visits!",
+ 'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
+ ),
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
+ ),
+ 'incommerce' => Array (
+ 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
+ 'AffiliateUser' => 'IF( LENGTH(au.Username),au.Username,\'!la_None!\')',
+ 'AffiliatePortalUserId' => 'af.PortalUserId',
+ 'OrderTotalAmount' => 'IF(ord.Status = 4, ord.SubTotal+ord.ShippingCost+ord.VAT, 0)',
+ 'OrderAffiliateCommission' => 'IF(ord.Status = 4, ord.AffiliateCommission, 0)',
+ 'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
+ 'OrderId' => 'ord.OrderId',
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId',
+ 'incommerce' => '
+ SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId
+ LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
+ LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId
+ LEFT JOIN '.TABLE_PREFIX.'Orders ord ON %1$s.VisitId = ord.VisitId',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('VisitDate' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'VisitDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'custom_filter' => 'date_range', 'default' => NULL),
+ 'Referer' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'IPAddress' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'Username', 'not_null'=>1,'default'=>0),
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => '1', 'default' => USER_GUEST),
+ ),
+
+ 'VirtualFields' => Array (
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliateUser' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => null),
+ 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00', 'totals' => 'SUM'),
+ 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'default' => '0.0000', 'totals' => 'SUM'),
+ 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'default' => '0.0000'),
+ 'OrderNumber' => Array ('type' => 'string', 'default' => ''),
+ 'OrderId' => Array ('type' => 'int', 'default' => '0'),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
+ 'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'UserName' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ ),
+ ),
+
+ 'visitsincommerce' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
+ 'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'UserName' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'AffiliateUser' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 105, ),
+ 'OrderTotalAmountSum' => Array ( 'title' => 'la_col_OrderTotal', 'filter_block' => 'grid_range_filter', 'width' => 95, ),
+ 'OrderAffiliateCommissionSum' => Array ( 'title' => 'la_col_Commission', 'filter_block' => 'grid_range_filter', 'width' => 160, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/thesaurus/thesaurus_config.php
===================================================================
--- branches/5.3.x/core/units/thesaurus/thesaurus_config.php (revision 15658)
+++ branches/5.3.x/core/units/thesaurus/thesaurus_config.php (revision 15659)
@@ -1,111 +1,112 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'thesaurus',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ThesaurusEventHandler', 'file' => 'thesaurus_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ThesaurusTagProcessor', 'file' => 'thesaurus_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'ThesaurusId',
-
- 'TableName' => TABLE_PREFIX.'Thesaurus',
-
- 'TitleField' => 'SearchTerm',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('thesaurus' => '!la_title_AddingThesaurus!'),
- 'edit_status_labels' => Array ('thesaurus' => '!la_title_EditingThesaurus!'),
- ),
-
- 'thesaurus_list' => Array (
- 'prefixes' => Array ('thesaurus_List'), 'format' => "!la_title_Thesaurus!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
- ),
-
- 'thesaurus_edit' => Array (
- 'prefixes' => Array ('thesaurus'), 'format' => "#thesaurus_status# '#thesaurus_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:thesaurus'),
-
- 'Sections' => Array (
- 'in-portal:thesaurus' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_thesaurus',
- 'label' => 'la_title_Thesaurus',
- 'url' => Array('t' => 'thesaurus/thesaurus_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 9,
- 'type' => stTREE,
+$config = Array (
+ 'Prefix' => 'thesaurus',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ThesaurusEventHandler', 'file' => 'thesaurus_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ThesaurusTagProcessor', 'file' => 'thesaurus_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'ThesaurusId',
+
+ 'TableName' => TABLE_PREFIX.'Thesaurus',
+
+ 'TitleField' => 'SearchTerm',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('thesaurus' => '!la_title_AddingThesaurus!'),
+ 'edit_status_labels' => Array ('thesaurus' => '!la_title_EditingThesaurus!'),
+ ),
+
+ 'thesaurus_list' => Array (
+ 'prefixes' => Array ('thesaurus_List'), 'format' => "!la_title_Thesaurus!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
+ ),
+
+ 'thesaurus_edit' => Array (
+ 'prefixes' => Array ('thesaurus'), 'format' => "#thesaurus_status# '#thesaurus_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:thesaurus'),
+
+ 'Sections' => Array (
+ 'in-portal:thesaurus' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_thesaurus',
+ 'label' => 'la_title_Thesaurus',
+ 'url' => Array ('t' => 'thesaurus/thesaurus_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 9,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('SearchTerm' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'ThesaurusId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SearchTerm' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'ThesaurusTerm' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'ThesaurusType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (
+ 0 => 'NT',
+// 1 => 'RT',
+// 2 => 'USE'
),
+ 'not_null' => 1, 'required' => 1, 'default' => 0
),
+ ),
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('SearchTerm' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'ThesaurusId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SearchTerm' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
- 'ThesaurusTerm' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
- 'ThesaurusType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (
- 0 => 'NT',
-// 1 => 'RT',
-// 2 => 'USE'
- ),
- 'not_null' => 1, 'required' => 1, 'default' => 0
- ),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'ThesaurusId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'SearchTerm' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'ThesaurusTerm' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
-// 'ThesaurusType' => Array ('filter_block' => 'grid_options_filter',),
- ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'ThesaurusId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'SearchTerm' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'ThesaurusTerm' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+// 'ThesaurusType' => Array ('filter_block' => 'grid_options_filter',),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/theme_files/theme_files_config.php
===================================================================
--- branches/5.3.x/core/units/theme_files/theme_files_config.php (revision 15658)
+++ branches/5.3.x/core/units/theme_files/theme_files_config.php (revision 15659)
@@ -1,86 +1,88 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'theme-file',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'ThemeFileEventHandler', 'file' => 'theme_file_eh.php', 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'FileId',
-
- 'TitleField' => 'FileName',
-
- 'TableName' => TABLE_PREFIX.'ThemeFiles',
-
- 'ForeignKey' => 'ThemeId',
- 'ParentTableKey' => 'ThemeId',
- 'ParentPrefix' => 'theme',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %s'),
- 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %s'),
-
- 'ListSortings' => Array (
- '' => Array(
- 'Sorting' => Array('FileName' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'FilePath' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'TemplateAlias' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- 'FileType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FileFound' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FileMetaInfo' => Array ('type' => 'string', 'default' => NULL),
- ),
-
- 'VirtualFields' => Array (
- 'FileContents' => Array ('type' => 'string', 'required' => 1, 'default' => ''),
- 'BlockPosition' => Array ('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'FileId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'FileName' => Array ('width' => 150, ),
- 'FilePath' => Array ('width' => 300, ),
- 'Description' => Array ('width' => 300, ),
- ),
-
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'theme-file',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ThemeFileEventHandler', 'file' => 'theme_file_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'FileId',
+
+ 'TitleField' => 'FileName',
+
+ 'TableName' => TABLE_PREFIX.'ThemeFiles',
+
+ 'ForeignKey' => 'ThemeId',
+ 'ParentTableKey' => 'ThemeId',
+ 'ParentPrefix' => 'theme',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %s'
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('FileName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'FilePath' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'TemplateAlias' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'FileType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FileFound' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FileMetaInfo' => Array ('type' => 'string', 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'FileContents' => Array ('type' => 'string', 'required' => 1, 'default' => ''),
+ 'BlockPosition' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'FileId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'FileName' => Array ('width' => 150, ),
+ 'FilePath' => Array ('width' => 300, ),
+ 'Description' => Array ('width' => 300, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/categories/categories_config.php
===================================================================
--- branches/5.3.x/core/units/categories/categories_config.php (revision 15658)
+++ branches/5.3.x/core/units/categories/categories_config.php (revision 15659)
@@ -1,542 +1,543 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'c',
- 'ItemClass' => Array ('class' => 'CategoriesItem', 'file' => 'categories_item.php', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'CategoriesEventHandler', 'file' => 'categories_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'CategoriesTagProcessor', 'file' => 'categories_tag_processor.php', 'build_event' => 'OnBuild'),
-
- 'RegisterClasses' => Array (
- Array ('pseudo' => 'kPermCacheUpdater', 'class' => 'kPermCacheUpdater', 'file' => 'cache_updater.php', 'build_event' => ''),
- ),
-
- 'ConfigPriority' => 0,
- 'Hooks' => Array (
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm', //self
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnRebuildThemes'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnAfterRebuildThemes',
- ),
-
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => 'cdata',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnDefineCustomFields',
- ),
-
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'rel',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCloneSubItem',
- ),
-
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'img',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCloneSubItem',
- ),
- ),
-
- 'AutoLoad' => true,
- 'CatalogItem' => true,
- 'AdminTemplatePath' => 'categories',
- 'AdminTemplatePrefix' => 'categories_',
- 'SearchConfigPostfix' => 'category',
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'AggregateTags' => Array (
- Array (
- 'AggregateTo' => 'm',
- 'AggregatedTagName' => 'CategoryLink',
- 'LocalTagName' => 'CategoryLink',
- ),
- ),
-
- 'IDField' => 'CategoryId',
- 'StatusField' => Array ('Status'), // 'Status'
- 'TitleField' => 'Name',
-
- 'TitlePhrase' => 'la_Text_Category',
- 'ItemType' => 1, // used for custom fields only
-
- 'StatisticsInfo' => Array (
- 'pending' => Array (
- 'icon' => 'icon16_cat_pending.gif',
- 'label' => 'la_tab_Categories',
- 'js_url' => '#url#',
- 'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'c', 'pass' => 'm,c.showall', 'c.showall_event' => 'OnSetFilterPattern', 'c.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_pick=1'),
- 'status' => STATUS_PENDING,
- ),
- ),
-
- 'TableName' => TABLE_PREFIX.'Categories',
- 'CustomDataTableName' => TABLE_PREFIX . 'CategoryCustomData',
-
- 'ViewMenuPhrase' => 'la_text_Categories',
- 'CatalogTabIcon' => 'icon16_sections.png',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('c' => '!la_title_Adding_Category!'),
- 'edit_status_labels' => Array ('c' => '!la_title_Editing_Category!'),
- 'new_titlefield' => Array ('c' => '!la_title_New_Category!'),
- ),
-
- 'category_list' => Array ('prefixes' => Array ('c_List'), 'format' => "!la_title_Categories! (#c_recordcount#)"),
- 'catalog' => Array (
- 'prefixes' => Array (), 'format' => "<span id='category_path'>!la_title_Categories!</span>",
- 'toolbar_buttons' => Array ('select', 'cancel', 'upcat', 'homecat', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'cut', 'copy', 'paste', 'move_up', 'move_down', 'tools', 'view', 'dbl-click')
- ),
-
- 'advanced_view' => Array (
- 'prefixes' => Array (), 'format' => "!la_title_AdvancedView!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'view', 'dbl-click'),
- ),
- 'reviews' => Array (
- 'prefixes' => Array (), 'format' => "!la_title_Reviews!",
- 'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click',)
- ),
-
- 'review_edit' => Array ('prefixes' => Array (), 'format' => "!la_title_Editing_Review!"),
-
- 'categories_edit' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!",
-
- ),
-
- 'categories_properties' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Properties!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'categories_relations' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Relations!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
- ),
-
- 'categories_related_searches' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_RelatedSearches!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'approve', 'decline', 'view', 'dbl-click'),
- ),
-
- 'categories_images' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Images!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'primary_image', 'view', 'dbl-click'),
- ),
-
- 'categories_permissions' => Array (
- 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'categories_custom' => Array ('prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Custom!"),
- 'categories_update' => Array ('prefixes' => Array (), 'format' => "!la_title_UpdatingCategories!"),
-
- 'images_edit' => Array (
- 'prefixes' => Array ('c', 'c-img'),
- 'new_status_labels' => Array ('c-img' => '!la_title_Adding_Image!'),
- 'edit_status_labels' => Array ('c-img' => '!la_title_Editing_Image!'),
- 'new_titlefield' => Array ('c-img' => ''),
- 'format' => "#c_status# '#c_titlefield#' - #c-img_status# '#c-img_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'relations_edit' => Array (
- 'prefixes' => Array ('c', 'c-rel'),
- 'new_status_labels' => Array ('c-rel' => "!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
- 'edit_status_labels' => Array ('c-rel' => '!la_title_Editing_Relationship!'),
- 'format' => "#c_status# '#c_titlefield#' - #c-rel_status#",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'related_searches_edit' => Array (
- 'prefixes' => Array ('c', 'c-search'),
- 'new_status_labels' => Array ('c-search' => "!la_title_Adding_RelatedSearch_Keyword!"),
- 'edit_status_labels' => Array ('c-search' => '!la_title_Editing_RelatedSearch_Keyword!'),
- 'format' => "#c_status# '#c_titlefield#' - #c-search_status#",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'edit_content' => Array ('format' => '!la_EditingContent!'),
- 'tree_site' => Array ('format' => '!la_selecting_categories!'),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'categories/categories_edit', 'priority' => 1),
- 'properties' => Array ('title' => 'la_tab_Properties', 't' => 'categories/categories_edit_properties', 'priority' => 2),
- 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'categories/categories_edit_relations', 'priority' => 3),
- 'related_searches' => Array ('title' => 'la_tab_Related_Searches', 't' => 'categories/categories_edit_related_searches', 'priority' => 4),
- 'images' => Array ('title' => 'la_tab_Images', 't' => 'categories/categories_edit_images', 'priority' => 5),
- 'permissions' => Array ('title' => 'la_tab_Permissions', 't' => 'categories/categories_edit_permissions', 'priority' => 6),
- 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'categories/categories_edit_custom', 'priority' => 7),
- ),
- ),
-
- 'PermItemPrefix' => 'CATEGORY',
-
- 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
-
- 'Sections' => Array (
- 'in-portal:configure_categories' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_output',
- 'label' => 'la_tab_ConfigOutput',
- 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit'),
- 'priority' => 11.1,
- 'type' => stTREE,
- ),
-
- 'in-portal:configuration_search' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_search',
- 'label' => 'la_tab_ConfigSearch',
- 'url' => Array ('t' => 'config/config_search', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 11.2,
- 'type' => stTREE,
- ),
-
- 'in-portal:configuration_custom' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_customfields',
- 'label' => 'la_tab_ConfigCustom',
- 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 11.3,
- 'type' => stTREE,
- ),
- ),
-
- 'FilterMenu' => Array (
- 'Groups' => Array (
- Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
- Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER),
- ),
- 'Filters' => Array (
- 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1'),
- 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '`EditorsPick` != 1'),
- )
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
- LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache ON '.TABLE_PREFIX.'CategoryPermissionsCache.CategoryId = %1$s.CategoryId
- LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryCustomData cust ON %1$s.ResourceId = cust.ResourceId',
- '-virtual' => 'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'SubItems' => Array ('c-rel', 'c-search','c-img', 'c-cdata', 'c-perm', 'content', 'page-revision'),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Priority' => 'desc', 'Name' => 'asc'),
- )
- ),
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
-
- 'AltName' => 'img.AltName',
- 'SameImages' => 'img.SameImages',
- 'LocalThumb' => 'img.LocalThumb',
- 'ThumbPath' => 'img.ThumbPath',
- 'ThumbUrl' => 'img.ThumbUrl',
- 'LocalImage' => 'img.LocalImage',
- 'LocalPath' => 'img.LocalPath',
- 'FullUrl' => 'img.Url',
- ),
- '-virtual' => Array (),
- ),
-
- 'CacheModRewrite' => true,
-
- 'Fields' => Array (
- 'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
- 'Type' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
- 'not_null' => 1,'default' => 1
- ),
- 'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
- 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required' => 1),
- 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'AutomaticFilename' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'default' => 1, 'not_null' => 1,
- ),
- 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
- 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
- 'EditorsPick' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'default' => 0, 'not_null' => 1,
- ),
- 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
- 'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
- 'ResourceId' => Array ('type' => 'int', 'default' => null),
- 'ParentPath' => Array ('type' => 'string', 'default' => null),
- 'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'NamedParentPath' => Array ('type' => 'string', 'default' => null),
- 'NamedParentPathHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
- 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
- 'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'CachedTemplateHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
-
- // fields from Pages
- 'Template' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => ' SELECT CONCAT(tf.Description, " :: ", FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName) ) AS Title,
- IF(tf.TemplateAlias <> "", tf.TemplateAlias, CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName))) AS Value
- FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
- LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
- WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")
- ORDER BY tf.Description ASC, tf.FileName ASC',
- 'option_key_field' => 'Value', 'option_title_field' => 'Title',
- 'error_msgs' => Array (
- 'no_inherit' => '!la_error_NoInheritancePossible!',
- ),
- 'required' => 1, 'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
- ),
-
- 'UseExternalUrl' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'UseMenuIconUrl' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Title' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
- 'MenuTitle' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
- 'MetaTitle' => Array ('type' => 'string', 'default' => null),
- 'IndexTools' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'IsMenu' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'FormId' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => ''),
- 'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
- 'option_key_field' => 'FormId', 'option_title_field' => 'Title',
- 'default' => NULL
- ),
- 'FormSubmittedTemplate' => Array ('type' => 'string', 'default' => null),
- 'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
-
- 'EnablePageCache' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'OverridePageCacheKey' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
- 'LiveRevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'DirectLinkEnabled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
- 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
- 'PromoBlockGroupId' => Array (
- 'type' => 'int',
- 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PromoBlockGroups ORDER BY Title', 'option_title_field' => 'Title', 'option_key_field' => 'PromoBlockGroupId',
- 'not_null' => 1, 'default' => 0,
- ),
- 'RequireSSL' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'RequireLogin' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- ),
-
- 'VirtualFields' => Array (
- 'Relevance' => Array ('type' => 'float', 'default' => 0),
- 'CurrentSort' => Array('type' => 'string', 'default' => ''),
- 'IsNew' => Array('type' => 'int', 'default' => 0),
- 'OldPriority' => Array('type' => 'int', 'default' => 0),
-
- // for primary image
- 'AltName' => Array('type' => 'string', 'default' => ''),
- 'SameImages' => Array('type' => 'string', 'default' => ''),
- 'LocalThumb' => Array('type' => 'string', 'default' => ''),
- 'ThumbPath' => Array('type' => 'string', 'default' => ''),
- 'ThumbUrl' => Array('type' => 'string', 'default' => ''),
- 'LocalImage' => Array('type' => 'string', 'default' => ''),
- 'LocalPath' => Array('type' => 'string', 'default' => ''),
- 'FullUrl' => Array('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array(
- 'Default' => Array (
- 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
- 'default' => 'icon_section.png',
- '1_0_0' => 'icon16_section_system.png', // system
- '1_0_1' => 'icon16_section_system.png', // system
- '1_1_1' => 'icon16_section_system.png', // system
- '0_0_0' => 'icon16_section_disabled.png', // disabled
- '0_0_1' => 'icon16_section_disabled.png', // disabled
- '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
- '0_2_0' => 'icon16_section_pending.png', // pending
- '0_2_1' => 'icon16_section_pending.png', // pending
- 'NEW' => 'icon16_section_new.png', // section is new
- ),
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
- ),
-
- 'Radio' => Array (
- 'Selector' => 'radio',
- 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
- 'default' => 'icon_section.png',
- '1_0_0' => 'icon16_section_system.png', // system
- '1_0_1' => 'icon16_section_system.png', // system
- '1_1_1' => 'icon16_section_system.png', // system
- '0_0_0' => 'icon16_section_disabled.png', // disabled
- '0_0_1' => 'icon16_section_disabled.png', // disabled
- '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
- '0_2_0' => 'icon16_section_pending.png', // pending
- '0_2_1' => 'icon16_section_pending.png', // pending
- 'NEW' => 'icon16_section_new.png', // section is new
- ),
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
- 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
- ),
-
- 'Structure' => Array (
- 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
- 'default' => 'icon_section.png',
- '1_0_0' => 'icon16_section_system.png', // system
- '1_0_1' => 'icon16_section_system.png', // system
- '1_1_1' => 'icon16_section_system.png', // system
- '0_0_0' => 'icon16_section_disabled.png', // disabled
- '0_0_1' => 'icon16_section_disabled.png', // disabled
- '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
- '0_2_0' => 'icon16_section_pending.png', // pending
- '0_2_1' => 'icon16_section_pending.png', // pending
- 'NEW' => 'icon16_section_new.png', // section is new
- ),
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
- 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
- ),
- ),
-
- 'ConfigMapping' => Array (
- 'PerPage' => 'Perpage_Category',
- 'ShortListPerPage' => 'Perpage_Category_Short',
- 'DefaultSorting1Field' => 'Category_Sortfield',
- 'DefaultSorting2Field' => 'Category_Sortfield2',
- 'DefaultSorting1Dir' => 'Category_Sortorder',
- 'DefaultSorting2Dir' => 'Category_Sortorder2',
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'c',
+ 'ItemClass' => Array ('class' => 'CategoriesItem', 'file' => 'categories_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CategoriesEventHandler', 'file' => 'categories_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'CategoriesTagProcessor', 'file' => 'categories_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kPermCacheUpdater', 'class' => 'kPermCacheUpdater', 'file' => 'cache_updater.php', 'build_event' => ''),
+ ),
+
+ 'ConfigPriority' => 0,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'adm', //self
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnRebuildThemes'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnAfterRebuildThemes',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => 'cdata',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnDefineCustomFields',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'rel',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'img',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
+ ),
+
+ 'AutoLoad' => true,
+ 'CatalogItem' => true,
+ 'AdminTemplatePath' => 'categories',
+ 'AdminTemplatePrefix' => 'categories_',
+ 'SearchConfigPostfix' => 'category',
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'AggregateTags' => Array (
+ Array (
+ 'AggregateTo' => 'm',
+ 'AggregatedTagName' => 'CategoryLink',
+ 'LocalTagName' => 'CategoryLink',
+ ),
+ ),
+
+ 'IDField' => 'CategoryId',
+ 'StatusField' => Array ('Status'), // 'Status'
+ 'TitleField' => 'Name',
+
+ 'TitlePhrase' => 'la_Text_Category',
+ 'ItemType' => 1, // used for custom fields only
+
+ 'StatisticsInfo' => Array (
+ 'pending' => Array (
+ 'icon' => 'icon16_cat_pending.gif',
+ 'label' => 'la_tab_Categories',
+ 'js_url' => '#url#',
+ 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'c', 'pass' => 'm,c.showall', 'c.showall_event' => 'OnSetFilterPattern', 'c.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_pick=1'),
+ 'status' => STATUS_PENDING,
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Categories',
+ 'CustomDataTableName' => TABLE_PREFIX . 'CategoryCustomData',
+
+ 'ViewMenuPhrase' => 'la_text_Categories',
+ 'CatalogTabIcon' => 'icon16_sections.png',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('c' => '!la_title_Adding_Category!'),
+ 'edit_status_labels' => Array ('c' => '!la_title_Editing_Category!'),
+ 'new_titlefield' => Array ('c' => '!la_title_New_Category!'),
+ ),
+
+ 'category_list' => Array ('prefixes' => Array ('c_List'), 'format' => "!la_title_Categories! (#c_recordcount#)"),
+ 'catalog' => Array (
+ 'prefixes' => Array (), 'format' => "<span id='category_path'>!la_title_Categories!</span>",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'upcat', 'homecat', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'cut', 'copy', 'paste', 'move_up', 'move_down', 'tools', 'view', 'dbl-click')
+ ),
+
+ 'advanced_view' => Array (
+ 'prefixes' => Array (), 'format' => "!la_title_AdvancedView!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'view', 'dbl-click'),
+ ),
+ 'reviews' => Array (
+ 'prefixes' => Array (), 'format' => "!la_title_Reviews!",
+ 'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click',)
+ ),
+
+ 'review_edit' => Array ('prefixes' => Array (), 'format' => "!la_title_Editing_Review!"),
+
+ 'categories_edit' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!",
+ ),
+
+ 'categories_properties' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Properties!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'categories_relations' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Relations!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
+ ),
+
+ 'categories_related_searches' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_RelatedSearches!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'approve', 'decline', 'view', 'dbl-click'),
+ ),
+
+ 'categories_images' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Images!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'primary_image', 'view', 'dbl-click'),
+ ),
+
+ 'categories_permissions' => Array (
+ 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'categories_custom' => Array ('prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Custom!"),
+ 'categories_update' => Array ('prefixes' => Array (), 'format' => "!la_title_UpdatingCategories!"),
+
+ 'images_edit' => Array (
+ 'prefixes' => Array ('c', 'c-img'),
+ 'new_status_labels' => Array ('c-img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('c-img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('c-img' => ''),
+ 'format' => "#c_status# '#c_titlefield#' - #c-img_status# '#c-img_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'relations_edit' => Array (
+ 'prefixes' => Array ('c', 'c-rel'),
+ 'new_status_labels' => Array ('c-rel' => "!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
+ 'edit_status_labels' => Array ('c-rel' => '!la_title_Editing_Relationship!'),
+ 'format' => "#c_status# '#c_titlefield#' - #c-rel_status#",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'related_searches_edit' => Array (
+ 'prefixes' => Array ('c', 'c-search'),
+ 'new_status_labels' => Array ('c-search' => "!la_title_Adding_RelatedSearch_Keyword!"),
+ 'edit_status_labels' => Array ('c-search' => '!la_title_Editing_RelatedSearch_Keyword!'),
+ 'format' => "#c_status# '#c_titlefield#' - #c-search_status#",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'edit_content' => Array ('format' => '!la_EditingContent!'),
+ 'tree_site' => Array ('format' => '!la_selecting_categories!'),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'categories/categories_edit', 'priority' => 1),
+ 'properties' => Array ('title' => 'la_tab_Properties', 't' => 'categories/categories_edit_properties', 'priority' => 2),
+ 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'categories/categories_edit_relations', 'priority' => 3),
+ 'related_searches' => Array ('title' => 'la_tab_Related_Searches', 't' => 'categories/categories_edit_related_searches', 'priority' => 4),
+ 'images' => Array ('title' => 'la_tab_Images', 't' => 'categories/categories_edit_images', 'priority' => 5),
+ 'permissions' => Array ('title' => 'la_tab_Permissions', 't' => 'categories/categories_edit_permissions', 'priority' => 6),
+ 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'categories/categories_edit_custom', 'priority' => 7),
+ ),
+ ),
+
+ 'PermItemPrefix' => 'CATEGORY',
+
+ 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
+
+ 'Sections' => Array (
+ 'in-portal:configure_categories' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_output',
+ 'label' => 'la_tab_ConfigOutput',
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit'),
+ 'priority' => 11.1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:configuration_search' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_search',
+ 'label' => 'la_tab_ConfigSearch',
+ 'url' => Array ('t' => 'config/config_search', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
+ 'priority' => 11.2,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:configuration_custom' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_customfields',
+ 'label' => 'la_tab_ConfigCustom',
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 11.3,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER),
+ ),
+ 'Filters' => Array (
+ 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1'),
+ 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '`EditorsPick` != 1'),
+ )
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
+ LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache ON '.TABLE_PREFIX.'CategoryPermissionsCache.CategoryId = %1$s.CategoryId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryCustomData cust ON %1$s.ResourceId = cust.ResourceId',
+ '-virtual' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'SubItems' => Array ('c-rel', 'c-search', 'c-img', 'c-cdata', 'c-perm', 'content', 'page-revision'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Priority' => 'desc', 'Name' => 'asc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
+
+ 'AltName' => 'img.AltName',
+ 'SameImages' => 'img.SameImages',
+ 'LocalThumb' => 'img.LocalThumb',
+ 'ThumbPath' => 'img.ThumbPath',
+ 'ThumbUrl' => 'img.ThumbUrl',
+ 'LocalImage' => 'img.LocalImage',
+ 'LocalPath' => 'img.LocalPath',
+ 'FullUrl' => 'img.Url',
+ ),
+ '-virtual' => Array (),
+ ),
+
+ 'CacheModRewrite' => true,
+
+ 'Fields' => Array (
+ 'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
+ 'not_null' => 1,'default' => 1
+ ),
+ 'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
+ 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required' => 1),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'AutomaticFilename' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1,
+ ),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
+ 'EditorsPick' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
+ 'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
+ 'ParentPath' => Array ('type' => 'string', 'default' => null),
+ 'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'NamedParentPath' => Array ('type' => 'string', 'default' => null),
+ 'NamedParentPathHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
+ 'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'CachedTemplateHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
+
+ // fields from Pages
+ 'Template' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT CONCAT(tf.Description, " :: ", FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName) ) AS Title,
+ IF(tf.TemplateAlias <> "", tf.TemplateAlias, CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName))) AS Value
+ FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
+ LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
+ WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")
+ ORDER BY tf.Description ASC, tf.FileName ASC',
+ 'option_key_field' => 'Value', 'option_title_field' => 'Title',
+ 'error_msgs' => Array (
+ 'no_inherit' => '!la_error_NoInheritancePossible!',
+ ),
+ 'required' => 1, 'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
+ ),
+
+ 'UseExternalUrl' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'UseMenuIconUrl' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Title' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
+ 'MenuTitle' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
+ 'MetaTitle' => Array ('type' => 'string', 'default' => null),
+ 'IndexTools' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'IsMenu' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'FormId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => ''),
+ 'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
+ 'option_key_field' => 'FormId', 'option_title_field' => 'Title',
+ 'default' => NULL
+ ),
+ 'FormSubmittedTemplate' => Array ('type' => 'string', 'default' => null),
+ 'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'EnablePageCache' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'OverridePageCacheKey' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'LiveRevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
+ 'PromoBlockGroupId' => Array (
+ 'type' => 'int',
+ 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PromoBlockGroups ORDER BY Title', 'option_title_field' => 'Title', 'option_key_field' => 'PromoBlockGroupId',
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'RequireSSL' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'RequireLogin' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Relevance' => Array ('type' => 'float', 'default' => 0),
+ 'CurrentSort' => Array ('type' => 'string', 'default' => ''),
+ 'IsNew' => Array ('type' => 'int', 'default' => 0),
+ 'OldPriority' => Array ('type' => 'int', 'default' => 0),
+
+ // for primary image
+ 'AltName' => Array ('type' => 'string', 'default' => ''),
+ 'SameImages' => Array ('type' => 'string', 'default' => ''),
+ 'LocalThumb' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbPath' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
+ 'LocalImage' => Array ('type' => 'string', 'default' => ''),
+ 'LocalPath' => Array ('type' => 'string', 'default' => ''),
+ 'FullUrl' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
+ 'default' => 'icon_section.png',
+ '1_0_0' => 'icon16_section_system.png', // system
+ '1_0_1' => 'icon16_section_system.png', // system
+ '1_1_1' => 'icon16_section_system.png', // system
+ '0_0_0' => 'icon16_section_disabled.png', // disabled
+ '0_0_1' => 'icon16_section_disabled.png', // disabled
+ '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
+ '0_2_0' => 'icon16_section_pending.png', // pending
+ '0_2_1' => 'icon16_section_pending.png', // pending
+ 'NEW' => 'icon16_section_new.png', // section is new
+ ),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ ),
+ ),
+
+ 'Radio' => Array (
+ 'Selector' => 'radio',
+ 'Icons' => Array ( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
+ 'default' => 'icon_section.png',
+ '1_0_0' => 'icon16_section_system.png', // system
+ '1_0_1' => 'icon16_section_system.png', // system
+ '1_1_1' => 'icon16_section_system.png', // system
+ '0_0_0' => 'icon16_section_disabled.png', // disabled
+ '0_0_1' => 'icon16_section_disabled.png', // disabled
+ '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
+ '0_2_0' => 'icon16_section_pending.png', // pending
+ '0_2_1' => 'icon16_section_pending.png', // pending
+ 'NEW' => 'icon16_section_new.png', // section is new
+ ),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
+ 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ ),
+ ),
+
+ 'Structure' => Array (
+ 'Icons' => Array ( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
+ 'default' => 'icon_section.png',
+ '1_0_0' => 'icon16_section_system.png', // system
+ '1_0_1' => 'icon16_section_system.png', // system
+ '1_1_1' => 'icon16_section_system.png', // system
+ '0_0_0' => 'icon16_section_disabled.png', // disabled
+ '0_0_1' => 'icon16_section_disabled.png', // disabled
+ '0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
+ '0_2_0' => 'icon16_section_pending.png', // pending
+ '0_2_1' => 'icon16_section_pending.png', // pending
+ 'NEW' => 'icon16_section_new.png', // section is new
+ ),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
+ 'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireSSL' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ ),
+ ),
+ ),
+
+ 'ConfigMapping' => Array (
+ 'PerPage' => 'Perpage_Category',
+ 'ShortListPerPage' => 'Perpage_Category_Short',
+ 'DefaultSorting1Field' => 'Category_Sortfield',
+ 'DefaultSorting2Field' => 'Category_Sortfield2',
+ 'DefaultSorting1Dir' => 'Category_Sortorder',
+ 'DefaultSorting2Dir' => 'Category_Sortorder2',
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/themes/themes_config.php
===================================================================
--- branches/5.3.x/core/units/themes/themes_config.php (revision 15658)
+++ branches/5.3.x/core/units/themes/themes_config.php (revision 15659)
@@ -1,154 +1,158 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'theme',
- 'ItemClass' => Array('class'=>'ThemeItem','file'=>'theme_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ThemesEventHandler','file'=>'themes_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ThemesTagProcessor','file'=>'themes_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'Hooks' => Array(),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'ThemeId',
- 'StatusField' => Array('Enabled', 'PrimaryTheme'),
-
- 'PermSection' => Array('main' => 'in-portal:configure_themes'),
-
- 'Sections' => Array (
- 'in-portal:configure_themes' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_themes',
- 'label' => 'la_tab_Themes',
- 'url' => Array('t' => 'themes/themes_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 5,
- 'type' => stTREE,
- ),
- ),
-
- 'TitleField' => 'Name',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array('theme' => '!la_title_Adding_Theme!'),
- 'edit_status_labels' => Array('theme' => '!la_title_Editing_Theme!'),
- 'new_titlefield' => Array('theme' => '!la_title_NewTheme!'),
- ),
-
- 'themes_list' => Array(
- 'prefixes' => Array('theme_List'), 'format' => "!la_tab_Themes!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'refresh', 'view', 'dbl-click'),
- ),
-
- 'themes_edit_general' => Array(
- 'prefixes' => Array('theme'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_General!",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next'),
- ),
-
- 'themes_edit_files' => Array(
- 'prefixes' => Array('theme', 'theme-file_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles!",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'theme_file_edit' => Array (
- 'prefixes' => Array ('theme', 'theme-file'),
- 'new_status_labels' => Array ('theme-file' => '!la_title_AddingThemeFile!'),
- 'edit_status_labels' => Array ('theme-file' => '!la_title_EditingThemeFile!'),
- 'new_titlefield' => Array ('theme-file' => '!la_title_NewThemeFile!'),
- 'format' => "#theme_status# '#theme_titlefield#' - #theme-file_status# '#theme-file_titlefield#'",
- 'toolbar_buttons' => Array('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
-
- 'block_edit' => Array('prefixes' => Array('theme-file'), 'format' => "!la_title_EditingThemeFile! '#theme-file_titlefield#'"),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'themes/themes_edit', 'priority' => 1),
- 'files' => Array ('title' => 'la_tab_Files', 't' => 'themes/themes_edit_files', 'priority' => 2),
- ),
- ),
-
- 'TableName' => TABLE_PREFIX.'Themes',
- 'SubItems' => Array('theme-file'),
-
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %s'),
-
- 'ListSortings' => Array (
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'ThemeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''),
- 'Enabled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
- ),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'PrimaryTheme' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'CacheTimeout' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'StylesheetId' => Array('type' => 'int', /*'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name',*/ 'not_null' => 1, 'default' => 0),
- 'LanguagePackInstalled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'TemplateAliases' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => 'a:0:{}'),
- 'ImageResizeRules' => Array ('type' => 'string', 'default' => NULL),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- '0_0' => 'icon16_disabled.png',
- '0_1' => 'icon16_disabled.png',
- '1_0' => 'icon16_item.png',
- '1_1' => 'icon16_primary.png',
- ),
- 'Fields' => Array(
- 'ThemeId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
- 'Name' => Array('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Description' => Array('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'Enabled' => Array( 'title'=>'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
-// 'PrimaryTheme' => Array( 'title'=>'column:la_fld_Primary', 'filter_block' => 'grid_options_filter'),
- 'LanguagePackInstalled' => Array ('title' => 'la_col_LanguagePackInstalled', 'filter_block' => 'grid_options_filter', 'width' => 200,),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'theme',
+ 'ItemClass' => Array ('class' => 'ThemeItem', 'file' => 'theme_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ThemesEventHandler', 'file' => 'themes_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ThemesTagProcessor', 'file' => 'themes_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'ThemeId',
+ 'StatusField' => Array ('Enabled', 'PrimaryTheme'),
+
+ 'PermSection' => Array ('main' => 'in-portal:configure_themes'),
+
+ 'Sections' => Array (
+ 'in-portal:configure_themes' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_themes',
+ 'label' => 'la_tab_Themes',
+ 'url' => Array ('t' => 'themes/themes_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 5,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitleField' => 'Name',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('theme' => '!la_title_Adding_Theme!'),
+ 'edit_status_labels' => Array ('theme' => '!la_title_Editing_Theme!'),
+ 'new_titlefield' => Array ('theme' => '!la_title_NewTheme!'),
+ ),
+
+ 'themes_list' => Array (
+ 'prefixes' => Array ('theme_List'), 'format' => "!la_tab_Themes!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'refresh', 'view', 'dbl-click'),
+ ),
+
+ 'themes_edit_general' => Array (
+ 'prefixes' => Array ('theme'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_General!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'themes_edit_files' => Array (
+ 'prefixes' => Array ('theme', 'theme-file_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'theme_file_edit' => Array (
+ 'prefixes' => Array ('theme', 'theme-file'),
+ 'new_status_labels' => Array ('theme-file' => '!la_title_AddingThemeFile!'),
+ 'edit_status_labels' => Array ('theme-file' => '!la_title_EditingThemeFile!'),
+ 'new_titlefield' => Array ('theme-file' => '!la_title_NewThemeFile!'),
+ 'format' => "#theme_status# '#theme_titlefield#' - #theme-file_status# '#theme-file_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+
+ 'block_edit' => Array ('prefixes' => Array ('theme-file'), 'format' => "!la_title_EditingThemeFile! '#theme-file_titlefield#'"),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'themes/themes_edit', 'priority' => 1),
+ 'files' => Array ('title' => 'la_tab_Files', 't' => 'themes/themes_edit_files', 'priority' => 2),
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Themes',
+ 'SubItems' => Array ('theme-file'),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %s'
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'PrimaryTheme' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'CacheTimeout' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'StylesheetId' => Array ('type' => 'int', /*'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name',*/ 'not_null' => 1, 'default' => 0),
+ 'LanguagePackInstalled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'TemplateAliases' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => 'a:0:{}'),
+ 'ImageResizeRules' => Array ('type' => 'string', 'default' => NULL),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ '0_0' => 'icon16_disabled.png',
+ '0_1' => 'icon16_disabled.png',
+ '1_0' => 'icon16_item.png',
+ '1_1' => 'icon16_primary.png',
+ ),
+ 'Fields' => Array (
+ 'ThemeId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+ 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
+// 'PrimaryTheme' => Array ( 'title' => 'column:la_fld_Primary', 'filter_block' => 'grid_options_filter'),
+ 'LanguagePackInstalled' => Array ('title' => 'la_col_LanguagePackInstalled', 'filter_block' => 'grid_options_filter', 'width' => 200,),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/country_states/country_states_config.php
===================================================================
--- branches/5.3.x/core/units/country_states/country_states_config.php (revision 15658)
+++ branches/5.3.x/core/units/country_states/country_states_config.php (revision 15659)
@@ -1,133 +1,134 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2010 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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'country-state',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+$config = Array (
+ 'Prefix' => 'country-state',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
+ 'AutoLoad' => true,
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
- ),
-
- 'IDField' => 'CountryStateId',
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
- 'TableName' => TABLE_PREFIX . 'CountryStates',
+ 'IDField' => 'CountryStateId',
- 'TitleField' => 'Translation',
+ 'TableName' => TABLE_PREFIX . 'CountryStates',
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'),
- 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'),
- ),
-
- 'country_state_list' => Array (
- 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
- ),
+ 'TitleField' => 'Translation',
- 'country_state_edit' => Array (
- 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'),
+ 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'),
),
- 'PermSection' => Array('main' => 'in-portal:country_states'),
-
- 'Sections' => Array (
- 'in-portal:country_states' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_country_states',
- 'label' => 'la_title_CountryStates',
- 'url' => Array('t' => 'country_states/country_state_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 10,
- 'type' => stTREE,
- ),
+ 'country_state_list' => Array (
+ 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
),
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ 'country_state_edit' => Array (
+ 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
+ ),
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'),
- )
- ),
+ 'PermSection' => Array ('main' => 'in-portal:country_states'),
- 'CalculatedFields' => Array (
- '' => Array (
- 'Translation' => '%1$s.l%2$s_Name',
- ),
+ 'Sections' => Array (
+ 'in-portal:country_states' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_country_states',
+ 'label' => 'la_title_CountryStates',
+ 'url' => Array ('t' => 'country_states/country_state_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 10,
+ 'type' => stTREE,
),
+ ),
- 'Fields' => Array (
- 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
- 'Type' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => 1
- ),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'),
+ )
+ ),
- 'StateCountryId' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, CountryStateId
- FROM ' . TABLE_PREFIX . 'CountryStates
- WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
- ORDER BY Name',
- 'option_key_field' => 'CountryStateId', 'option_title_field' => 'Name',
- 'default' => NULL
- ),
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Translation' => '%1$s.l%2$s_Name',
+ ),
+ ),
- 'Name' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'unique' => Array ('Type', 'StateCountryId'), 'required' => 1, 'default' => ''),
- 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 1
),
- 'VirtualFields' => Array (
- 'Translation' => Array ('type' => 'string', 'default' => ''),
+ 'StateCountryId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, CountryStateId
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY Name',
+ 'option_key_field' => 'CountryStateId', 'option_title_field' => 'Name',
+ 'default' => NULL
),
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'CountryStateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'IsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'StateCountryId' => Array ('title' => 'column:la_fld_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
- 'ShortIsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 125, ),
- ),
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+
+ 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'unique' => Array ('Type', 'StateCountryId'), 'required' => 1, 'default' => ''),
+ 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'IsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'StateCountryId' => Array ('title' => 'column:la_fld_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
+ 'ShortIsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 125, ),
),
),
- );
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/sections/sections_config.php
===================================================================
--- branches/5.3.x/core/units/sections/sections_config.php (revision 15658)
+++ branches/5.3.x/core/units/sections/sections_config.php (revision 15659)
@@ -1,248 +1,248 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'core-sections',
- 'EventHandlerClass' => Array ('class' => 'SiteConfigEventHandler', 'file' => 'site_config_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'SiteConfigTagProcessor', 'file' => 'site_config_tp.php', 'build_event' => 'OnBuild'),
-
- 'Hooks' => Array (
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => '*',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnApplySiteConfigChanges',
- ),
- ),
-
- 'Sections' => Array (
- 'in-portal:site' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'struct',
- 'label' => 'la_tab_Site_Structure',
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 1,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'c',
- ),
-
- 'in-portal:browse_site' => Array(
- 'parent' => 'in-portal:site',
- 'icon' => 'browse-site',
- 'label' => 'la_tab_BrowsePages',
- 'url' => Array('t' => 'index', 'index_file' => '../index.php', 'admin' => 1, 'pass' => 'm'),
- 'permissions' => Array('view'),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:browse' => Array (
- 'parent' => 'in-portal:site',
- 'icon' => 'structure', // 'catalog'
- 'label' => 'la_title_Structure', // 'la_tab_Browse',
- 'url' => Array ('t' => 'catalog/catalog', 'pass' => 'm'),
- 'late_load' => Array ('t' => 'categories/xml/tree_categories', 'pass' => 'm', 'm_cat_id' => 0),
- 'onclick' => 'checkCatalog(0)',
- 'permissions' => Array ('view'),
- 'priority' => 2,
- 'type' => stTREE,
- ),
-
- 'in-portal:reviews' => Array (
- 'parent' => 'in-portal:site',
- 'icon' => 'reviews',
- 'label' => 'la_tab_Reviews',
- 'url' => Array ('t' => 'reviews/reviews', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 3.5,
- 'type' => stTREE,
- ),
-
- 'in-portal:users' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'user_management',
- 'label' => 'la_tab_Community',
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 3,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'u',
- ),
-
- 'in-portal:user_groups' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'usergroups',
- 'label' => 'la_tab_User_Groups',
- 'url' => Array ('t' => 'groups/groups_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:send_email', 'advanced:manage_permissions'),
- 'SectionPrefix' => 'g',
- 'priority' => 3,
- 'type' => stTREE,
- ),
-
- // "Help" section
- /*
- 'in-portal:help' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'help',
- 'label' => 'la_tab_Help',
- 'url' => Array ('index_file' => 'help/manual.pdf', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 7,
- 'type' => stTREE,
- ),
- */
-
- // "Summary & Logs" section
- 'in-portal:reports' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'summary_logs',
- 'label' => 'la_tab_Reports',
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 4,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'adm',
- ),
-
- /*'in-portal:log_summary' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'summary',
- 'label' => 'la_tab_Summary',
- 'url' => Array ('index_file' => 'logs/summary.php', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 1,
- 'type' => stTREE,
- ),*/
-
- // "Configuration" section
- 'in-portal:system' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'conf',
- 'label' => 'la_tab_Sys_Config',
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 5,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'adm',
- ),
-
- 'in-portal:website_setting_folder' => Array (
- 'parent' => 'in-portal:system',
- 'icon' => 'conf_website',
- 'label' => 'la_title_Website',
- 'use_parent_header' => 1,
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 1,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'adm',
- ),
-
- 'in-portal:configure_general' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_general',
- 'label' => 'la_tab_General',
- 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit'),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:configure_advanced' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_advanced',
- 'label' => 'la_title_Advanced',
- 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit'),
- 'priority' => 2,
- 'type' => stTREE,
- ),
-
- // "Tools" section
- 'in-portal:tools' => Array (
- 'parent' => 'in-portal:root',
- 'icon' => 'tools',
- 'label' => 'la_tab_Tools',
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 6,
- 'container' => true,
- 'type' => stTREE,
- 'SectionPrefix' => 'adm',
- ),
-
- 'in-portal:backup' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'backup',
- 'label' => 'la_tab_Backup',
- 'url' => Array ('t' => 'tools/backup1', 'section' => 'in-portal:configure_general', 'module' => 'In-Portal', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:restore' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'restore',
- 'label' => 'la_tab_Restore',
- 'url' => Array ('t' => 'tools/restore1', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 2,
- 'type' => stTREE,
- ),
-
- 'in-portal:main_import' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'import_data',
- 'label' => 'la_tab_ImportData',
- 'url' => Array ('t' => 'tools/import1'),
- 'permissions' => Array ('view'),
- 'priority' => 3,
- 'type' => stTREE,
- ),
-
- 'in-portal:sql_query' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'query_database',
- 'label' => 'la_tab_QueryDB',
- 'url' => Array ('t' => 'tools/sql_query', 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 4,
- 'type' => stTREE,
- ),
-
- 'in-portal:server_info' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'server_info',
- 'label' => 'la_tab_ServerInfo',
- 'url' => Array ('t' => 'tools/server_info', 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 5,
- 'type' => stTREE,
- ),
+$config = Array (
+ 'Prefix' => 'core-sections',
+ 'EventHandlerClass' => Array ('class' => 'SiteConfigEventHandler', 'file' => 'site_config_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'SiteConfigTagProcessor', 'file' => 'site_config_tp.php', 'build_event' => 'OnBuild'),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => '*',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnApplySiteConfigChanges',
),
- );
\ No newline at end of file
+ ),
+
+ 'Sections' => Array (
+ 'in-portal:site' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'struct',
+ 'label' => 'la_tab_Site_Structure',
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 1,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'c',
+ ),
+
+ 'in-portal:browse_site' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'browse-site',
+ 'label' => 'la_tab_BrowsePages',
+ 'url' => Array ('t' => 'index', 'index_file' => '../index.php', 'admin' => 1, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:browse' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'structure', // 'catalog'
+ 'label' => 'la_title_Structure', // 'la_tab_Browse',
+ 'url' => Array ('t' => 'catalog/catalog', 'pass' => 'm'),
+ 'late_load' => Array ('t' => 'categories/xml/tree_categories', 'pass' => 'm', 'm_cat_id' => 0),
+ 'onclick' => 'checkCatalog(0)',
+ 'permissions' => Array ('view'),
+ 'priority' => 2,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:reviews' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'reviews',
+ 'label' => 'la_tab_Reviews',
+ 'url' => Array ('t' => 'reviews/reviews', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 3.5,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:users' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'user_management',
+ 'label' => 'la_tab_Community',
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 3,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'u',
+ ),
+
+ 'in-portal:user_groups' => Array (
+ 'parent' => 'in-portal:users',
+ 'icon' => 'usergroups',
+ 'label' => 'la_tab_User_Groups',
+ 'url' => Array ('t' => 'groups/groups_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:send_email', 'advanced:manage_permissions'),
+ 'SectionPrefix' => 'g',
+ 'priority' => 3,
+ 'type' => stTREE,
+ ),
+
+ // "Help" section
+ /*
+ 'in-portal:help' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'help',
+ 'label' => 'la_tab_Help',
+ 'url' => Array ('index_file' => 'help/manual.pdf', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 7,
+ 'type' => stTREE,
+ ),
+ */
+
+ // "Summary & Logs" section
+ 'in-portal:reports' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'summary_logs',
+ 'label' => 'la_tab_Reports',
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 4,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'adm',
+ ),
+
+ /*'in-portal:log_summary' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'summary',
+ 'label' => 'la_tab_Summary',
+ 'url' => Array ('index_file' => 'logs/summary.php', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),*/
+
+ // "Configuration" section
+ 'in-portal:system' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'conf',
+ 'label' => 'la_tab_Sys_Config',
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 5,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'adm',
+ ),
+
+ 'in-portal:website_setting_folder' => Array (
+ 'parent' => 'in-portal:system',
+ 'icon' => 'conf_website',
+ 'label' => 'la_title_Website',
+ 'use_parent_header' => 1,
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 1,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'adm',
+ ),
+
+ 'in-portal:configure_general' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_general',
+ 'label' => 'la_tab_General',
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit'),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:configure_advanced' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_advanced',
+ 'label' => 'la_title_Advanced',
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit'),
+ 'priority' => 2,
+ 'type' => stTREE,
+ ),
+
+ // "Tools" section
+ 'in-portal:tools' => Array (
+ 'parent' => 'in-portal:root',
+ 'icon' => 'tools',
+ 'label' => 'la_tab_Tools',
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 6,
+ 'container' => true,
+ 'type' => stTREE,
+ 'SectionPrefix' => 'adm',
+ ),
+
+ 'in-portal:backup' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'backup',
+ 'label' => 'la_tab_Backup',
+ 'url' => Array ('t' => 'tools/backup1', 'section' => 'in-portal:configure_general', 'module' => 'In-Portal', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:restore' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'restore',
+ 'label' => 'la_tab_Restore',
+ 'url' => Array ('t' => 'tools/restore1', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 2,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:main_import' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'import_data',
+ 'label' => 'la_tab_ImportData',
+ 'url' => Array ('t' => 'tools/import1'),
+ 'permissions' => Array ('view'),
+ 'priority' => 3,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:sql_query' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'query_database',
+ 'label' => 'la_tab_QueryDB',
+ 'url' => Array ('t' => 'tools/sql_query', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:server_info' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'server_info',
+ 'label' => 'la_tab_ServerInfo',
+ 'url' => Array ('t' => 'tools/server_info', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 5,
+ 'type' => stTREE,
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/skins/skins_config.php
===================================================================
--- branches/5.3.x/core/units/skins/skins_config.php (revision 15658)
+++ branches/5.3.x/core/units/skins/skins_config.php (revision 15659)
@@ -1,183 +1,181 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'skin',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'SkinEventHandler','file'=>'skin_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
-
- 'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
+$config = Array (
+ 'Prefix' => 'skin',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'SkinEventHandler', 'file' => 'skin_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Hooks' => Array (
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'skin',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnSave'),
+ 'HookToEvent' => Array ('OnSave'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCompileStylesheet',
),
),
- 'QueryString' => Array(
+
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
- 'IDField' => 'SkinId',
- 'StatusField' => Array('IsPrimary'),
- 'TableName' => TABLE_PREFIX.'AdminSkins',
+
+ 'IDField' => 'SkinId',
+ 'StatusField' => Array ('IsPrimary'),
+ 'TableName' => TABLE_PREFIX.'AdminSkins',
/*
'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('skin'=>'!la_title_AddingSkin!'),
- 'edit_status_labels' => Array('skin'=>'!la_title_EditingSkin!'),
- 'new_titlefield' => Array('skin'=>''),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('skin' => '!la_title_AddingSkin!'),
+ 'edit_status_labels' => Array ('skin' => '!la_title_EditingSkin!'),
+ 'new_titlefield' => Array ('skin' => ''),
),
- 'skin_list'=>Array(
- 'prefixes' => Array('skin_List'),
- 'format' => '!la_tab_Skins!',
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'clone', 'view', 'dbl-click'),
+ 'skin_list'=>Array (
+ 'prefixes' => Array ('skin_List'),
+ 'format' => '!la_tab_Skins!',
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'clone', 'view', 'dbl-click'),
),
- 'skin_edit'=>Array(
- 'prefixes' => Array('skin'),
- 'format' => '#skin_status# #skin_titlefield#',
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ 'skin_edit'=>Array (
+ 'prefixes' => Array ('skin'),
+ 'format' => '#skin_status# #skin_titlefield#',
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
- 'PermSection' => Array('main' => 'in-portal:skins'),
+ 'PermSection' => Array ('main' => 'in-portal:skins'),
- // 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, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0);
- 'Sections' => Array(
- 'in-portal:skins' => Array(
- 'parent' => 'in-portal:tools',
- 'icon' => 'admin_skins',
- 'label' => 'la_tab_Skins',
- 'url' => Array('t' => 'skins/skin_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 7,
-// 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
+ 'Sections' => Array (
+ 'in-portal:skins' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'admin_skins',
+ 'label' => 'la_tab_Skins',
+ 'url' => Array ('t' => 'skins/skin_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 7,
+// 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
),
),
- 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+ 'TitleField' => 'Name', // 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('Name' => 'asc'),
+ 'ListSQLs' => Array ( // key - special, value - list select sql
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+// 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
+
'Fields' => Array (
'SkinId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'default' => NULL),
'CSS' => Array ('type' => 'string', 'default' => NULL),
- 'Logo' => Array(
- 'type'=>'string', 'formatter'=>'kUploadFormatter',
+ 'Logo' => Array (
+ 'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size'=>MAX_UPLOAD_SIZE, // in Bytes !
- 'file_types'=>'*.jpg;*.gif;*.png', 'files_description'=>'!la_hint_ImageFiles!',
+ 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'upload_dir' => WRITEBALE_BASE . '/user_files/', // relative to project's home
'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)
'default' => null,
),
- 'LogoBottom' => Array(
- 'type'=>'string', 'formatter'=>'kUploadFormatter',
+ 'LogoBottom' => Array (
+ 'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size'=>MAX_UPLOAD_SIZE, // in Bytes !
- 'file_types'=>'*.jpg;*.gif;*.png', 'files_description'=>'!la_hint_ImageFiles!',
+ 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'upload_dir' => WRITEBALE_BASE . '/user_files/', // relative to project's home
'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)
'not_null' => 1, 'default' => '',
),
- 'LogoLogin' => Array(
- 'type'=>'string', 'formatter'=>'kUploadFormatter',
+ 'LogoLogin' => Array (
+ 'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size'=>MAX_UPLOAD_SIZE, // in Bytes !
- 'file_types'=>'*.jpg;*.gif;*.png', 'files_description'=>'!la_hint_ImageFiles!',
+ 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'upload_dir' => WRITEBALE_BASE . '/user_files/', // relative to project's home
'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)
'not_null' => 1, 'default' => '',
),
- 'Options' => Array(
+ 'Options' => Array (
'type' => 'string', 'default' => NULL,
'formatter' => 'kSerializedFormatter',
'default'=>serialize(
- array(
- 'HeadBgColor' => array('Description'=>'Head frame background color', 'Value'=>'#1961B8'),
- 'HeadColor' => array('Description'=>'Head frame text color', 'Value'=>'#000000'),
- 'SectionBgColor' => array('Description'=>'Section bar background color', 'Value'=>'#2D79D6'),
- 'SectionColor' => array('Description'=>'Section bar text color', 'Value'=>'#000000'),
+ Array (
+ 'HeadBgColor' => Array ('Description' => 'Head frame background color', 'Value' => '#1961B8'),
+ 'HeadColor' => Array ('Description' => 'Head frame text color', 'Value' => '#000000'),
+ 'SectionBgColor' => Array ('Description' => 'Section bar background color', 'Value' => '#2D79D6'),
+ 'SectionColor' => Array ('Description' => 'Section bar text color', 'Value' => '#000000'),
)
),
),
'LastCompiled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'IsPrimary' => Array(
+ 'IsPrimary' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'DisplaySiteNameInHeader' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_primary.png',
),
- 'Fields' => Array(
+ 'Fields' => Array (
'SkinId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ('title' => 'column:la_fld_SkinName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'IsPrimary' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
),
);
\ No newline at end of file
Index: branches/5.3.x/core/units/promo_blocks/promo_blocks_config.php
===================================================================
--- branches/5.3.x/core/units/promo_blocks/promo_blocks_config.php (revision 15658)
+++ branches/5.3.x/core/units/promo_blocks/promo_blocks_config.php (revision 15659)
@@ -1,146 +1,147 @@
<?php
$config = Array (
'Prefix' => 'promo-block',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'PromoBlockEventHandler', 'file' => 'promo_block_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'PromoBlockTagProcessor', 'file' => 'promo_block_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'BlockId',
'TableName' => TABLE_PREFIX . 'PromoBlocks',
'TitleField' => 'Title',
'StatusField' => Array ('Status'),
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('promo-block' => '!la_title_AddingPromoBlock!'),
'edit_status_labels' => Array ('promo-block' => '!la_title_EditingPromoBlock!'),
),
'promo_block_list' => Array ('prefixes' => Array ('promo-block-group', 'promo-block_List'), 'format' => "!la_tab_PromoBlocks! - #promo-block-group_titlefield# (#promo-block_recordcount#)"),
'promo_block_edit' => Array ('prefixes' => Array ('promo-block'), 'format' => "#promo-block_status# '#promo-block_titlefield#'"),
),
- 'PermSection' => Array('main' => 'in-portal:promo_block_groups'),
+ 'PermSection' => Array ('main' => 'in-portal:promo_block_groups'),
'CalculatedFields' => Array (
'' => Array (
'ConversionPercent' => 'IF(%1$s.NumberOfViews > 0, NumberOfClicks / NumberOfViews * 100, NULL)',
),
),
'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Priority' => 'desc'),
)
),
'Fields' => Array (
'BlockId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PromoBlockGroupId' => Array (
'type' => 'int',
'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PromoBlockGroups ORDER BY Title', 'option_title_field' => 'Title', 'option_key_field' => 'PromoBlockGroupId',
'not_null' => 1, 'required' => 1, 'default' => 0,
),
'Title' => Array (
'type' => 'string', 'max_len' => 50,
'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(50)', 'not_null' => 1, 'required' => 1, 'default' => '',
),
'ButtonText' => Array (
'type' => 'string', 'max_len' => 255,
'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', 'not_null' => 1, 'default' => '',
),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1,
),
- 'Priority' => Array(
+ 'Priority' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (),
'not_null' => 1, 'required' => 1, 'default' => 0
),
'Sticky' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
- /*'CSSClassName' => Array(
+ /*'CSSClassName' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
- 'options' => Array('promo-orange' => 'Orange', 'promo-green' => 'Green', 'promo-blue' => 'Blue'),
+ 'options' => Array ('promo-orange' => 'Orange', 'promo-green' => 'Green', 'promo-blue' => 'Blue'),
'not_null' => 1, 'default' => '',
),*/
'LinkType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Internal', 2 => 'la_opt_External'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 1,
),
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'default' => NULL),
- 'ExternalLink' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ExternalLink' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'OpenInNewWindow' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'ScheduleFromDate' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter', 'time_format' => '', 'input_time_format' => '',
'error_msgs' => Array ('wrong_date_interval' => '!la_ToDateMustBeGreaterThanFromDate!'),
'default' => null,
),
'ScheduleToDate' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter', 'time_format' => '', 'input_time_format' => '',
'error_field' => 'ScheduleFromDate',
'default' => null,
),
'NumberOfClicks' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
'NumberOfViews' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
'Html' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, 'default' => null),
),
- 'VirtualFields' => Array(
- 'ConversionPercent' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.0f', 'default' => NULL),
+ 'VirtualFields' => Array (
+ 'ConversionPercent' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.0f', 'default' => NULL),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png', 0 => 'icon16_disabled.png'),
'Fields' => Array (
'BlockId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
'Title' => Array ('filter_block' => 'grid_like_filter'),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80),
'Priority' => Array ('title' => 'column:la_fld_Order', 'filter_block' => 'grid_range_filter', 'width' => 80),
'Sticky' => Array ('filter_block' => 'grid_options_filter', 'width' => 80),
// 'CSSClassName' => Array ('filter_block' => 'grid_options_filter'),
'LinkType' => Array ('filter_block' => 'grid_options_filter'),
'CategoryId' => Array ('title' => 'column:la_fld_Category', 'filter_block' => 'grid_options_filter', 'width' => 200),
'ExternalLink' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
'ScheduleFromDate' => Array ('title' => 'la_col_ScheduleFromDate', 'filter_block' => 'grid_date_range_filter', 'width' => 120),
'ScheduleToDate' => Array ('title' => 'la_col_ScheduleToDate', 'filter_block' => 'grid_date_range_filter', 'width' => 120),
'NumberOfClicks' => Array ('filter_block' => 'grid_range_filter'),
'NumberOfViews' => Array ('filter_block' => 'grid_range_filter'),
'ConversionPercent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
),
),
),
-);
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/translator/translator_config.php
===================================================================
--- branches/5.3.x/core/units/translator/translator_config.php (revision 15658)
+++ branches/5.3.x/core/units/translator/translator_config.php (revision 15659)
@@ -1,50 +1,52 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'trans',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'TranslatorEventHandler','file'=>'translator_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'TranslatorTagProcessor','file'=>'translator_tp.php','build_event'=>'OnBuild'),
- 'AutoLoad' => false,
- 'hooks' => Array(),
- 'QueryString' => Array(
- 1 => 'prefix',
- 2 => 'field',
- 3 => 'multi_line',
- 4 => 'event',
- ),
- 'IDField' => 'N/A',
-
- 'TitlePresets' => Array (
- 'trans_edit' => Array (
- 'prefixes' => Array('trans'), 'format' => '!la_title_EditingTranslation!',
- 'toolbar_buttons' => Array ('select', 'cancel'),
- ),
- ),
-
- 'ItemSQLs' => Array ('' => ''),
-
- 'Fields' => Array( ),
-
- 'VirtualFields' => Array(
- 'Original' => Array(),
- 'Language' => Array(),
- 'SwitchLanguage' => Array('formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Languages', 'option_key_field' => 'LanguageId','option_title_field' => 'PackName'),
- 'Translation' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => ''),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'trans',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'TranslatorEventHandler', 'file' => 'translator_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'TranslatorTagProcessor', 'file' => 'translator_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => false,
+
+ 'QueryString' => Array (
+ 1 => 'prefix',
+ 2 => 'field',
+ 3 => 'multi_line',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'N/A',
+
+ 'TitlePresets' => Array (
+ 'trans_edit' => Array (
+ 'prefixes' => Array ('trans'), 'format' => '!la_title_EditingTranslation!',
+ 'toolbar_buttons' => Array ('select', 'cancel'),
+ ),
+ ),
+
+ 'ItemSQLs' => Array ('' => ''),
+
+ 'Fields' => Array (),
+
+ 'VirtualFields' => Array (
+ 'Original' => Array (),
+ 'Language' => Array (),
+ 'SwitchLanguage' => Array ('formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Languages', 'option_key_field' => 'LanguageId', 'option_title_field' => 'PackName'),
+ 'Translation' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => ''),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/statistics/statistics_config.php
===================================================================
--- branches/5.3.x/core/units/statistics/statistics_config.php (revision 15658)
+++ branches/5.3.x/core/units/statistics/statistics_config.php (revision 15659)
@@ -1,80 +1,77 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'stat',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'StatisticsEventHandler', 'file' => 'statistics_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'StatisticsTagProcessor', 'file' => 'statistics_tag_processor.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'StatItemId',
-
- 'TitleField' => 'ListLabel',
-
- 'TitlePresets' => Array (
- 'statistics_list' => Array (
- 'prefixes' => Array ('stat_List'), 'format' => "!la_title_Statistics!",
- ),
- ),
-
- 'TableName' => TABLE_PREFIX.'StatItem',
-
- 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
- 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Priority' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'StatItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Module' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ValueSQL' => Array('type' => 'string','default' => null),
- 'ResetSQL' => Array('type' => 'string','default' => null),
- 'ListLabel' => Array('type' => 'string','not_null' => 1, 'default' => ''),
- 'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'AdminSummary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- ),
-
-
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default' => 'icon16_item.png'),
- 'Fields' => Array(
- 'Username' => Array('data_block' => 'grid_checkbox_td'),
- 'LastName' => Array(),
- 'FirstName' => Array(),
- ),
- ),
-
-
- ),
-
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'stat',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'StatisticsEventHandler', 'file' => 'statistics_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'StatisticsTagProcessor', 'file' => 'statistics_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'StatItemId',
+
+ 'TitleField' => 'ListLabel',
+
+ 'TitlePresets' => Array (
+ 'statistics_list' => Array (
+ 'prefixes' => Array ('stat_List'), 'format' => "!la_title_Statistics!",
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'StatItem',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s'
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Priority' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'StatItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Module' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'ValueSQL' => Array ('type' => 'string', 'default' => null),
+ 'ResetSQL' => Array ('type' => 'string', 'default' => null),
+ 'ListLabel' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'AdminSummary' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'Username' => Array ('data_block' => 'grid_checkbox_td'),
+ 'LastName' => Array (),
+ 'FirstName' => Array (),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/related_searches/related_searches_config.php
===================================================================
--- branches/5.3.x/core/units/related_searches/related_searches_config.php (revision 15658)
+++ branches/5.3.x/core/units/related_searches/related_searches_config.php (revision 15659)
@@ -1,87 +1,86 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'search',
+$config = Array (
+ 'Prefix' => 'search',
- 'Clones' => Array(
- 'c-search' => Array('ParentPrefix' => 'c'),
- ),
-
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'RelatedSearchEventHandler','file'=>'related_searches_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'RelatedSearchTagProcessor','file'=>'related_searches_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
- 'IDField' => 'RelatedSearchId',
- 'StatusField' => Array('Enabled'),
- 'TableName' => TABLE_PREFIX.'CategoryRelatedSearches',
- 'ParentTableKey' => 'ResourceId',
- 'ForeignKey' => 'ResourceId',
- 'ParentPrefix' => 'c',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s FROM %1$s',
- ), // key - special, value - list select sql
-
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Keyword' => 'asc'),
- )
- ),
- 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s',),
-
- 'Fields' => Array(
- 'RelatedSearchId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
- 'Keyword' => Array('type'=>'string', 'required' => 1, 'not_null' => 1, 'default' => ''),
- 'ItemType' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
- 'Enabled' => Array(
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1,
- ),
- 'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
- ),
- 'VirtualFields' => Array(
-
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png'
- ),
- 'Fields' => Array(
- 'RelatedSearchId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Keyword' => Array( 'title'=>'la_col_Keyword', 'data_block' => 'grid_keyword_td', 'filter_block' => 'grid_like_filter'),
- 'Enabled' => Array( 'title'=>'column:la_fld_Status', 'filter_block' => 'grid_options_filter'),
- ),
- ),
- ),
- );
\ No newline at end of file
+ 'Clones' => Array (
+ 'c-search' => Array ('ParentPrefix' => 'c'),
+ ),
+
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'RelatedSearchEventHandler', 'file' => 'related_searches_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'RelatedSearchTagProcessor', 'file' => 'related_searches_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'RelatedSearchId',
+ 'StatusField' => Array ('Enabled'),
+ 'TableName' => TABLE_PREFIX.'CategoryRelatedSearches',
+ 'ParentTableKey' => 'ResourceId',
+ 'ForeignKey' => 'ResourceId',
+ 'ParentPrefix' => 'c',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ ''=> ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Keyword' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'RelatedSearchId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
+ 'Keyword' => Array ('type' => 'string', 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null'=>1,'default'=>0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png'
+ ),
+ 'Fields' => Array (
+ 'RelatedSearchId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Keyword' => Array ( 'title' => 'la_col_Keyword', 'data_block' => 'grid_keyword_td', 'filter_block' => 'grid_like_filter'),
+ 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/mailing_lists/mailing_lists_config.php
===================================================================
--- branches/5.3.x/core/units/mailing_lists/mailing_lists_config.php (revision 15658)
+++ branches/5.3.x/core/units/mailing_lists/mailing_lists_config.php (revision 15659)
@@ -1,145 +1,146 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'mailing-list',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'MailingListEventHandler', 'file' => 'mailing_list_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'MailingListTagProcessor', 'file' => 'mailing_list_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'ScheduledTasks' => Array (
- 'generate_mailing_queue' => Array ('EventName' => 'OnGenerateEmailQueue', 'RunSchedule' => '*/30 * * * *'),
- 'process_mailing_queue' => Array ('EventName' => 'OnProcessEmailQueue', 'RunSchedule' => '*/30 * * * *'),
- ),
-
- 'IDField' => 'MailingId',
-
- 'TableName' => TABLE_PREFIX . 'MailingLists',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('mailing-list' => '!la_title_AddingMailingList!'),
- 'edit_status_labels' => Array ('mailing-list' => '!la_title_ViewingMailingList!'),
- ),
-
- 'mailing_list_list' => Array (
- 'prefixes' => Array ('mailing-list_List'), 'format' => "!la_title_MailingLists!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'primary_theme', 'clone', 'view', 'dbl-click'),
- ),
-
- 'mailing_list_edit' => Array (
- 'prefixes' => Array ('mailing-list'), 'format' => "#mailing-list_status#",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:mailing_lists'),
-
- 'Sections' => Array (
- 'in-portal:mailing_folder' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'mailing_list',
- 'label' => 'la_title_MailingLists',
- 'use_parent_header' => 1,
- 'permissions' => Array (),
- 'priority' => 5,
- 'type' => stTREE,
- ),
-
- 'in-portal:mailing_lists' => Array (
- 'parent' => 'in-portal:mailing_folder',
- 'icon' => 'mailing_list',
- 'label' => 'la_title_MailingLists',
- 'url' => Array('t' => 'mailing_lists/mailing_list_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 5.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
- 'type' => stTAB,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('MailingId' => 'desc'),
- )
- ),
-
- 'Fields' => Array (
- 'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
-
- 'PortalUserId' => Array(
- 'type' => 'int',
- 'formatter' => 'kLEFTFormatter',
- 'options' => Array (USER_ROOT => 'root'),
- 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username',
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
- ),
-
- 'To' => Array ('type' => 'string', 'required' => 1, 'default' => NULL),
- 'ToParsed' => Array ('type' => 'string', 'default' => NULL),
-
- 'Attachments' => Array (
- 'type' => 'string',
- 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'max_size' => 50000000,
- 'multiple' => 10, 'direct_links' => true, 'file_types' => '*.*', 'files_description' => '!la_hint_AllFiles!',
- 'default' => NULL
- ),
-
- 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'MessageText' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'MessageHtml' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
-
- 'Status' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_NotProcessed', 2 => 'la_opt_PartiallyProcessed', 3 => 'la_opt_Processed', 4 => 'la_opt_Cancelled'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => 1
- ),
-
- 'EmailsQueued' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'EmailsSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'EmailsTotal' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'MailingId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
- 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
- 'MessageText' => Array ('filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
- 'MessageHtml' => Array ('title' => 'la_col_MessageHtml', 'filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- 'EmailsQueued' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
- 'EmailsSent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
- 'EmailsTotal' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
- ),
+$config = Array (
+ 'Prefix' => 'mailing-list',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'MailingListEventHandler', 'file' => 'mailing_list_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'MailingListTagProcessor', 'file' => 'mailing_list_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'generate_mailing_queue' => Array ('EventName' => 'OnGenerateEmailQueue', 'RunSchedule' => '*/30 * * * *'),
+ 'process_mailing_queue' => Array ('EventName' => 'OnProcessEmailQueue', 'RunSchedule' => '*/30 * * * *'),
+ ),
+
+ 'IDField' => 'MailingId',
+
+ 'TableName' => TABLE_PREFIX . 'MailingLists',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('mailing-list' => '!la_title_AddingMailingList!'),
+ 'edit_status_labels' => Array ('mailing-list' => '!la_title_ViewingMailingList!'),
+ ),
+
+ 'mailing_list_list' => Array (
+ 'prefixes' => Array ('mailing-list_List'), 'format' => "!la_title_MailingLists!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'primary_theme', 'clone', 'view', 'dbl-click'),
+ ),
+
+ 'mailing_list_edit' => Array (
+ 'prefixes' => Array ('mailing-list'), 'format' => "#mailing-list_status#",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:mailing_lists'),
+
+ 'Sections' => Array (
+ 'in-portal:mailing_folder' => Array (
+ 'parent' => 'in-portal:users',
+ 'icon' => 'mailing_list',
+ 'label' => 'la_title_MailingLists',
+ 'use_parent_header' => 1,
+ 'permissions' => Array (),
+ 'priority' => 5,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:mailing_lists' => Array (
+ 'parent' => 'in-portal:mailing_folder',
+ 'icon' => 'mailing_list',
+ 'label' => 'la_title_MailingLists',
+ 'url' => Array ('t' => 'mailing_lists/mailing_list_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 5.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
+ 'type' => stTAB,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('MailingId' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'PortalUserId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kLEFTFormatter',
+ 'options' => Array (USER_ROOT => 'root'),
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username',
+ 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ ),
+
+ 'To' => Array ('type' => 'string', 'required' => 1, 'default' => NULL),
+ 'ToParsed' => Array ('type' => 'string', 'default' => NULL),
+
+ 'Attachments' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'max_size' => 50000000,
+ 'multiple' => 10, 'direct_links' => true, 'file_types' => '*.*', 'files_description' => '!la_hint_AllFiles!',
+ 'default' => NULL
+ ),
+
+ 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'MessageText' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'MessageHtml' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_NotProcessed', 2 => 'la_opt_PartiallyProcessed', 3 => 'la_opt_Processed', 4 => 'la_opt_Cancelled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 1
+ ),
+
+ 'EmailsQueued' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'EmailsSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'EmailsTotal' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'MailingId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
+ 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
+ 'MessageText' => Array ('filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
+ 'MessageHtml' => Array ('title' => 'la_col_MessageHtml', 'filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'EmailsQueued' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
+ 'EmailsSent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
+ 'EmailsTotal' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/custom_fields/custom_fields_config.php
===================================================================
--- branches/5.3.x/core/units/custom_fields/custom_fields_config.php (revision 15658)
+++ branches/5.3.x/core/units/custom_fields/custom_fields_config.php (revision 15659)
@@ -1,162 +1,163 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'cf',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'CustomFieldsEventHandler','file'=>'custom_fields_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'CustomFieldsTagProcessor','file'=>'custom_fields_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'hooks' => Array(),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'type',
- 6 => 'mode',
- ),
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'cf',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnSave'), // edit cloned fields to made alters :)
- 'DoPrefix' => 'cf',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnSaveCustomField',
- ),
- ),
-
- 'IDField' => 'CustomFieldId',
- 'OrderField' => 'DisplayOrder',
-
- 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item
-
- 'TitlePhrase' => 'la_title_CustomFields',
-
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('cf'=>'!la_title_addingCustom!'),
- 'edit_status_labels' => Array('cf'=>'!la_title_Editing_CustomField!'),
- 'new_titlefield' => Array('cf'=>''),
- ),
-
- 'custom_fields_list'=>Array( 'prefixes' => Array('cf_List'),
- 'format' => "!la_tab_ConfigCustom!",
- ),
-
- 'custom_fields_edit'=>Array( 'prefixes' => Array('cf'),
- 'new_titlefield' => Array('cf'=>''),
- 'format' => "#cf_status# '#cf_titlefield#'",
- ),
- ),
-
- 'TableName' => TABLE_PREFIX.'CustomFields',
-
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
- ), // key - special, value - list select sql
-
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('DisplayOrder' => 'asc'),
- 'Sorting' => Array('FieldName' => 'asc'),
- ),
-
- 'general' => Array(
- 'Sorting' => Array('DisplayOrder' => 'asc')
- ),
-
- ),
-
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'SubItems' => Array('confs-cf'),
-
- 'Fields' => Array (
- 'CustomFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Type' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FieldName' => Array('required'=>'1', 'type' => 'string','not_null' => 1,'default' => ''),
- 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => null),
- 'MultiLingual' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1,
- ),
- 'Heading' => Array('type' => 'string', 'required' => 1, 'default' => null),
- 'Prompt' => Array('type' => 'string','default' => null),
- 'ElementType' => Array('required'=>'1', 'type'=>'string', 'not_null'=>1, 'default'=>'', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'label' => 'la_type_label', 'date' => 'la_type_date', 'datetime' => 'la_type_datetime')),
- 'ValueList' => Array('type' => 'string','default' => null),
- 'DefaultValue' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'DisplayOrder' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'OnGeneralTab' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'IsSystem' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'IsRequired' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- ),
-
- 'VirtualFields' => Array(
- 'Value' => Array('type' => 'string', 'default' => ''),
- 'OriginalValue' => Array('type' => 'string', 'default' => ''),
- 'Error' => Array('type' => 'string', 'default' => ''),
- 'DirectOptions' => Array('type' => 'string', 'default' => ''),
-
- 'SortValues' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0,
- ),
-
- // for ValueList field editing via "inp_edit_minput" control
- 'OptionKey' => Array ('type' => 'string', 'default' => ''),
- 'OptionTitle' => Array ('type' => 'string', 'default' => ''),
- 'Options' => Array ('type' => 'string', 'default' => ''),
-
- ),
-
- 'Grids' => Array(
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'CustomFieldId' => Array ( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'FieldName' => Array ( 'title'=>'la_prompt_FieldName', 'width' => 250, ),
- 'FieldLabel' => Array ( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'cf_grid_data_td', 'width' => 250, ),
- 'DisplayOrder' => Array ('title' => 'la_prompt_DisplayOrder', 'filter_block' => 'grid_range_filter', 'width' => 105, ),
-// 'IsSystem' => Array ('title' => 'column:la_fld_IsSystem', 'filter_block' => 'grid_options_filter'),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'cf',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CustomFieldsEventHandler', 'file' => 'custom_fields_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'CustomFieldsTagProcessor', 'file' => 'custom_fields_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'cf',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnSave'), // edit cloned fields to made alters :)
+ 'DoPrefix' => 'cf',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnSaveCustomField',
+ ),
+ ),
+
+ 'IDField' => 'CustomFieldId',
+ 'OrderField' => 'DisplayOrder',
+
+ 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item
+
+ 'TitlePhrase' => 'la_title_CustomFields',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('cf' => '!la_title_addingCustom!'),
+ 'edit_status_labels' => Array ('cf' => '!la_title_Editing_CustomField!'),
+ 'new_titlefield' => Array ('cf' => ''),
+ ),
+
+ 'custom_fields_list'=>Array (
+ 'prefixes' => Array ('cf_List'), 'format' => "!la_tab_ConfigCustom!",
+ ),
+
+ 'custom_fields_edit'=>Array (
+ 'prefixes' => Array ('cf'),
+ 'new_titlefield' => Array ('cf' => ''),
+ 'format' => "#cf_status# '#cf_titlefield#'",
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'CustomFields',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('DisplayOrder' => 'asc'),
+ 'Sorting' => Array ('FieldName' => 'asc'),
+ ),
+
+ 'general' => Array (
+ 'Sorting' => Array ('DisplayOrder' => 'asc')
+ ),
+ ),
+
+ 'SubItems' => Array ('confs-cf'),
+
+ 'Fields' => Array (
+ 'CustomFieldId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Type' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FieldName' => Array ('required' => '1', 'type' => 'string', 'not_null' => 1,'default' => ''),
+ 'FieldLabel' => Array ('type' => 'string', 'required' => 1, 'default' => null),
+ 'MultiLingual' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'Heading' => Array ('type' => 'string', 'required' => 1, 'default' => null),
+ 'Prompt' => Array ('type' => 'string', 'default' => null),
+ 'ElementType' => Array ('required' => '1', 'type' => 'string', 'not_null'=>1, 'default' => '', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'label' => 'la_type_label', 'date' => 'la_type_date', 'datetime' => 'la_type_datetime')),
+ 'ValueList' => Array ('type' => 'string', 'default' => null),
+ 'DefaultValue' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'DisplayOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'OnGeneralTab' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'IsSystem' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'IsRequired' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Value' => Array ('type' => 'string', 'default' => ''),
+ 'OriginalValue' => Array ('type' => 'string', 'default' => ''),
+ 'Error' => Array ('type' => 'string', 'default' => ''),
+ 'DirectOptions' => Array ('type' => 'string', 'default' => ''),
+
+ 'SortValues' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ ),
+
+ // for ValueList field editing via "inp_edit_minput" control
+ 'OptionKey' => Array ('type' => 'string', 'default' => ''),
+ 'OptionTitle' => Array ('type' => 'string', 'default' => ''),
+ 'Options' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'CustomFieldId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'FieldName' => Array ( 'title' => 'la_prompt_FieldName', 'width' => 250, ),
+ 'FieldLabel' => Array ( 'title' => 'la_prompt_FieldLabel', 'data_block' => 'cf_grid_data_td', 'width' => 250, ),
+ 'DisplayOrder' => Array ('title' => 'la_prompt_DisplayOrder', 'filter_block' => 'grid_range_filter', 'width' => 105, ),
+// 'IsSystem' => Array ('title' => 'column:la_fld_IsSystem', 'filter_block' => 'grid_options_filter'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/structure/structure_config.php
===================================================================
--- branches/5.3.x/core/units/structure/structure_config.php (revision 15658)
+++ branches/5.3.x/core/units/structure/structure_config.php (revision 15659)
@@ -1,276 +1,277 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'st',
- 'ItemClass' => Array('class'=>'CategoriesItem','file'=>'structure_item.php', 'build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'CategoriesEventHandler','file'=>'structure_eh.php', 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'CategoriesTagProcessor','file'=>'structure_tp.php', 'build_event'=>'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
- 'ConfigPriority' => 0,
- 'Hooks' => Array(
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => 'cdata',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnDefineCustomFields',
- ),
+$config = Array (
+ 'Prefix' => 'st',
+ 'ItemClass' => Array ('class' => 'CategoriesItem', 'file' => 'structure_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CategoriesEventHandler', 'file' => 'structure_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'CategoriesTagProcessor', 'file' => 'structure_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'ConfigPriority' => 0,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => 'cdata',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnDefineCustomFields',
+ ),
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'rel',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCloneSubItem',
- ),
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'rel',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'img',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCloneSubItem',
- ),
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'img',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
),
+ ),
- 'IDField' => 'CategoryId',
+ 'IDField' => 'CategoryId',
- 'StatusField' => Array('Status'),
+ 'StatusField' => Array ('Status'),
- 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+ 'TitleField' => 'Name', // field, used in bluebar when editing existing item
- 'TableName' => TABLE_PREFIX.'Categories',
- 'CustomDataTableName' => TABLE_PREFIX . 'CategoryCustomData',
+ 'TableName' => TABLE_PREFIX.'Categories',
+ 'CustomDataTableName' => TABLE_PREFIX . 'CategoryCustomData',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('st'=>'!la_title_Adding_Category!'),
- 'edit_status_labels' => Array('st'=>'!la_title_Editing_Category!'),
- 'new_titlefield' => Array('st'=>'!la_title_New_Category!'),
- ),
- 'structure_list' => Array(
- 'prefixes' => Array('st_List', 'st.current'),
- 'format' => "!la_title_Structure! - '#st.current_Name#'"
- ),
- 'structure_edit' => Array(
- 'prefixes' => Array('st'),
- 'format' => "#st_status# '#st_titlefield#'",
- ),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('st' => '!la_title_Adding_Category!'),
+ 'edit_status_labels' => Array ('st' => '!la_title_Editing_Category!'),
+ 'new_titlefield' => Array ('st' => '!la_title_New_Category!'),
+ ),
+ 'structure_list' => Array (
+ 'prefixes' => Array ('st_List', 'st.current'), 'format' => "!la_title_Structure! - '#st.current_Name#'"
+ ),
+ 'structure_edit' => Array (
+ 'prefixes' => Array ('st'), 'format' => "#st_status# '#st_titlefield#'",
+ ),
- 'edit_content' => array('format' => '!la_EditingContent!'),
+ 'edit_content' => Array ('format' => '!la_EditingContent!'),
-/* 'categories_edit' => Array('prefixes' => Array('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!"),*/
+// 'categories_edit' => Array ('prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!"),
+ ),
- ),
+ 'PermItemPrefix' => 'CATEGORY',
+ 'PermSection' => Array ('main' => 'CATEGORY:in-portal:structure', 'email' => 'in-portal:configemail'),
- 'PermItemPrefix' => 'CATEGORY',
- 'PermSection' => Array('main' => 'CATEGORY:in-portal:structure', 'email' => 'in-portal:configemail'),
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache ON '.TABLE_PREFIX.'CategoryPermissionsCache.CategoryId = %1$s.CategoryId',
+ '-virtual' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'SubItems' => Array ('content', 'page-revision'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
+ ),
+ '-virtual' => Array (),
+ ),
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache ON '.TABLE_PREFIX.'CategoryPermissionsCache.CategoryId = %1$s.CategoryId',
- '-virtual' => 'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'SubItems' => Array('content', 'page-revision'),
-
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
- )
- ),
-
- 'CalculatedFields' => Array(
- '' => Array(
- 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
- ),
- '-virtual' => Array (),
- ),
-
- 'Fields' => Array (
- 'CategoryId' => Array('type' => 'int', 'not_null' => 1,'default' => 0),
- 'Type' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
- 'not_null' => 1,'default' => 1
- ),
- 'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
- 'ParentId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required'=>1),
- 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1),
- 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
- 'EditorsPick' => Array('type' => 'int', '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' => 1),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => array(), 'required' => 1, 'default' => 0),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'CachedDescendantCatsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
- 'ResourceId' => Array('type' => 'int', 'default' => null),
- 'ParentPath' => Array('type' => 'string', 'default' => null),
- 'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'NamedParentPath' => Array('type' => 'string', 'default' => null),
- 'NamedParentPathHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
- 'MetaDescription' => Array('type' => 'string', 'default' => null),
- 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
- 'CachedTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'CachedTemplateHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
-
-
- // fields from Pages
- 'Template' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => ' SELECT CONCAT(tf.Description, " (", TRIM(TRAILING ".des" FROM TRIM(TRAILING ".tpl" FROM FileName) ), ")") AS Title,
- CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName)) AS Value
- FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
- LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
- WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")',
- 'option_key_field' => 'Value', 'option_title_field' => 'Title',
- 'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
- ),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
+ 'not_null' => 1,'default' => 1
+ ),
+ 'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
+ 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required'=>1),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1),
+ 'AutomaticFilename' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
+ 'EditorsPick' => Array ('type' => 'int', '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' => 1),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'required' => 1, 'default' => 0),
+ 'MetaKeywords' => Array ('type' => 'string', 'default' => null),
+ 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
+ 'ParentPath' => Array ('type' => 'string', 'default' => null),
+ 'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'NamedParentPath' => Array ('type' => 'string', 'default' => null),
+ 'NamedParentPathHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
+ 'MetaDescription' => Array ('type' => 'string', 'default' => null),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
+ 'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'CachedTemplateHash' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
+
+
+ // fields from Pages
+ 'Template' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => ' SELECT CONCAT(tf.Description, " (", TRIM(TRAILING ".des" FROM TRIM(TRAILING ".tpl" FROM FileName) ), ")") AS Title,
+ CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName)) AS Value
+ FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
+ LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
+ WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")',
+ 'option_key_field' => 'Value', 'option_title_field' => 'Title',
+ 'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
+ ),
- 'UseExternalUrl' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'UseMenuIconUrl' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Title' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
- 'MenuTitle' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
- 'MetaTitle' => Array('type' => 'string', 'default' => null),
- 'IndexTools' => Array('type' => 'string','default' => null),
- 'IsMenu' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'FormId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => array('' => ''),
- 'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
- 'option_key_field' => 'FormId', 'option_title_field' => 'Title', 'default' => NULL),
- 'FormSubmittedTemplate' => Array('type' => 'string', 'default' => null),
- 'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
-
- 'EnablePageCache' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'OverridePageCacheKey' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
- 'LiveRevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'DirectLinkEnabled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
- 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
- ),
+ 'UseExternalUrl' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'UseMenuIconUrl' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Title' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
+ 'MenuTitle' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
+ 'MetaTitle' => Array ('type' => 'string', 'default' => null),
+ 'IndexTools' => Array ('type' => 'string', 'default' => null),
+ 'IsMenu' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'FormId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ('' => ''),
+ 'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
+ 'option_key_field' => 'FormId', 'option_title_field' => 'Title', 'default' => NULL),
+ 'FormSubmittedTemplate' => Array ('type' => 'string', 'default' => null),
+ 'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'EnablePageCache' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'OverridePageCacheKey' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'LiveRevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
+ ),
- 'VirtualFields' => Array(
- 'CurrentSort' => Array('type' => 'string', 'default' => ''),
- 'IsNew' => Array('type' => 'int', 'default' => 0),
- 'OldPriority' => Array('type' => 'int', 'default' => 0),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
+ 'VirtualFields' => Array (
+ 'CurrentSort' => Array ('type' => 'string', 'default' => ''),
+ 'IsNew' => Array ('type' => 'int', 'default' => 0),
+ 'OldPriority' => Array ('type' => 'int', 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Path' => Array ('title' => 'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
+ ),
- 'Radio' => Array(
- 'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
- 'Selector' => 'radio',
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
+ 'Radio' => Array (
+ 'Icons' => Array (1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
+ 'Selector' => 'radio',
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Path' => Array ('title' => 'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
+ ),
- 'AllPages' => Array(
- 'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
- 'Fields' => Array(
- 'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
- 'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_path_td', 'sort_field' => 'CachedNavbar', 'filter_block' => 'grid_like_filter' ),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
- 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
- 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
- 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
- ),
+ 'AllPages' => Array (
+ 'Icons' => Array (1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
+ 'Fields' => Array (
+ 'CategoryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
+ 'Name' => Array ('title' => 'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Path' => Array ('title' => 'la_col_Path', 'data_block' => 'page_path_td', 'sort_field' => 'CachedNavbar', 'filter_block' => 'grid_like_filter' ),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
+ 'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
+ 'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
+ 'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
+ ),
- 'ConfigMapping' => Array(
- 'PerPage' => 'Perpage_Category',
- 'ShortListPerPage' => 'Perpage_Category_Short',
- 'DefaultSorting1Field' => 'Category_Sortfield',
- 'DefaultSorting2Field' => 'Category_Sortfield2',
- 'DefaultSorting1Dir' => 'Category_Sortorder',
- 'DefaultSorting2Dir' => 'Category_Sortorder2',
- ),
- );
\ No newline at end of file
+ 'ConfigMapping' => Array (
+ 'PerPage' => 'Perpage_Category',
+ 'ShortListPerPage' => 'Perpage_Category_Short',
+ 'DefaultSorting1Field' => 'Category_Sortfield',
+ 'DefaultSorting2Field' => 'Category_Sortfield2',
+ 'DefaultSorting1Dir' => 'Category_Sortorder',
+ 'DefaultSorting2Dir' => 'Category_Sortorder2',
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/users/users_config.php
===================================================================
--- branches/5.3.x/core/units/users/users_config.php (revision 15658)
+++ branches/5.3.x/core/units/users/users_config.php (revision 15659)
@@ -1,660 +1,658 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'u',
- 'ItemClass' => Array('class'=>'UsersItem','file'=>'users_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'UsersEventHandler','file'=>'users_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'UsersTagProcessor','file'=>'users_tag_processor.php','build_event'=>'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo' => 'UsersSyncronizeManager', 'class' => 'UsersSyncronizeManager', 'file' => 'users_syncronize.php', 'build_event' => ''),
- ),
-
- 'AutoLoad' => true,
- 'ConfigPriority' => 0,
- 'Hooks' => Array (
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => 'cdata',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnDefineCustomFields',
- ),
-
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnStartup'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnAutoLoginUser',
- ),
-
- Array (
- 'Mode' => hBEFORE,
- 'Conditional' => false,
- 'HookToPrefix' => 'img',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCloneSubItem',
- ),
-
- // Captcha processing
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => 'captcha',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareCaptcha',
- ),
-
- /*Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnBeforeItemCreate'),
- 'DoPrefix' => 'captcha',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnValidateCode',
- ),*/
+$config = Array (
+ 'Prefix' => 'u',
+ 'ItemClass' => Array ('class' => 'UsersItem', 'file' => 'users_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'UsersEventHandler', 'file' => 'users_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'UsersTagProcessor', 'file' => 'users_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'UsersSyncronizeManager', 'class' => 'UsersSyncronizeManager', 'file' => 'users_syncronize.php', 'build_event' => ''),
+ ),
+
+ 'AutoLoad' => true,
+
+ 'ConfigPriority' => 0,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => 'cdata',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnDefineCustomFields',
+ ),
+
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'adm',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnStartup'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnAutoLoginUser',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'img',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
+
+ // Captcha processing
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => 'captcha',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnPrepareCaptcha',
+ ),
+
+ /*Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnBeforeItemCreate'),
+ 'DoPrefix' => 'captcha',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnValidateCode',
+ ),*/
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'membership_expiration' => Array ('EventName' => 'OnCheckExpiredMembership', 'RunSchedule' => '*/30 * * * *'),
+ 'delete_expired_sessions' => Array ('EventName' => 'OnDeleteExpiredSessions', 'RunSchedule' => '0 */12 * * *'),
+ ),
+
+ 'IDField' => 'PortalUserId',
+
+ 'StatusField' => Array ('Status'),
+
+ 'TitleField' => 'Username',
+
+ 'ItemType' => 6, // used for custom fields only (on user's case)
+
+ 'StatisticsInfo' => Array (
+ 'pending' => Array (
+ 'icon' => 'icon16_user_pending.gif',
+ 'label' => 'la_Text_Users',
+ 'js_url' => '#url#',
+ 'url' => Array ('t' => 'users/users_list', 'pass' => 'm,u', 'u_event' => 'OnSetFilterPattern', 'u_filters' => 'show_active=0,show_pending=1,show_disabled=0'),
+ 'status' => STATUS_PENDING,
+ ),
+ ),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('u' => '!la_title_Adding_User!'),
+ 'edit_status_labels' => Array ('u' => '!la_title_Editing_User!'),
+ ),
+
+ 'users_list' => Array (
+ 'prefixes' => Array ('u_List'), 'format' => "!la_title_Users!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'approve', 'decline', 'frontend_mail', 'e-mail', 'export', 'view', 'dbl-click'),
+ ),
+
+ 'users_edit' => Array (
+ 'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+
+ 'user_edit_images' => Array (
+ 'prefixes' => Array ('u', 'u-img_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Images!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'setprimary', 'move_up', 'move_down', 'view', 'dbl-click'),
+ ),
+
+ 'user_edit_groups' => Array (
+ 'prefixes' => Array ('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'select_user', 'edit', 'delete', 'setprimary', 'view', 'dbl-click'),
+ ),
+
+ 'user_edit_items' => Array (
+ 'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Items!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'user_edit_custom' => Array (
+ 'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'admin_list' => Array (
+ 'prefixes' => Array ('u.admins_List'), 'format' => "!la_title_Administrators!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'clone', 'refresh', 'view', 'dbl-click'),
+ ),
+
+ 'admins_edit' => Array (
+ 'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+
+ 'regular_users_list' => Array (
+ 'prefixes' => Array ('u.regular_List'), 'format' => "!la_title_Users!",
+ 'toolbar_buttons' => Array (),
+ ),
+
+ 'root_edit' => Array (
+ 'prefixes' => Array ('u'), 'format' => "!la_title_Editing_User! 'root'",
+ 'toolbar_buttons' => Array ('select', 'cancel'),
+ ),
+
+ 'user_edit_group' => Array (
+ 'prefixes' => Array ('u', 'u-ug'),
+ 'edit_status_labels' => Array ('u-ug' => '!la_title_EditingMembership!'),
+ 'format' => "#u_status# '#u_titlefield#' - #u-ug_status# '#u-ug_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'user_image_edit' => Array (
+ 'prefixes' => Array ('u', 'u-img'),
+ 'new_status_labels' => Array ('u-img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('u-img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('u-img' => '!la_title_New_Image!'),
+ 'format' => "#u_status# '#u_titlefield#' - #u-img_status# '#u-img_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'user_select' => Array (
+ 'prefixes' => Array ('u_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'dbl-click'),
+ ),
+
+ 'group_user_select' => Array (
+ 'prefixes' => Array ('u.group_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'view', 'dbl-click'),
+ ),
+
+ 'tree_users' => Array ('format' => '!la_section_overview!'),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'users/users_edit', 'priority' => 1),
+ 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/users_edit_groups', 'priority' => 2),
+ 'images' => Array ('title' => 'la_tab_Images', 't' => 'users/user_edit_images', 'priority' => 3),
+ 'items' => Array ('title' => 'la_tab_Items', 't' => 'users/user_edit_items', 'priority' => 4),
+ 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'users/users_edit_custom', 'priority' => 5),
+ ),
+
+ 'Admins' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'users/admins_edit', 'priority' => 1),
+ 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/admins_edit_groups', 'priority' => 2),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
+
+ 'Sections' => Array (
+ 'in-portal:user_list' => Array (
+ 'parent' => 'in-portal:users',
+ 'icon' => 'users',
+ 'label' => 'la_title_Users', // 'la_tab_User_List',
+ 'url' => Array ('t' => 'users/users_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:admins' => Array (
+ 'parent' => 'in-portal:users',
+ 'icon' => 'administrators',
+ 'label' => 'la_title_Administrators',
+ 'url' => Array ('t' => 'users/admins_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'perm_prefix' => 'u',
+ 'priority' => 2,
+ 'type' => stTREE,
+ ),
+
+ // user settings
+ 'in-portal:user_setting_folder' => Array (
+ 'parent' => 'in-portal:system',
+ 'icon' => 'conf_users',
+ 'label' => 'la_title_Users',
+ 'use_parent_header' => 1,
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 2,
+ 'container' => true,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:configure_users' => Array (
+ 'parent' => 'in-portal:user_setting_folder',
+ 'icon' => 'conf_users_general',
+ 'label' => 'la_tab_ConfigSettings',
+ 'url' => Array ('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit'),
+ 'priority' => 1,
+ 'type' => stTREE,
+ ),
+
+ 'in-portal:user_custom' => Array (
+ 'parent' => 'in-portal:user_setting_folder',
+ 'icon' => 'conf_customfields',
+ 'label' => 'la_tab_ConfigCustom',
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 6, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 2,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Users',
+ 'CustomDataTableName' => TABLE_PREFIX . 'UserCustomData',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
+
+ 'online' => ' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserSessions s ON s.PortalUserId = %1$s.PortalUserId
+ LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Username' => 'asc'),
+ )
+ ),
+
+ 'SubItems' => Array ('addr', 'u-cdata', 'u-ug', 'u-img', 'fav', 'user-profile'),
+
+ /**
+ * Required for depricated public profile templates to work
+ */
+ 'UserProfileMapping' => Array (
+ 'pp_firstname' => 'FirstName',
+ 'pp_lastname' => 'LastName',
+ 'pp_dob' => 'dob',
+ 'pp_email' => 'Email',
+ 'pp_phone' => 'Phone',
+ 'pp_street' => 'Street',
+ 'pp_city' => 'City',
+ 'pp_state' => 'State',
+ 'pp_zip' => 'Zip',
+ 'pp_country' => 'Country',
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'PrimaryGroup' => 'g.Name',
+ 'FullName' => 'CONCAT(FirstName, " ", LastName)',
+ 'AltName' => 'img.AltName',
+ 'SameImages' => 'img.SameImages',
+ 'LocalThumb' => 'img.LocalThumb',
+ 'ThumbPath' => 'img.ThumbPath',
+ 'ThumbUrl' => 'img.ThumbUrl',
+ 'LocalImage' => 'img.LocalImage',
+ 'LocalPath' => 'img.LocalPath',
+ 'FullUrl' => 'img.Url',
+ ),
+ ),
+
+ 'Forms' => Array (
+ 'default' => Array (
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('default' => 0),
+ 'Username' => Array (
+ 'max_len' => 255,
+ 'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i',
+ 'error_msgs' => Array (
+ 'unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!'
),
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'ScheduledTasks' => Array(
- 'membership_expiration' => Array('EventName' => 'OnCheckExpiredMembership', 'RunSchedule' => '*/30 * * * *'),
- 'delete_expired_sessions' => Array('EventName' => 'OnDeleteExpiredSessions', 'RunSchedule' => '0 */12 * * *'),
+ 'unique' => Array (), 'default' => '',
+ ),
+ 'Password' => Array (
+ 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword',
+ 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
+ ),
+ 'FirstName' => Array ('default' => ''),
+ 'LastName' => Array ('default' => ''),
+ 'Company' => Array ('default' => ''),
+ 'Email' => Array (
+ 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
+ 'sample_value' => 'email@domain.com', 'error_msgs' => Array (
+ 'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'
),
-
- 'IDField' => 'PortalUserId',
-
- 'StatusField' => Array('Status'),
-
- 'TitleField' => 'Username',
-
- 'ItemType' => 6, // used for custom fields only (on user's case)
-
- 'StatisticsInfo' => Array(
- 'pending' => Array(
- 'icon' => 'icon16_user_pending.gif',
- 'label' => 'la_Text_Users',
- 'js_url' => '#url#',
- 'url' => Array('t' => 'users/users_list', 'pass' => 'm,u', 'u_event' => 'OnSetFilterPattern', 'u_filters' => 'show_active=0,show_pending=1,show_disabled=0'),
- 'status' => STATUS_PENDING,
- ),
- ),
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('u' => '!la_title_Adding_User!'),
- 'edit_status_labels' => Array ('u' => '!la_title_Editing_User!'),
- ),
-
- 'users_list' => Array (
- 'prefixes' => Array ('u_List'), 'format' => "!la_title_Users!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'approve', 'decline', 'frontend_mail', 'e-mail', 'export', 'view', 'dbl-click'),
- ),
-
- 'users_edit' => Array (
- 'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
-
- 'user_edit_images' => Array (
- 'prefixes' => Array ('u', 'u-img_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Images!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'setprimary', 'move_up', 'move_down', 'view', 'dbl-click'),
- ),
-
- 'user_edit_groups' => Array (
- 'prefixes' => Array ('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'select_user', 'edit', 'delete', 'setprimary', 'view', 'dbl-click'),
- ),
-
- 'user_edit_items' => Array (
- 'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Items!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'user_edit_custom' => Array (
- 'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'admin_list' => Array (
- 'prefixes' => Array ('u.admins_List'), 'format' => "!la_title_Administrators!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'clone', 'refresh', 'view', 'dbl-click'),
- ),
-
- 'admins_edit' => Array (
- 'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
-
- 'regular_users_list' => Array (
- 'prefixes' => Array ('u.regular_List'), 'format' => "!la_title_Users!",
- 'toolbar_buttons' => Array (),
- ),
-
- 'root_edit' => Array (
- 'prefixes' => Array ('u'), 'format' => "!la_title_Editing_User! 'root'",
- 'toolbar_buttons' => Array ('select', 'cancel'),
- ),
-
- 'user_edit_group' => Array (
- 'prefixes' => Array ('u', 'u-ug'),
- 'edit_status_labels' => Array ('u-ug' => '!la_title_EditingMembership!'),
- 'format' => "#u_status# '#u_titlefield#' - #u-ug_status# '#u-ug_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'user_image_edit' => Array (
- 'prefixes' => Array ('u', 'u-img'),
- 'new_status_labels' => Array ('u-img' => '!la_title_Adding_Image!'),
- 'edit_status_labels' => Array ('u-img' => '!la_title_Editing_Image!'),
- 'new_titlefield' => Array ('u-img' => '!la_title_New_Image!'),
- 'format' => "#u_status# '#u_titlefield#' - #u-img_status# '#u-img_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'user_select' => Array (
- 'prefixes' => Array ('u_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'dbl-click'),
- ),
-
- 'group_user_select' => Array (
- 'prefixes' => Array ('u.group_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'view', 'dbl-click'),
- ),
- 'tree_users' => Array('format' => '!la_section_overview!'),
+ 'unique' => Array (), 'required' => 1, 'default' => ''
+ ),
+ 'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Phone' => Array ('default' => ''),
+ 'Fax' => Array ('default' => ''),
+ 'Street' => Array ('default' => ''),
+ 'Street2' => Array ('error_field' => 'Street', 'default' => ''),
+ 'City' => Array ('default' => ''),
+ 'State' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (),
+ 'default' => '',
+ ),
+ 'Zip' => Array ('default' => ''),
+ 'Country' => Array (
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
+ 'default' => '',
+ ),
+ 'ResourceId' => Array ('default' => 0),
+ 'Status' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1,
+ 'default' => 1
+ ),
+ 'Modified' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'TimeZone' => Array ('default' => ''),
+ 'IPAddress' => Array ('default' => ''),
+ 'IsBanned' => Array ('default' => 0),
+ 'PwResetConfirm' => Array ('default' => ''),
+ 'PwRequestTime' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'FrontLanguage' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
+ 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
+ ),
+ 'AdminLanguage' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
+ 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
+ ),
+ 'DisplayToPublic' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (
+ 'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate',
+ 'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1',
+ 'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State',
+ 'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country',
+ ), 'use_phrases' => 1, 'multiple' => 1,
+ 'default' => NULL
+ ),
+ 'UserType' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1,
+ 'default' => 0
+ ),
+ 'PrimaryGroupId' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'UserGroups WHERE Enabled = 1 AND FrontRegistration = 1',
+ 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL
+ ),
+ 'OldStyleLogin' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0
+ ),
+ 'IPRestrictions' => Array ('default' => NULL),
+ 'EmailVerified' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0
+ ),
+ 'PrevEmails' => Array ('default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'PrimaryGroup' => Array ('default' => ''),
+ 'RootPassword' => Array (
+ 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5',
+ 'verify_field' => 'VerifyRootPassword', 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
+ ),
+ 'EmailPassword' => Array ('default' => ''),
+ 'FullName' => Array ('default' => ''),
+ 'AltName' => Array ('default' => ''),
+ 'SameImages' => Array ('default' => ''),
+ 'LocalThumb' => Array ('default' => ''),
+ 'ThumbPath' => Array ('default' => ''),
+ 'ThumbUrl' => Array ('default' => ''),
+ 'LocalImage' => Array ('default' => ''),
+ 'LocalPath' => Array ('default' => ''),
+ 'FullUrl' => Array ('default' => ''),
+
+ 'SubscribeToMailing' => Array (
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'lu_Yes', 0 => 'lu_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ ),
+ ),
+ ),
+
+ 'registration' => Array (
+ // Front-End user registration form
+ /*'Fields' => Array (
+ 'FirstName' => Array ('required' => 1),
+ ),*/
+ ),
+
+ 'recommend' => Array (
+ 'VirtualFields' => Array (
+ 'RecommendEmail' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
+ 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'),
+ 'sample_value' => 'email@domain.com',
+ 'required' => 1, 'default' => ''
+ ),
+ ),
+ ),
+
+ 'subscription' => Array (
+ 'VirtualFields' => Array (
+ 'SubscriberEmail' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
+ 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!'),
+ 'sample_value' => 'email@domain.com',
+ 'required' => 1, 'default' => ''
+ ),
+ ),
+ ),
+
+ 'forgot_password' => Array (
+ 'VirtualFields' => Array (
+ 'ForgotLogin' => Array (
+ 'type' => 'string',
+ 'error_msgs' => Array (
+ 'required' => '!lu_ferror_forgotpw_nodata!',
+ 'unknown_username' => '!lu_ferror_unknown_username!',
+ 'reset_denied' => '!lu_ferror_reset_denied!',
),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'users/users_edit', 'priority' => 1),
- 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/users_edit_groups', 'priority' => 2),
- 'images' => Array ('title' => 'la_tab_Images', 't' => 'users/user_edit_images', 'priority' => 3),
- 'items' => Array ('title' => 'la_tab_Items', 't' => 'users/user_edit_items', 'priority' => 4),
- 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'users/users_edit_custom', 'priority' => 5),
- ),
-
- 'Admins' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'users/admins_edit', 'priority' => 1),
- 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/admins_edit_groups', 'priority' => 2),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
-
- 'Sections' => Array (
- 'in-portal:user_list' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'users',
- 'label' => 'la_title_Users', // 'la_tab_User_List',
- 'url' => Array ('t' => 'users/users_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:admins' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'administrators',
- 'label' => 'la_title_Administrators',
- 'url' => Array ('t' => 'users/admins_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'perm_prefix' => 'u',
- 'priority' => 2,
- 'type' => stTREE,
- ),
-
- // user settings
- 'in-portal:user_setting_folder' => Array (
- 'parent' => 'in-portal:system',
- 'icon' => 'conf_users',
- 'label' => 'la_title_Users',
- 'use_parent_header' => 1,
- 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view'),
- 'priority' => 2,
- 'container' => true,
- 'type' => stTREE,
- ),
-
- 'in-portal:configure_users' => Array (
- 'parent' => 'in-portal:user_setting_folder',
- 'icon' => 'conf_users_general',
- 'label' => 'la_tab_ConfigSettings',
- 'url' => Array ('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit'),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:user_custom' => Array (
- 'parent' => 'in-portal:user_setting_folder',
- 'icon' => 'conf_customfields',
- 'label' => 'la_tab_ConfigCustom',
- 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 6, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 2,
- 'type' => stTREE,
- ),
+ 'default' => ''
+ ),
+ 'ForgotEmail' => Array (
+ 'type' => 'string',
+ 'error_msgs' => Array (
+ 'required' => '!lu_ferror_forgotpw_nodata!',
+ 'unknown_email' => '!lu_ferror_unknown_email!',
+ 'reset_denied' => '!lu_ferror_reset_denied!',
),
-
- 'TableName' => TABLE_PREFIX.'Users',
- 'CustomDataTableName' => TABLE_PREFIX . 'UserCustomData',
-
- 'ListSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
- LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
-
- 'online' => ' SELECT %1$s.* %2$s FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserSessions s ON s.PortalUserId = %1$s.PortalUserId
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
- LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
- ),
-
- 'ItemSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
- LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Username' => 'asc'),
- )
+ 'default' => ''
+ ),
+ ),
+ ),
+
+ 'login' => Array (
+ 'Fields' => Array (
+ // make sure all fields, required by default are not required on this form
+ 'Email' => Array ('required' => 0),
+ ),
+ 'VirtualFields' => Array (
+ 'UserLogin' => Array (
+ 'type' => 'string',
+ 'error_msgs' => Array (
+ 'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!'
),
-
- 'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'u-img', 'fav', 'user-profile'),
-
- /**
- * Required for depricated public profile templates to work
- */
- 'UserProfileMapping' => Array (
- 'pp_firstname' => 'FirstName',
- 'pp_lastname' => 'LastName',
- 'pp_dob' => 'dob',
- 'pp_email' => 'Email',
- 'pp_phone' => 'Phone',
- 'pp_street' => 'Street',
- 'pp_city' => 'City',
- 'pp_state' => 'State',
- 'pp_zip' => 'Zip',
- 'pp_country' => 'Country',
- ),
-
- 'CalculatedFields' => Array(
- '' => Array(
- 'PrimaryGroup' => 'g.Name',
- 'FullName' => 'CONCAT(FirstName, " ", LastName)',
- 'AltName' => 'img.AltName',
- 'SameImages' => 'img.SameImages',
- 'LocalThumb' => 'img.LocalThumb',
- 'ThumbPath' => 'img.ThumbPath',
- 'ThumbUrl' => 'img.ThumbUrl',
- 'LocalImage' => 'img.LocalImage',
- 'LocalPath' => 'img.LocalPath',
- 'FullUrl' => 'img.Url',
- ),
- ),
-
- 'Forms' => Array (
- 'default' => Array (
- 'Fields' => Array (
- 'PortalUserId' => Array ('default' => 0),
- 'Username' => Array (
- 'max_len' => 255,
- 'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i',
- 'error_msgs' => Array(
- 'unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!'
- ),
- 'unique' => Array (), 'default' => '',
- ),
- 'Password' => Array (
- 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword',
- 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
- ),
- 'FirstName' => Array ('default' => ''),
- 'LastName' => Array ('default' => ''),
- 'Company' => Array ('default' => ''),
- 'Email' => Array (
- 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
- 'sample_value' => 'email@domain.com', 'error_msgs' => Array (
- 'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'
- ),
- 'unique' => Array (), 'required' => 1, 'default' => ''
- ),
- 'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Phone' => Array ('default' => ''),
- 'Fax' => Array ('default' => ''),
- 'Street' => Array ('default' => ''),
- 'Street2' => Array ('error_field' => 'Street', 'default' => ''),
- 'City' => Array ('default' => ''),
- 'State' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (),
- 'default' => '',
- ),
- 'Zip' => Array ('default' => ''),
- 'Country' => Array (
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
- FROM ' . TABLE_PREFIX . 'CountryStates
- WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
- ORDER BY Name',
- 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
- 'default' => '',
- ),
- 'ResourceId' => Array ('default' => 0),
- 'Status' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1,
- 'default' => 1
- ),
- 'Modified' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
- 'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
- 'TimeZone' => Array ('default' => ''),
- 'IPAddress' => Array ('default' => ''),
- 'IsBanned' => Array ('default' => 0),
- 'PwResetConfirm' => Array ('default' => ''),
- 'PwRequestTime' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
- 'FrontLanguage' => Array (
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
- 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
- ),
- 'AdminLanguage' => Array (
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
- 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
- ),
- 'DisplayToPublic' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (
- 'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate',
- 'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1',
- 'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State',
- 'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country',
- ), 'use_phrases' => 1, 'multiple' => 1,
- 'default' => NULL
- ),
- 'UserType' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1,
- 'default' => 0
- ),
- 'PrimaryGroupId' => Array (
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'UserGroups WHERE Enabled = 1 AND FrontRegistration = 1',
- 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL
- ),
- 'OldStyleLogin' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0
- ),
- 'IPRestrictions' => Array ('default' => NULL),
- 'EmailVerified' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0
- ),
- 'PrevEmails' => Array ('default' => NULL),
- ),
-
- 'VirtualFields' => Array (
- 'PrimaryGroup' => Array ('default' => ''),
- 'RootPassword' => Array (
- 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5',
- 'verify_field' => 'VerifyRootPassword', 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
- ),
- 'EmailPassword' => Array ('default' => ''),
- 'FullName' => Array ('default' => ''),
- 'AltName' => Array ('default' => ''),
- 'SameImages' => Array ('default' => ''),
- 'LocalThumb' => Array ('default' => ''),
- 'ThumbPath' => Array ('default' => ''),
- 'ThumbUrl' => Array ('default' => ''),
- 'LocalImage' => Array ('default' => ''),
- 'LocalPath' => Array ('default' => ''),
- 'FullUrl' => Array ('default' => ''),
-
- 'SubscribeToMailing' => Array (
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'lu_Yes', 0 => 'lu_No'), 'use_phrases' => 1,
- 'default' => 0,
- ),
- ),
- ),
-
- 'registration' => Array (
- // Front-End user registration form
- /*'Fields' => Array (
- 'FirstName' => Array ('required' => 1),
- ),*/
- ),
-
- 'recommend' => Array (
- 'VirtualFields' => Array (
- 'RecommendEmail' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
- 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'),
- 'sample_value' => 'email@domain.com',
- 'required' => 1, 'default' => ''
- ),
- ),
- ),
-
- 'subscription' => Array (
- 'VirtualFields' => Array (
- 'SubscriberEmail' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
- 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!'),
- 'sample_value' => 'email@domain.com',
- 'required' => 1, 'default' => ''
- ),
- ),
- ),
-
- 'forgot_password' => Array (
- 'VirtualFields' => Array (
- 'ForgotLogin' => Array (
- 'type' => 'string',
- 'error_msgs' => Array (
- 'required' => '!lu_ferror_forgotpw_nodata!',
- 'unknown_username' => '!lu_ferror_unknown_username!',
- 'reset_denied' => '!lu_ferror_reset_denied!',
- ),
- 'default' => ''
- ),
- 'ForgotEmail' => Array (
- 'type' => 'string',
- 'error_msgs' => Array (
- 'required' => '!lu_ferror_forgotpw_nodata!',
- 'unknown_email' => '!lu_ferror_unknown_email!',
- 'reset_denied' => '!lu_ferror_reset_denied!',
- ),
- 'default' => ''
- ),
- ),
- ),
-
- 'login' => Array (
- 'Fields' => Array (
- // make sure all fields, required by default are not required on this form
- 'Email' => Array ('required' => 0),
- ),
- 'VirtualFields' => Array (
- 'UserLogin' => Array (
- 'type' => 'string',
- 'error_msgs' => Array (
- 'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!'
- ),
- 'default' => ''
- ),
- 'UserPassword' => Array ('type' => 'string', 'default' => ''),
- 'UserRememberLogin' => Array ('type' => 'int', 'default' => 0),
- ),
- ),
- ),
-
- 'Fields' => Array (
- 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1),
- 'Username' => Array ('type' => 'string', 'not_null' => 1),
- 'Password' => Array ('type' => 'string', 'skip_empty' => 1),
- 'FirstName' => Array ('type' => 'string', 'not_null' => 1),
- 'LastName' => Array ('type' => 'string', 'not_null' => 1),
- 'Company' => Array ('type' => 'string','not_null' => 1),
- 'Email' => Array ('type' => 'string', 'not_null' => 1),
- 'CreatedOn' => Array ('type' => 'int'),
- 'Phone' => Array ('type' => 'string', 'not_null' => 1),
- 'Fax' => Array ('type' => 'string', 'not_null' => 1),
- 'Street' => Array ('type' => 'string', 'not_null' => 1),
- 'Street2' => Array ('type' => 'string', 'not_null' => 1),
- 'City' => Array ('type' => 'string', 'not_null' => 1),
- 'State' => Array ('type' => 'string', 'not_null' => 1),
- 'Zip' => Array ('type' => 'string', 'not_null' => 1),
- 'Country' => Array ('type' => 'string', 'not_null' => 1),
- 'ResourceId' => Array ('type' => 'int', 'not_null' => 1),
- 'Status' => Array ('type' => 'int', 'not_null' => 1),
- 'Modified' => Array ('type' => 'int'),
- 'dob' => Array ('type' => 'int'),
- 'TimeZone' => Array ('type' => 'string', 'not_null' => 1),
- 'IPAddress' => Array ('type' => 'string', 'not_null' => 1),
- 'IsBanned' => Array ('type' => 'int', 'not_null' => 1),
- 'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1),
- 'PwRequestTime' => Array ('type' => 'int'),
- 'FrontLanguage' => Array ('type' => 'int'),
- 'AdminLanguage' => Array ('type' => 'int'),
- 'DisplayToPublic' => Array ('type' => 'string'),
- 'UserType' => Array ('type' => 'int', 'not_null' => 1),
- 'PrimaryGroupId' => Array ('type' => 'int'),
- 'OldStyleLogin' => Array ('type' => 'int', 'not_null' => 1),
- 'IPRestrictions' => Array ('type' => 'string'),
- 'EmailVerified' => Array ('type' => 'int', 'not_null' => 1),
- 'PrevEmails' => Array ('type' => 'string'),
- ),
-
- 'VirtualFields' => Array (
- 'PrimaryGroup' => Array ('type' => 'string'),
- 'RootPassword' => Array ('type' => 'string', 'skip_empty' => 1),
- 'EmailPassword' => Array ('type' => 'string'),
- 'FullName' => Array ('type' => 'string'),
- 'AltName' => Array ('type' => 'string'),
- 'SameImages' => Array ('type' => 'string'),
- 'LocalThumb' => Array ('type' => 'string'),
- 'ThumbPath' => Array ('type' => 'string'),
- 'ThumbUrl' => Array ('type' => 'string'),
- 'LocalImage' => Array ('type' => 'string'),
- 'LocalPath' => Array ('type' => 'string'),
- 'FullUrl' => Array ('type' => 'string'),
- 'SubscribeToMailing' => Array ('type' => 'int'),
- ),
-
- 'Grids' => Array(
- // not in use
- 'Default' => Array(
- 'Icons' => Array(
- 0 => 'icon16_user_disabled.png',
- 1 => 'icon16_user.png',
- 2 => 'icon16_user_pending.png'
- ),
- 'Fields' => Array(
- 'Username' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
- 'LastName' => Array ('filter_block' => 'grid_like_filter'),
- 'FirstName' => Array ('filter_block' => 'grid_like_filter'),
- 'Email' => Array ('filter_block' => 'grid_like_filter'),
- 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'),
- 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
- 'Modified' => Array('filter_block' => 'grid_date_range_filter'),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- ),
- ),
-
- // used
- 'UserSelector' => Array(
- 'Icons' => Array(
- 0 => 'icon16_user_disabled.png',
- 1 => 'icon16_user.png',
- 2 => 'icon16_user_pending.png'
- ),
- 'Selector' => 'radio',
- 'Fields' => Array(
- 'Username' => Array ('data_block' => 'grid_login_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- 'Modified' => Array('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- ),
- ),
-
- // used
- 'Admins' => Array (
- 'Icons' => Array(
- 0 => 'icon16_admin_disabled.png',
- 1 => 'icon16_admin.png',
- 2 => 'icon16_admin_disabled.png',
- ),
- 'Fields' => Array (
- 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
- 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- ),
- ),
-
- // used
- 'RegularUsers' => Array (
- 'Icons' => Array(
- 0 => 'icon16_user_disabled.png',
- 1 => 'icon16_user.png',
- 2 => 'icon16_user_pending.png'
- ),
- 'Fields' => Array(
- 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
- 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 140),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
- 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
- 'IPAddress' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100, 'hidden' => 1),
- 'EmailVerified' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
- ),
- ),
- ),
-
- );
\ No newline at end of file
+ 'default' => ''
+ ),
+ 'UserPassword' => Array ('type' => 'string', 'default' => ''),
+ 'UserRememberLogin' => Array ('type' => 'int', 'default' => 0),
+ ),
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1),
+ 'Username' => Array ('type' => 'string', 'not_null' => 1),
+ 'Password' => Array ('type' => 'string', 'skip_empty' => 1),
+ 'FirstName' => Array ('type' => 'string', 'not_null' => 1),
+ 'LastName' => Array ('type' => 'string', 'not_null' => 1),
+ 'Company' => Array ('type' => 'string', 'not_null' => 1),
+ 'Email' => Array ('type' => 'string', 'not_null' => 1),
+ 'CreatedOn' => Array ('type' => 'int'),
+ 'Phone' => Array ('type' => 'string', 'not_null' => 1),
+ 'Fax' => Array ('type' => 'string', 'not_null' => 1),
+ 'Street' => Array ('type' => 'string', 'not_null' => 1),
+ 'Street2' => Array ('type' => 'string', 'not_null' => 1),
+ 'City' => Array ('type' => 'string', 'not_null' => 1),
+ 'State' => Array ('type' => 'string', 'not_null' => 1),
+ 'Zip' => Array ('type' => 'string', 'not_null' => 1),
+ 'Country' => Array ('type' => 'string', 'not_null' => 1),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1),
+ 'Status' => Array ('type' => 'int', 'not_null' => 1),
+ 'Modified' => Array ('type' => 'int'),
+ 'dob' => Array ('type' => 'int'),
+ 'TimeZone' => Array ('type' => 'string', 'not_null' => 1),
+ 'IPAddress' => Array ('type' => 'string', 'not_null' => 1),
+ 'IsBanned' => Array ('type' => 'int', 'not_null' => 1),
+ 'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1),
+ 'PwRequestTime' => Array ('type' => 'int'),
+ 'FrontLanguage' => Array ('type' => 'int'),
+ 'AdminLanguage' => Array ('type' => 'int'),
+ 'DisplayToPublic' => Array ('type' => 'string'),
+ 'UserType' => Array ('type' => 'int', 'not_null' => 1),
+ 'PrimaryGroupId' => Array ('type' => 'int'),
+ 'OldStyleLogin' => Array ('type' => 'int', 'not_null' => 1),
+ 'IPRestrictions' => Array ('type' => 'string'),
+ 'EmailVerified' => Array ('type' => 'int', 'not_null' => 1),
+ 'PrevEmails' => Array ('type' => 'string'),
+ ),
+
+ 'VirtualFields' => Array (
+ 'PrimaryGroup' => Array ('type' => 'string'),
+ 'RootPassword' => Array ('type' => 'string', 'skip_empty' => 1),
+ 'EmailPassword' => Array ('type' => 'string'),
+ 'FullName' => Array ('type' => 'string'),
+ 'AltName' => Array ('type' => 'string'),
+ 'SameImages' => Array ('type' => 'string'),
+ 'LocalThumb' => Array ('type' => 'string'),
+ 'ThumbPath' => Array ('type' => 'string'),
+ 'ThumbUrl' => Array ('type' => 'string'),
+ 'LocalImage' => Array ('type' => 'string'),
+ 'LocalPath' => Array ('type' => 'string'),
+ 'FullUrl' => Array ('type' => 'string'),
+ 'SubscribeToMailing' => Array ('type' => 'int'),
+ ),
+
+ 'Grids' => Array (
+ // not in use
+ 'Default' => Array (
+ 'Icons' => Array (
+ 0 => 'icon16_user_disabled.png',
+ 1 => 'icon16_user.png',
+ 2 => 'icon16_user_pending.png'
+ ),
+ 'Fields' => Array (
+ 'Username' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
+ 'LastName' => Array ('filter_block' => 'grid_like_filter'),
+ 'FirstName' => Array ('filter_block' => 'grid_like_filter'),
+ 'Email' => Array ('filter_block' => 'grid_like_filter'),
+ 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter'),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ ),
+ ),
+
+ // used
+ 'UserSelector' => Array (
+ 'Icons' => Array (
+ 0 => 'icon16_user_disabled.png',
+ 1 => 'icon16_user.png',
+ 2 => 'icon16_user_pending.png'
+ ),
+ 'Selector' => 'radio',
+ 'Fields' => Array (
+ 'Username' => Array ('data_block' => 'grid_login_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ ),
+ ),
+
+ // used
+ 'Admins' => Array (
+ 'Icons' => Array (
+ 0 => 'icon16_admin_disabled.png',
+ 1 => 'icon16_admin.png',
+ 2 => 'icon16_admin_disabled.png',
+ ),
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
+ 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ ),
+ ),
+
+ // used
+ 'RegularUsers' => Array (
+ 'Icons' => Array (
+ 0 => 'icon16_user_disabled.png',
+ 1 => 'icon16_user.png',
+ 2 => 'icon16_user_pending.png'
+ ),
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
+ 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 140),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
+ 'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
+ 'IPAddress' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100, 'hidden' => 1),
+ 'EmailVerified' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/favorites/favorites_config.php
===================================================================
--- branches/5.3.x/core/units/favorites/favorites_config.php (revision 15658)
+++ branches/5.3.x/core/units/favorites/favorites_config.php (revision 15659)
@@ -1,72 +1,71 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'fav',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'FavoritesEventHandler', 'file' => 'favorites_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'Hooks' => Array (
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '#PARENT#',
- 'HookToSpecial' => '-item', // from OnMassDelete event
- 'HookToEvent' => Array('OnAfterItemDelete'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnDeleteFavoriteItem',
- ),
+$config = Array (
+ 'Prefix' => 'fav',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FavoritesEventHandler', 'file' => 'favorites_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '-item', // from OnMassDelete event
+ 'HookToEvent' => Array ('OnAfterItemDelete'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnDeleteFavoriteItem',
),
+ ),
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'FavoriteId',
- 'TableName' => TABLE_PREFIX.'UserFavorites',
-
- 'ParentTableKey' => 'PortalUserId',
- 'ForeignKey' => 'PortalUserId',
- 'ParentPrefix' => 'u',
-
- 'AutoDelete' => true,
- 'AutoClone' => false,
-
- 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
- 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
-
- 'ListSortings' => Array (
- '' => Array(
- 'Sorting' => Array('Modified' => 'desc'),
- )
- ),
-
- 'Fields' => Array (
- 'FavoriteId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'ItemTypeId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'Modified' => Array('type' => 'int','not_null' => 1, 'default' => '#NOW#'),
- ),
- );
\ No newline at end of file
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'FavoriteId',
+ 'TableName' => TABLE_PREFIX.'UserFavorites',
+
+ 'ParentTableKey' => 'PortalUserId',
+ 'ForeignKey' => 'PortalUserId',
+ 'ParentPrefix' => 'u',
+
+ 'AutoDelete' => true,
+ 'AutoClone' => false,
+
+ 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Modified' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FavoriteId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ItemTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Modified' => Array ('type' => 'int', 'not_null' => 1, 'default' => '#NOW#'),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/files/files_config.php
===================================================================
--- branches/5.3.x/core/units/files/files_config.php (revision 15658)
+++ branches/5.3.x/core/units/files/files_config.php (revision 15659)
@@ -1,96 +1,93 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => '#file',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'FileEventHandler', 'file' => 'file_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'FileTagProcessor', 'file' => 'file_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'FileId',
- 'StatusField' => Array('Status'),
-
- 'TitleField' => 'FileName',
- 'TableName' => TABLE_PREFIX.'CatalogFiles',
-
- 'ParentTableKey' => 'ResourceId',
- 'ForeignKey' => 'ResourceId',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array (
- '' => 'SELECT * FROM %s',
- ),
-
- 'ItemSQLs' => Array (
- '' => 'SELECT * FROM %s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('FileName' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
- 'FilePath' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => false,
- 'size_field' => 'Size', 'content_type_field' => 'MimeType', 'max_size' => 50000000,
- 'allowed_types' => Array (
- 'video/x-flv', 'video/quicktime', 'video/x-sgi-movie', 'video/mpeg',
- 'video/x-msvideo', 'video/x-msvideo', 'application/x-shockwave-flash', 'video/x-fli',
- 'application/pdf', 'application/msexcel', 'application/vnd.ms-excel', 'application/msword',
- 'application/mspowerpoint', 'application/zip', 'text/plain', 'application/x-gzip',
- ),
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'Size' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1,
+$config = Array (
+ 'Prefix' => '#file',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FileEventHandler', 'file' => 'file_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FileTagProcessor', 'file' => 'file_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'FileId',
+ 'StatusField' => Array ('Status'),
+
+ 'TitleField' => 'FileName',
+ 'TableName' => TABLE_PREFIX.'CatalogFiles',
+
+ 'ParentTableKey' => 'ResourceId',
+ 'ForeignKey' => 'ResourceId',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('FileName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'FilePath' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => false,
+ 'size_field' => 'Size', 'content_type_field' => 'MimeType', 'max_size' => 50000000,
+ 'allowed_types' => Array (
+ 'video/x-flv', 'video/quicktime', 'video/x-sgi-movie', 'video/mpeg',
+ 'video/x-msvideo', 'video/x-msvideo', 'application/x-shockwave-flash', 'video/x-fli',
+ 'application/pdf', 'application/msexcel', 'application/vnd.ms-excel', 'application/msword',
+ 'application/mspowerpoint', 'application/zip', 'text/plain', 'application/x-gzip',
),
- 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
- 'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'not_null' => 1, 'required' => 1, 'default' => ''
),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
- 'Fields' => Array(
- 'FileId' => Array ('title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
- 'FileName' => Array ('filter_block' => 'grid_like_filter'),
- 'Status' => Array ('filter_block' => 'grid_options_filter'),
- ),
+ 'Size' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
+ 'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
+ 'Fields' => Array (
+ 'FileId' => Array ('title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
+ 'FileName' => Array ('filter_block' => 'grid_like_filter'),
+ 'Status' => Array ('filter_block' => 'grid_options_filter'),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/helpers/controls/controls_config.php
===================================================================
--- branches/5.3.x/core/units/helpers/controls/controls_config.php (revision 15658)
+++ branches/5.3.x/core/units/helpers/controls/controls_config.php (revision 15659)
@@ -1,25 +1,25 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'control-helpers',
- 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+$config = Array (
+ 'Prefix' => 'control-helpers',
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo' => 'MInputHelper', 'class' => 'MInputHelper', 'file' => 'minput_helper.php', 'build_event' => ''),
- Array('pseudo' => 'EditPickerHelper', 'class' => 'EditPickerHelper', 'file' => 'edit_picker_helper.php', 'build_event' => ''),
- ),
- );
\ No newline at end of file
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'MInputHelper', 'class' => 'MInputHelper', 'file' => 'minput_helper.php', 'build_event' => ''),
+ Array ('pseudo' => 'EditPickerHelper', 'class' => 'EditPickerHelper', 'file' => 'edit_picker_helper.php', 'build_event' => ''),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/stop_words/stop_words_config.php
===================================================================
--- branches/5.3.x/core/units/stop_words/stop_words_config.php (revision 15658)
+++ branches/5.3.x/core/units/stop_words/stop_words_config.php (revision 15659)
@@ -1,99 +1,100 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'stop-word',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'StopWordId',
-
- 'TableName' => TABLE_PREFIX.'StopWords',
-
- 'TitleField' => 'StopWord',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('stop-word' => '!la_title_AddingStopWord!'),
- 'edit_status_labels' => Array ('stop-word' => '!la_title_EditingStopWord!'),
+$config = Array (
+ 'Prefix' => 'stop-word',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'StopWordId',
+
+ 'TableName' => TABLE_PREFIX.'StopWords',
+
+ 'TitleField' => 'StopWord',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('stop-word' => '!la_title_AddingStopWord!'),
+ 'edit_status_labels' => Array ('stop-word' => '!la_title_EditingStopWord!'),
+ ),
+
+ 'stop_word_list' => Array (
+ 'prefixes' => Array ('stop-word_List'), 'format' => "!la_title_StopWords!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'stop_word_edit' => Array (
+ 'prefixes' => Array ('stop-word'), 'format' => "#stop-word_status# '#stop-word_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:stop_words'),
+
+ 'Sections' => Array (
+ 'in-portal:stop_words' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_stopwords',
+ 'label' => 'la_title_StopWords',
+ 'url' => Array ('t' => 'stop_words/stop_word_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 8,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('StopWord' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'StopWordId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'StopWord' => Array ('type' => 'string', 'unique' => Array (), 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
),
-
- 'stop_word_list' => Array (
- 'prefixes' => Array ('stop-word_List'), 'format' => "!la_title_StopWords!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'stop_word_edit' => Array (
- 'prefixes' => Array ('stop-word'), 'format' => "#stop-word_status# '#stop-word_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:stop_words'),
-
- 'Sections' => Array (
- 'in-portal:stop_words' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_stopwords',
- 'label' => 'la_title_StopWords',
- 'url' => Array('t' => 'stop_words/stop_word_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 8,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('StopWord' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'StopWordId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'StopWord' => Array ('type' => 'string', 'unique' => Array (), 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'StopWordId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'StopWord' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- ),
+ 'Fields' => Array (
+ 'StopWordId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'StopWord' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/selectors/selectors_config.php
===================================================================
--- branches/5.3.x/core/units/selectors/selectors_config.php (revision 15658)
+++ branches/5.3.x/core/units/selectors/selectors_config.php (revision 15659)
@@ -1,148 +1,149 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'selectors',
- 'ItemClass' => Array('class'=>'SelectorsItem','file'=>'selectors_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'SelectorsEventHandler','file'=>'selectors_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'SelectorsTagProcessor','file'=>'selectors_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'Clones' => Array(
- 'selectorsbase' => Array(
- 'Hooks' => Array(),
- 'Constrain' => 'Type = 1',
- 'SubItems' => Array('selectorsblock'),
- ),
-
- 'selectorsblock' => Array(
- 'Hooks' => Array(),
- 'Constrain' => 'Type = 2',
- 'ForeignKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'ParentId'),
- 'ParentTableKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'SelectorId'),
- 'ParentPrefix' => 'selectorsbase',
- ),
- ),
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'selectors',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array('OnItemBuild'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnPrepareBaseStyles',
- ),
-
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'selectors',
- 'HookToSpecial' => 'block',
- 'HookToEvent' => Array('OnListBuild'),
- 'DoPrefix' => '',
- 'DoSpecial' => 'block',
- 'DoEvent' => 'OnPrepareBaseStyles',
- ),
- ),
-
- 'MyHooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => Array('Prefix1.*', 'Prefix2.Special1'),
- 'HookToEvents' => Array('OnBeforeItemUpdate', 'OnBeforeItemCreate'),
- 'DoPrefix' => Array('Prefix1.*', 'Prefix2.Special1'),
- 'DoEvent' => 'OnMyEvent',
- ),
- ),
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
- 'IDField' => 'SelectorId',
-
- 'TitleField' => 'Name',
-
- 'TableName' => TABLE_PREFIX.'StylesheetSelectors',
-
- 'ForeignKey' => 'StylesheetId',
- 'ParentTableKey' => 'StylesheetId',
- 'ParentPrefix' => 'css',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array( ''=>' SELECT %1$s.*
- FROM %s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
- )
- ),
- 'Fields' => Array(
- 'SelectorId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'StylesheetId' => Array('type' => 'int', 'unique'=>Array('SelectorName'), 'current_table_only' => 1, 'not_null' => 1, 'default' => 0),
- 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'SelectorName' => Array('type' => 'string', 'unique'=>Array('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1','default' => '','required'=>1),
- 'SelectorData' => Array('type' => 'string', 'default' => NULL),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'AdvancedCSS' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'required' => 1, 'not_null' => 1, 'default' => 0),
- ),
-
- 'VirtualFields' => Array(
- 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>''),
- 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder'), 'default' => ''),
- 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning'), 'default' => ''),
- 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group'), 'default' => ''),
- 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify'), 'default' => ''),
- 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink'), 'default' => ''),
- 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse'), 'default' => ''),
- 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed'), 'default' => ''),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default'=>'icon16_selector.gif'),
- 'Fields' => Array(
- 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
- 'SelectorName' => Array ('filter_block' => 'grid_like_filter'),
- 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'),
- ),
- ),
-
- 'BlockStyles' => Array(
- 'Icons' => Array('default'=>'icon16_selector.gif'),
- 'Fields' => Array(
- 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
- 'SelectorName' => Array ('filter_block' => 'grid_like_filter'),
- 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'),
- 'ParentId' => Array ('title' => 'la_col_Basedon', 'filter_block' => 'grid_options_filter'),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'selectors',
+ 'ItemClass' => Array ('class' => 'SelectorsItem', 'file' => 'selectors_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'SelectorsEventHandler', 'file' => 'selectors_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'SelectorsTagProcessor', 'file' => 'selectors_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'Clones' => Array (
+ 'selectorsbase' => Array (
+ 'Hooks' => Array (),
+ 'Constrain' => 'Type = 1',
+ 'SubItems' => Array ('selectorsblock'),
+ ),
+
+ 'selectorsblock' => Array (
+ 'Hooks' => Array (),
+ 'Constrain' => 'Type = 2',
+ 'ForeignKey' => Array ('css' => 'StylesheetId', 'selectorsbase' => 'ParentId'),
+ 'ParentTableKey' => Array ('css' => 'StylesheetId', 'selectorsbase' => 'SelectorId'),
+ 'ParentPrefix' => 'selectorsbase',
+ ),
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'selectors',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array ('OnItemBuild'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnPrepareBaseStyles',
+ ),
+
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'selectors',
+ 'HookToSpecial' => 'block',
+ 'HookToEvent' => Array ('OnListBuild'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => 'block',
+ 'DoEvent' => 'OnPrepareBaseStyles',
+ ),
+ ),
+
+ 'MyHooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => Array ('Prefix1.*', 'Prefix2.Special1'),
+ 'HookToEvents' => Array ('OnBeforeItemUpdate', 'OnBeforeItemCreate'),
+ 'DoPrefix' => Array ('Prefix1.*', 'Prefix2.Special1'),
+ 'DoEvent' => 'OnMyEvent',
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'SelectorId',
+
+ 'TitleField' => 'Name',
+
+ 'TableName' => TABLE_PREFIX.'StylesheetSelectors',
+
+ 'ForeignKey' => 'StylesheetId',
+ 'ParentTableKey' => 'StylesheetId',
+ 'ParentPrefix' => 'css',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.*
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'SelectorId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'StylesheetId' => Array ('type' => 'int', 'unique'=>Array ('SelectorName'), 'current_table_only' => 1, 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'SelectorName' => Array ('type' => 'string', 'unique'=>Array ('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'SelectorData' => Array ('type' => 'string', 'default' => NULL),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>Array ( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'AdvancedCSS' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'required' => 1, 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'VirtualFields' => Array (
+ 'FontStyle' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'normal' => 'normal', 'italic' => 'italic', 'oblique' => 'oblique'), 'default' => ''),
+ 'FontWeight' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', '100' => '100', '200' => '200', '300' => '300', 'normal' => 'normal', '500' => '500', '600' => '600', 'bold' => 'bold', '800' => '800', '900' => '900', 'lighter' => 'lighter', 'bolder' => 'bolder'), 'default' => ''),
+ 'StyleCursor' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'default' => 'default', 'auto' => 'auto', 'n-resize' => 'n-resize', 'ne-resize' => 'ne-resize', 'e-resize' => 'e-resize', 'se-resize' => 'se-resize', 's-resize' => 's-resize', 'sw-resize' => 'sw-resize', 'w-resize' => 'w-resize', 'nw-resize' => 'nw-resize', 'crosshair' => 'crosshair', 'pointer' => 'pointer', 'move' => 'move', 'text' => 'text', 'wait' => 'wait', 'help' => 'help', 'hand' => 'hand', 'all-scroll' => 'all-scroll', 'col-resize' => 'col-resize', 'row-resize' => 'row-resize', 'no-drop' => 'no-drop', 'not-allowed' => 'not-allowed', 'progress' => 'progress', 'vertical-text' => 'vertical-text', 'alias' => 'alias', 'cell' => 'cell', 'copy' => 'copy', 'count-down' => 'count-down', 'count-up' => 'count-up', 'count-up-down' => 'count-up-down', 'grab' => 'grab', 'grabbing' => 'grabbing', 'spinning' => 'spinning'), 'default' => ''),
+ 'StyleDisplay' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'none' => 'none', 'inline' => 'inline', 'block' => 'block', 'inline-block' => 'inline-block', 'list-item' => 'list-item', 'marker' => 'marker', 'compact' => 'compact', 'run-in' => 'run-in', 'table-header-group' => 'table-header-group', 'table-footer-group' => 'table-footer-group', 'table' => 'table', 'inline-table' => 'inline-table', 'table-caption' => 'table-caption', 'table-row' => 'table-row', 'table-row-group' => 'table-row-group', 'table-column' => 'table-column', 'table-column-group' => 'table-column-group'), 'default' => ''),
+ 'TextAlign' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'left' => 'left', 'right' => 'right', 'center' => 'center', 'justify' => 'justify'), 'default' => ''),
+ 'TextDecoration' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'none' => 'none', 'underline' => 'underline', 'overline' => 'overline', 'line-through' => 'line-through', 'blink' => 'blink'), 'default' => ''),
+ 'StyleVisibility' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'visible' => 'visible', 'hidden' => 'hidden', 'collapse' => 'collapse'), 'default' => ''),
+ 'StylePosition' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'static' => 'static', 'relative' => 'relative', 'absolute' => 'absolute', 'fixed' => 'fixed'), 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_selector.gif'),
+ 'Fields' => Array (
+ 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
+ 'SelectorName' => Array ('filter_block' => 'grid_like_filter'),
+ 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'),
+ ),
+ ),
+
+ 'BlockStyles' => Array (
+ 'Icons' => Array ('default' => 'icon16_selector.gif'),
+ 'Fields' => Array (
+ 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
+ 'SelectorName' => Array ('filter_block' => 'grid_like_filter'),
+ 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'),
+ 'ParentId' => Array ('title' => 'la_col_Basedon', 'filter_block' => 'grid_options_filter'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/fck/fck_config.php
===================================================================
--- branches/5.3.x/core/units/fck/fck_config.php (revision 15658)
+++ branches/5.3.x/core/units/fck/fck_config.php (revision 15659)
@@ -1,50 +1,38 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'fck',
+$config = Array (
+ 'Prefix' => 'fck',
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'event',
- ),
-
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'FckEventHandler','file'=>'fck_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'FckTagProcessor', 'file' => 'fck_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'IDField' => '',
-
- 'ParentTableKey' => '',
- 'ForeignKey' => '',
- 'AutoDelete' => false,
- 'AutoClone' => false,
-
- 'CalculatedFields' => Array (
- '' => Array(),
- ),
-
-// 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-// 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'Fields' => Array (
-// 'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
-// 'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
- );
\ No newline at end of file
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'event',
+ ),
+
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FckEventHandler', 'file' => 'fck_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FckTagProcessor', 'file' => 'fck_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'IDField' => '',
+
+ 'ParentTableKey' => '',
+ 'ForeignKey' => '',
+ 'AutoDelete' => false,
+ 'AutoClone' => false,
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/custom_data/custom_data_config.php
===================================================================
--- branches/5.3.x/core/units/custom_data/custom_data_config.php (revision 15658)
+++ branches/5.3.x/core/units/custom_data/custom_data_config.php (revision 15659)
@@ -1,49 +1,52 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'cdata',
+$config = Array (
+ 'Prefix' => 'cdata',
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'event',
- ),
-
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'CustomDataEventHandler', 'file' => 'custom_data_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
-
- 'IDField' => 'CustomDataId',
-
- 'ParentTableKey' => 'ResourceId',
- 'ForeignKey' => 'ResourceId',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'CalculatedFields' => Array (
- '' => Array(),
- ),
-
- 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
- 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'Fields' => Array (
- 'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
- );
\ No newline at end of file
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'event',
+ ),
+
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CustomDataEventHandler', 'file' => 'custom_data_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'IDField' => 'CustomDataId',
+
+ 'ParentTableKey' => 'ResourceId',
+ 'ForeignKey' => 'ResourceId',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'CalculatedFields' => Array (
+ '' => Array (),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s'
+ ),
+
+ 'Fields' => Array (
+ 'CustomDataId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/session_logs/session_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/session_logs/session_logs_config.php (revision 15658)
+++ branches/5.3.x/core/units/logs/session_logs/session_logs_config.php (revision 15659)
@@ -1,155 +1,153 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'session-log',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'SessionLogEventHandler', 'file' => 'session_log_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'Hooks' => Array (
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterLogin'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnStartSession',
- ),
-
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnBeforeLogout'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnEndSession',
- ),
- ),
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'SessionLogId',
- 'StatusField' => Array ('Status'),
-
- 'TableName' => TABLE_PREFIX.'UserSessionLogs',
-
- 'TitlePresets' => Array (
- 'session_log_list' => Array ('prefixes' => Array('session-log_List'), 'format' => '!la_tab_SessionLogs!',
- 'toolbar_buttons' => Array ('delete', 'view'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:session_logs'),
-
- // don't forget to add corresponding permissions to install script
- // INSERT INTO Permissions VALUES (0, 'in-portal:session_logs.view', 11, 1, 1, 0), (0, 'in-portal:session_logs.delete', 11, 1, 1, 0);
- 'Sections' => Array (
- 'in-portal:session_logs' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'sessions_log',
- 'label' => 'la_tab_SessionLog', // 'la_tab_SessionLogs',
- 'url' => Array('t' => 'logs/session_logs/session_log_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'delete'),
- 'priority' => 2,
-// 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
- ),
- ),
-
- 'TitleField' => 'SessionLogId',
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users AS u ON u.PortalUserId = %1$s.PortalUserId',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('SessionLogId' => 'desc'),
- )
- ),
-
- 'CalculatedFields' => Array(
- '' => Array(
- 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
- 'UserFirstName' => 'u.FirstName',
- 'UserLastName' => 'u.LastName',
- 'UserEmail' => 'u.Email',
- 'Duration' => 'IFNULL(SessionEnd, UNIX_TIMESTAMP())-SessionStart',
- ),
- ),
-
- 'ForceDontLogChanges' => true,
-
- 'Fields' => Array (
- 'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SessionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array (
- 'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options'=> array(0 => 'la_opt_Active', 1 => 'la_opt_LoggedOut', 2 => 'la_opt_Expired'),
- 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
- 'SessionStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
- 'SessionEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
- 'IP' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
- 'AffectedItems' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'VirtualFields' => Array(
- 'Duration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'time_format' => 'H:i:s', 'use_timezone' => false, 'default' => NULL),
- 'UserLogin' => Array ('type' => 'string', 'default' => ''),
- 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
- 'UserLastName' => Array ('type' => 'string', 'default' => ''),
- 'UserEmail' => Array ('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'SessionLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'SessionStart' => Array ('title' => 'la_col_SessionStart', 'filter_block' => 'grid_date_range_filter', 'width' => 120, ),
- 'SessionEnd' => Array ('title' => 'la_col_SessionEnd', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Duration' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'IP' => Array ('title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'AffectedItems' => Array ('title' => 'la_col_AffectedItems', 'data_block' => 'affected_td', 'filter_block' => 'grid_range_filter', 'width' => 120, ),
- ),
+$config = Array (
+ 'Prefix' => 'session-log',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'SessionLogEventHandler', 'file' => 'session_log_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'u',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterLogin'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnStartSession',
+ ),
+
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'u',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnBeforeLogout'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnEndSession',
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'SessionLogId',
+ 'StatusField' => Array ('Status'),
+
+ 'TableName' => TABLE_PREFIX.'UserSessionLogs',
+
+ 'TitlePresets' => Array (
+ 'session_log_list' => Array ('prefixes' => Array ('session-log_List'), 'format' => '!la_tab_SessionLogs!',
+ 'toolbar_buttons' => Array ('delete', 'view'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:session_logs'),
+
+ 'Sections' => Array (
+ 'in-portal:session_logs' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'sessions_log',
+ 'label' => 'la_tab_SessionLog', // 'la_tab_SessionLogs',
+ 'url' => Array ('t' => 'logs/session_logs/session_log_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'delete'),
+ 'priority' => 2,
+// 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitleField' => 'SessionLogId',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Users AS u ON u.PortalUserId = %1$s.PortalUserId',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('SessionLogId' => 'desc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
+ 'UserFirstName' => 'u.FirstName',
+ 'UserLastName' => 'u.LastName',
+ 'UserEmail' => 'u.Email',
+ 'Duration' => 'IFNULL(SessionEnd, UNIX_TIMESTAMP())-SessionStart',
+ ),
+ ),
+
+ 'ForceDontLogChanges' => true,
+
+ 'Fields' => Array (
+ 'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SessionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options'=> Array (0 => 'la_opt_Active', 1 => 'la_opt_LoggedOut', 2 => 'la_opt_Expired'),
+ 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'SessionStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
+ 'SessionEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
+ 'IP' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
+ 'AffectedItems' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Duration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'time_format' => 'H:i:s', 'use_timezone' => false, 'default' => NULL),
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'SessionLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'SessionStart' => Array ('title' => 'la_col_SessionStart', 'filter_block' => 'grid_date_range_filter', 'width' => 120, ),
+ 'SessionEnd' => Array ('title' => 'la_col_SessionEnd', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Duration' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'IP' => Array ('title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'AffectedItems' => Array ('title' => 'la_col_AffectedItems', 'data_block' => 'affected_td', 'filter_block' => 'grid_range_filter', 'width' => 120, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/system_logs/system_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/system_logs/system_logs_config.php (revision 15658)
+++ branches/5.3.x/core/units/logs/system_logs/system_logs_config.php (revision 15659)
@@ -1,205 +1,205 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2012 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!');
$config = Array (
'Prefix' => 'system-log',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'SystemLogEventHandler', 'file' => 'system_log_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'SystemLogTagProcessor', 'file' => 'system_log_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ScheduledTasks' => Array (
- 'system_log_notifications' => Array('EventName' => 'OnSendNotifications', 'RunSchedule' => '0 * * * *'),
- 'rotate_system_logs' => Array('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'),
+ 'system_log_notifications' => Array ('EventName' => 'OnSendNotifications', 'RunSchedule' => '0 * * * *'),
+ 'rotate_system_logs' => Array ('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'),
),
'IDField' => 'LogId',
- //'StatusField' => Array ('Status'),
+// 'StatusField' => Array ('Status'),
'TableName' => TABLE_PREFIX . 'SystemLog',
'TitlePresets' => Array (
'default' => Array (
'edit_status_labels' => Array ('system-log' => '!la_title_ViewingSystemLog!'),
),
'system_log_list' => Array (
- 'prefixes' => Array('system-log_List'), 'format' => '!la_tab_SystemLog!',
+ 'prefixes' => Array ('system-log_List'), 'format' => '!la_tab_SystemLog!',
'toolbar_buttons' => Array ('edit', 'delete', 'reset', 'view', 'dbl-click'),
),
'system_log_edit' => Array (
- 'prefixes' => Array('system-log'), 'format' => '#system-log_status# "#system-log_titlefield#"',
+ 'prefixes' => Array ('system-log'), 'format' => '#system-log_status# "#system-log_titlefield#"',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array ('main' => 'in-portal:system_logs'),
'Sections' => Array (
'in-portal:system_logs' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'system_log',
- 'label' => 'la_tab_SystemLog',
- 'url' => Array('t' => 'logs/system_logs/system_log_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'edit', 'delete'),
- 'priority' => 6.1,
- 'type' => stTREE,
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'system_log',
+ 'label' => 'la_tab_SystemLog',
+ 'url' => Array ('t' => 'logs/system_logs/system_log_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit', 'delete'),
+ 'priority' => 6.1,
+ 'type' => stTREE,
),
),
'TitleField' => 'LogMessage',
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Users AS u ON u.PortalUserId = %1$s.LogUserId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('LogId' => 'desc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'Username' => 'CASE %1$s.LogUserId WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(u.FirstName, u.LastName) <> "", CONCAT(u.FirstName, " ", u.LastName), u.Username) END',
),
),
'ForceDontLogChanges' => true,
'Fields' => Array (
'LogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LogUniqueId' => Array ('type' => 'int', 'default' => NULL),
'LogLevel' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (
kLogger::LL_EMERGENCY => 'emergency',
kLogger::LL_ALERT => 'alert',
kLogger::LL_CRITICAL => 'critical',
kLogger::LL_ERROR => 'error',
kLogger::LL_WARNING => 'warning',
kLogger::LL_NOTICE => 'notice',
kLogger::LL_INFO => 'info',
kLogger::LL_DEBUG => 'debug'
),
'not_null' => 1, 'default' => kLogger::LL_INFO
),
'LogType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (
kLogger::LT_PHP => 'la_opt_LogTypePhp',
kLogger::LT_DATABASE => 'la_opt_LogTypeDatabase',
kLogger::LT_OTHER => 'la_opt_LogTypeOther',
), 'use_phrases' => 1,
'not_null', 'default' => kLogger::LT_OTHER
),
'LogCode' => Array ('type' => 'int', 'default' => NULL),
'LogMessage' => Array ('type' => 'string', 'default' => NULL),
'LogTimestamp' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter',
'default' => NULL
),
'LogDate' => Array ('type' => 'string', 'default' => NULL),
'LogEventName' => Array ('type' => 'string', 'max_len' => 100, 'not_null' => 1, 'default' => ''),
'LogHostname' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'LogRequestSource' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Web', 2 => 'CLI'),
'default' => NULL
),
'LogRequestURI' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'LogRequestData' => Array ('type' => 'string', 'default' => NULL),
'LogUserId' => Array (
'type' => 'int',
'default' => NULL
),
'LogInterface' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (
kLogger::LI_FRONT => 'Front',
kLogger::LI_ADMIN => 'Admin',
kLogger::LI_CRON_FRONT => 'Cron (Front)',
kLogger::LI_CRON_ADMIN => 'Cron (Admin)',
kLogger::LI_API => 'API',
),
'not_null' => 1, 'default' => 0
),
'IpAddress' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
'LogSessionKey' => Array ('type' => 'int', 'default' => NULL),
'LogSessionData' => Array ('type' => 'string', 'default' => NULL),
'LogBacktrace' => Array ('type' => 'string', 'default' => NULL),
'LogSourceFilename' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'LogSourceFileLine' => Array ('type' => 'int', 'default' => NULL),
'LogProcessId' => Array ('type' => 'int', 'default' => NULL),
'LogMemoryUsed' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LogUserData' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'LogNotificationStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (
kLogger::LNS_DISABLED => 'la_opt_LogNotificationDisabled',
kLogger::LNS_PENDING => 'la_opt_LogNotificationPending',
kLogger::LNS_SENT => 'la_opt_LogNotificationSent'
), 'use_phrases' => 1,
'not_null' => 1, 'default' => kLogger::LNS_DISABLED
)
),
'VirtualFields' => Array (
'Username' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
// 'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'LogId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
'LogLevel' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'LogType' => Array ('filter_block' => 'grid_options_filter', 'width' => 80),
'LogCode' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'LogMessage' => Array ('filter_block' => 'grid_like_filter', 'width' => 250),
'LogTimestamp' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'LogEventName' => Array ('filter_block' => 'grid_like_filter'),
'LogHostname' => Array ('filter_block' => 'grid_like_filter'),
'LogRequestSource' => Array ('filter_block' => 'grid_options_filter'),
'LogRequestURI' => Array ('data_block' => 'grid_uri_td', 'filter_block' => 'grid_like_filter'),
'Username' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'LogInterface' => Array ('filter_block' => 'grid_options_filter'),
'IpAddress' => Array ('filter_block' => 'grid_like_filter'),
'LogSessionKey' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'LogSourceFilename' => Array ('data_block' => 'grid_filename_td', 'filter_block' => 'grid_like_filter', 'width' => 200),
'LogSourceFileLine' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'LogProcessId' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'LogMemoryUsed' => Array ('data_block' => 'grid_memory_td', 'filter_block' => 'grid_range_filter'),
'LogUserData' => Array ('filter_block' => 'grid_like_filter', 'nl2br' => 1),
'LogNotificationStatus' => Array ('filter_block' => 'grid_options_filter'),
'LogBacktrace' => Array ('data_block' => 'grid_backtrace_td', 'filter_block' => 'grid_empty_filter', 'width' => 500, 'hidden' => 1),
),
),
),
-);
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/change_logs/change_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/change_logs/change_logs_config.php (revision 15658)
+++ branches/5.3.x/core/units/logs/change_logs/change_logs_config.php (revision 15659)
@@ -1,160 +1,157 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'change-log',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ChangeLogEventHandler', 'file' => 'change_log_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ChangeLogTagProcessor', 'file' => 'change_log_tp.php', 'build_event' => 'OnBuild'),
-
- 'RegisterClasses' => Array (
- Array ('pseudo' => 'kChangesFormatter', 'class' => 'kChangesFormatter', 'file' => 'changes_formatter.php', 'build_event' => ''),
- ),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'ChangeLogId',
- //'StatusField' => Array ('Status'),
- 'TableName' => TABLE_PREFIX.'ChangeLogs',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'edit_status_labels' => Array ('change-log' => '!la_title_EditingChangeLog!'),
- ),
-
- 'change_log_list' => Array (
- 'prefixes' => Array('change-log_List'), 'format' => '!la_tab_ChangeLog!',
- 'toolbar_buttons' => Array ('edit', 'delete', 'view'),
- ),
-
- 'change_log_edit' => Array (
- 'prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array ('main' => 'in-portal:change_logs'),
-
- // don't forget to add corresponding permissions to install script
- // INSERT INTO Permissions VALUES (0, 'in-portal:change_logs.view', 11, 1, 1, 0), (0, 'in-portal:change_logs.add', 11, 1, 1, 0), (0, 'in-portal:change_logs.edit', 11, 1, 1, 0), (0, 'in-portal:change_logs.delete', 11, 1, 1, 0);
- 'Sections' => Array (
- 'in-portal:change_logs' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'changes_log', // 'change_logs',
- 'label' => 'la_tab_ChangeLog',
- 'url' => Array('t' => 'logs/change_logs/change_log_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'edit', 'delete'),
- 'priority' => 3,
-// 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
- ),
- ),
-
- 'TitleField' => 'ChangeLogId',
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Users AS u ON u.PortalUserId = %1$s.PortalUserId',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('OccuredOn' => 'desc'),
- )
- ),
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
- 'UserFirstName' => 'u.FirstName',
- 'UserLastName' => 'u.LastName',
- 'UserEmail' => 'u.Email',
- ),
- ),
-
- 'ForceDontLogChanges' => true,
-
- 'Fields' => Array (
- 'ChangeLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Action' => Array (
- 'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => array (ChangeLog::CREATE => 'la_opt_ActionCreate', ChangeLog::UPDATE => 'la_opt_ActionUpdate', ChangeLog::DELETE => 'la_opt_ActionDelete'),
- 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'OccuredOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
- 'Prefix' => Array (
- 'type' => 'string', 'formatter' => 'kOptionsFormatter',
- 'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
- 'option_key_field' => 'Prefix',
- 'option_title_field' => 'CONCAT(\'la_prefix_\', Prefix) AS Phrase',
- 'use_phrases' => 1,
- 'max_len' => 255, 'not_null' => 1, 'default' => ''
- ),
- 'ItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Changes' => Array ('type' => 'string', 'formatter' => 'kChangesFormatter', 'default' => NULL),
- 'MasterPrefix' => Array (
- 'type' => 'string', 'formatter' => 'kOptionsFormatter',
- 'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
- 'option_key_field' => 'MasterPrefix',
- 'option_title_field' => 'CONCAT(\'la_prefix_\',MasterPrefix) AS Phrase',
- 'use_phrases' => 1,
- 'max_len' => 255, 'not_null' => 1, 'default' => ''
- ),
- 'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'VirtualFields' => Array (
- 'UserLogin' => Array ('type' => 'string', 'default' => ''),
- 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
- 'UserLastName' => Array ('type' => 'string', 'default' => ''),
- 'UserEmail' => Array ('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'ChangeLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
- 'SessionLogId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
- 'Action' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
- 'OccuredOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- 'MasterPrefix' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
- 'MasterId' => Array ('filter_block' => 'grid_range_filter', 'width' => 90, ),
- 'Prefix' => Array ('title' => 'column:la_fld_ItemPrefix', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
- 'ItemId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
- 'Changes' => Array ('data_block' => 'grid_changes_td', 'filter_block' => 'grid_like_filter', 'format' => 'auto_cut', 'width' => 225, ),
- ),
+$config = Array (
+ 'Prefix' => 'change-log',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ChangeLogEventHandler', 'file' => 'change_log_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ChangeLogTagProcessor', 'file' => 'change_log_tp.php', 'build_event' => 'OnBuild'),
+
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kChangesFormatter', 'class' => 'kChangesFormatter', 'file' => 'changes_formatter.php', 'build_event' => ''),
+ ),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'ChangeLogId',
+ 'TableName' => TABLE_PREFIX.'ChangeLogs',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'edit_status_labels' => Array ('change-log' => '!la_title_EditingChangeLog!'),
+ ),
+
+ 'change_log_list' => Array (
+ 'prefixes' => Array ('change-log_List'), 'format' => '!la_tab_ChangeLog!',
+ 'toolbar_buttons' => Array ('edit', 'delete', 'view'),
+ ),
+
+ 'change_log_edit' => Array (
+ 'prefixes' => Array ('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:change_logs'),
+
+ 'Sections' => Array (
+ 'in-portal:change_logs' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'changes_log', // 'change_logs',
+ 'label' => 'la_tab_ChangeLog',
+ 'url' => Array ('t' => 'logs/change_logs/change_log_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit', 'delete'),
+ 'priority' => 3,
+// 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitleField' => 'ChangeLogId',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Users AS u ON u.PortalUserId = %1$s.PortalUserId',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('OccuredOn' => 'desc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
+ 'UserFirstName' => 'u.FirstName',
+ 'UserLastName' => 'u.LastName',
+ 'UserEmail' => 'u.Email',
+ ),
+ ),
+
+ 'ForceDontLogChanges' => true,
+
+ 'Fields' => Array (
+ 'ChangeLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Action' => Array (
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => array (ChangeLog::CREATE => 'la_opt_ActionCreate', ChangeLog::UPDATE => 'la_opt_ActionUpdate', ChangeLog::DELETE => 'la_opt_ActionDelete'),
+ 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'OccuredOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
+ 'Prefix' => Array (
+ 'type' => 'string', 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
+ 'option_key_field' => 'Prefix',
+ 'option_title_field' => 'CONCAT(\'la_prefix_\', Prefix) AS Phrase',
+ 'use_phrases' => 1,
+ 'max_len' => 255, 'not_null' => 1, 'default' => ''
+ ),
+ 'ItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Changes' => Array ('type' => 'string', 'formatter' => 'kChangesFormatter', 'default' => NULL),
+ 'MasterPrefix' => Array (
+ 'type' => 'string', 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
+ 'option_key_field' => 'MasterPrefix',
+ 'option_title_field' => 'CONCAT(\'la_prefix_\',MasterPrefix) AS Phrase',
+ 'use_phrases' => 1,
+ 'max_len' => 255, 'not_null' => 1, 'default' => ''
+ ),
+ 'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'VirtualFields' => Array (
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'ChangeLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'SessionLogId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
+ 'Action' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
+ 'OccuredOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'MasterPrefix' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
+ 'MasterId' => Array ('filter_block' => 'grid_range_filter', 'width' => 90, ),
+ 'Prefix' => Array ('title' => 'column:la_fld_ItemPrefix', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
+ 'ItemId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
+ 'Changes' => Array ('data_block' => 'grid_changes_td', 'filter_block' => 'grid_like_filter', 'format' => 'auto_cut', 'width' => 225, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/search_logs/search_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/search_logs/search_logs_config.php (revision 15658)
+++ branches/5.3.x/core/units/logs/search_logs/search_logs_config.php (revision 15659)
@@ -1,92 +1,93 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'search-log',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'SearchLogId',
-
- 'TableName' => TABLE_PREFIX . 'SearchLogs',
-
- 'TitlePresets' => Array (
- 'search_log_list' => Array (
- 'prefixes' => Array('search-log_List'), 'format' => '!la_tab_SearchLog!',
- 'toolbar_buttons' => Array ('refresh', 'delete', 'reset', 'export', 'view', 'dbl-click'),
- ),
- ),
-
- 'PermSection' => Array ('main' => 'in-portal:searchlog'),
-
- 'Sections' => Array (
- 'in-portal:searchlog' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'search_log',
- 'label' => 'la_tab_SearchLog',
- 'url' => Array('t' => 'logs/search_logs/search_log_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'delete'),
- 'priority' => 4,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Keyword' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'SearchLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Keyword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Indices' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SearchType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Simple', 1 => 'la_Text_Advanced'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'SearchLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
- 'Keyword' => Array ('title' => 'la_col_Keyword', 'filter_block' => 'grid_like_filter', 'width' => 300, ),
- 'SearchType' => Array ('title' => 'la_prompt_SearchType', 'filter_block' => 'grid_options_filter', 'width' => 110, ),
+$config = Array (
+ 'Prefix' => 'search-log',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'SearchLogId',
+
+ 'TableName' => TABLE_PREFIX . 'SearchLogs',
+
+ 'TitlePresets' => Array (
+ 'search_log_list' => Array (
+ 'prefixes' => Array ('search-log_List'), 'format' => '!la_tab_SearchLog!',
+ 'toolbar_buttons' => Array ('refresh', 'delete', 'reset', 'export', 'view', 'dbl-click'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:searchlog'),
+
+ 'Sections' => Array (
+ 'in-portal:searchlog' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'search_log',
+ 'label' => 'la_tab_SearchLog',
+ 'url' => Array ('t' => 'logs/search_logs/search_log_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'delete'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Keyword' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'SearchLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Keyword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Indices' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SearchType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Simple', 1 => 'la_Text_Advanced'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'SearchLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+ 'Keyword' => Array ('title' => 'la_col_Keyword', 'filter_block' => 'grid_like_filter', 'width' => 300, ),
+ 'SearchType' => Array ('title' => 'la_prompt_SearchType', 'filter_block' => 'grid_options_filter', 'width' => 110, ),
- 'Indices' => Array ('title' => 'la_prompt_Frequency', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
- ),
+ 'Indices' => Array ('title' => 'la_prompt_Frequency', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/email_logs/email_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/email_logs/email_logs_config.php (revision 15658)
+++ branches/5.3.x/core/units/logs/email_logs/email_logs_config.php (revision 15659)
@@ -1,109 +1,110 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'email-log',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'EmailLogEventHandler', 'file' => 'email_log_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'EmailLogTagProcessor', 'file' => 'email_log_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'ScheduledTasks' => Array(
- 'rotate_email_logs' => Array('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'),
- ),
-
- 'IDField' => 'EmailLogId',
-
- 'TableName' => TABLE_PREFIX . 'EmailLog',
-
- 'TitleField' => 'EmailLogId',
-
- 'TitlePresets' => Array (
- 'email_log_list' => Array ('prefixes' => Array('email-log_List'), 'format' => '!la_tab_EmailLog!'),
-
- 'email_log_edit' => Array (
- 'prefixes' => Array ('email-log'), 'format' => "!la_title_ViewingEmailLog! '#email-log_titlefield#'",
- ),
- ),
-
- 'PermSection' => Array ('main' => 'in-portal:emaillog'),
-
- 'Sections' => Array (
- 'in-portal:emaillog' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'email_log',
- 'label' => 'la_tab_EmailLog',
- 'url' => Array('t' => 'logs/email_logs/email_log_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit', 'delete'),
- 'priority' => 5,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('SentOn' => 'desc'),
- )
- ),
-
- 'Fields' => Array (
- 'EmailLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'From' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'To' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'OtherRecipients' => Array ('type' => 'string', 'default' => NULL),
- 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'HtmlBody' => Array ('type' => 'string', 'default' => NULL),
- 'TextBody' => Array ('type' => 'string', 'default' => NULL),
- 'SentOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'EventName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'EventType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
- 'default' => NULL
- ),
- 'EventParams' => Array ('type' => 'string', 'default' => NULL),
- 'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Fields' => Array (
- 'EmailLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 80),
- 'From' => Array ('title' => 'column:la_fld_Sender', 'filter_block' => 'grid_like_filter', 'width' => 200),
- 'To' => Array ('title' => 'column:la_fld_Recipient', 'filter_block' => 'grid_like_filter', 'width' => 200),
- 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
- 'EventName' => Array ('title' => 'column:la_fld_Event', 'filter_block' => 'grid_like_filter', 'width' => 170),
- 'EventType' => Array ('title' => 'column:la_fld_Type', 'filter_block' => 'grid_options_filter', 'width' => 60),
- 'SentOn' => Array ('title' => 'la_prompt_SentOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
-// 'EventParams' => Array ('title' => 'la_col_EventParams', 'filter_block' => 'grid_like_filter'),
- ),
+$config = Array (
+ 'Prefix' => 'email-log',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'EmailLogEventHandler', 'file' => 'email_log_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'EmailLogTagProcessor', 'file' => 'email_log_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'rotate_email_logs' => Array ('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'),
+ ),
+
+ 'IDField' => 'EmailLogId',
+
+ 'TableName' => TABLE_PREFIX . 'EmailLog',
+
+ 'TitleField' => 'EmailLogId',
+
+ 'TitlePresets' => Array (
+ 'email_log_list' => Array ('prefixes' => Array ('email-log_List'), 'format' => '!la_tab_EmailLog!'),
+
+ 'email_log_edit' => Array (
+ 'prefixes' => Array ('email-log'), 'format' => "!la_title_ViewingEmailLog! '#email-log_titlefield#'",
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:emaillog'),
+
+ 'Sections' => Array (
+ 'in-portal:emaillog' => Array (
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'email_log',
+ 'label' => 'la_tab_EmailLog',
+ 'url' => Array ('t' => 'logs/email_logs/email_log_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit', 'delete'),
+ 'priority' => 5,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('SentOn' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'EmailLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'From' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'To' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'OtherRecipients' => Array ('type' => 'string', 'default' => NULL),
+ 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'HtmlBody' => Array ('type' => 'string', 'default' => NULL),
+ 'TextBody' => Array ('type' => 'string', 'default' => NULL),
+ 'SentOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'EventName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'EventType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
+ 'default' => NULL
+ ),
+ 'EventParams' => Array ('type' => 'string', 'default' => NULL),
+ 'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Fields' => Array (
+ 'EmailLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 80),
+ 'From' => Array ('title' => 'column:la_fld_Sender', 'filter_block' => 'grid_like_filter', 'width' => 200),
+ 'To' => Array ('title' => 'column:la_fld_Recipient', 'filter_block' => 'grid_like_filter', 'width' => 200),
+ 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
+ 'EventName' => Array ('title' => 'column:la_fld_Event', 'filter_block' => 'grid_like_filter', 'width' => 170),
+ 'EventType' => Array ('title' => 'column:la_fld_Type', 'filter_block' => 'grid_options_filter', 'width' => 60),
+ 'SentOn' => Array ('title' => 'la_prompt_SentOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
+// 'EventParams' => Array ('title' => 'la_col_EventParams', 'filter_block' => 'grid_like_filter'),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/scheduled_tasks/scheduled_tasks_config.php
===================================================================
--- branches/5.3.x/core/units/scheduled_tasks/scheduled_tasks_config.php (revision 15658)
+++ branches/5.3.x/core/units/scheduled_tasks/scheduled_tasks_config.php (revision 15659)
@@ -1,168 +1,169 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'scheduled-task',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ScheduledTaskEventHandler', 'file' => 'scheduled_task_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'Hooks' => Array (
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterCacheRebuild'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnRefresh',
+$config = Array (
+ 'Prefix' => 'scheduled-task',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ScheduledTaskEventHandler', 'file' => 'scheduled_task_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'adm',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterCacheRebuild'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnRefresh',
+ ),
+ ),
+
+ 'IDField' => 'ScheduledTaskId',
+
+ 'TableName' => TABLE_PREFIX . 'ScheduledTasks',
+
+ 'TitleField' => 'Name',
+
+ 'StatusField' => Array ('Status'),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('scheduled-task' => '!la_title_AddingScheduledTask!'),
+ 'edit_status_labels' => Array ('scheduled-task' => '!la_title_EditingScheduledTask!'),
+ 'new_titlefield' => Array ('scheduled-task' => '!la_title_NewScheduledTask!'),
+ ),
+
+ 'scheduled_task_list' => Array (
+ 'prefixes' => Array ('scheduled-task_List'), 'format' => "!la_title_ScheduledTasks!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'process', 'cancel', 'view', 'dbl-click'),
+ ),
+
+ 'scheduled_task_edit' => Array (
+ 'prefixes' => Array ('scheduled-task'), 'format' => "#scheduled-task_status# '#scheduled-task_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:scheduled_tasks'),
+
+ 'Sections' => Array (
+ 'in-portal:scheduled_tasks' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_agents',
+ 'label' => 'la_title_ScheduledTasks',
+ 'url' => Array ('t' => 'scheduled_tasks/scheduled_task_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 6,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'ScheduledTaskId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'unique' => Array (),
+ 'required' => 1, 'not_null' => 1, 'default' => ''
+ ),
+
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_User', 2 => 'la_opt_System'), 'use_phrases' => 1,
+ 'required' => 1, 'not_null' => 1, 'default' => 1
+ ),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1,
+ 'required' => 1, 'not_null' => 1, 'default' => 1
+ ),
+ 'Event' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'required' => 1, 'not_null' => 1, 'default' => ''
+ ),
+ 'RunSchedule' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => '* * * * *'),
+ 'LastRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+
+ 'LastRunStatus' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Success', 0 => 'la_opt_Failed', 2 => 'la_opt_Running'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+
+ 'NextRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'RunTime' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Timeout' => Array (
+ 'type' => 'int',
+ 'min_value_inc' => 1,
+ 'not_null' => 1, 'default' => NULL
+ ),
+ 'LastTimeoutOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'SiteDomainLimitation' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'SiteDomains ORDER BY DomainName ASC', 'option_key_field' => 'DomainId', 'option_title_field' => 'DomainName', 'multiple' => 1,
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'Settings' => Array ('type' => 'string', 'default' => NULL),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ ),
+ 'Fields' => Array (
+ 'ScheduledTaskId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
+ 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60),
+ 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 280),
+ 'RunSchedule' => Array ('filter_block' => 'grid_range_filter', 'width' => 100),
+ 'LastRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
+ 'RunTime' => Array ('filter_block' => 'grid_range_filter', 'width' => 100),
+ 'LastRunStatus' => Array ('filter_block' => 'grid_options_filter', 'width' => 90),
+ 'NextRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
+ 'Timeout' => Array ('filter_block' => 'grid_range_filter', 'width' => 85),
+ 'LastTimeoutOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
+ 'SiteDomainLimitation' => Array ('data_block' => 'grid_picker_td', 'filter_block' => 'grid_multioptions_filter', 'separator' => ', ', 'width' => 145),
),
),
-
- 'IDField' => 'ScheduledTaskId',
-
- 'TableName' => TABLE_PREFIX . 'ScheduledTasks',
-
- 'TitleField' => 'Name',
-
- 'StatusField' => Array ('Status'),
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('scheduled-task' => '!la_title_AddingScheduledTask!'),
- 'edit_status_labels' => Array ('scheduled-task' => '!la_title_EditingScheduledTask!'),
- 'new_titlefield' => Array ('scheduled-task' => '!la_title_NewScheduledTask!'),
- ),
-
- 'scheduled_task_list' => Array (
- 'prefixes' => Array ('scheduled-task_List'), 'format' => "!la_title_ScheduledTasks!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'process', 'cancel', 'view', 'dbl-click'),
- ),
-
- 'scheduled_task_edit' => Array (
- 'prefixes' => Array ('scheduled-task'), 'format' => "#scheduled-task_status# '#scheduled-task_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:scheduled_tasks'),
-
- 'Sections' => Array (
- 'in-portal:scheduled_tasks' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_agents',
- 'label' => 'la_title_ScheduledTasks',
- 'url' => Array('t' => 'scheduled_tasks/scheduled_task_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 6,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Name' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'ScheduledTaskId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
-
- 'Name' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'unique' => Array (),
- 'required' => 1, 'not_null' => 1, 'default' => ''
- ),
-
- 'Type' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_User', 2 => 'la_opt_System'), 'use_phrases' => 1,
- 'required' => 1, 'not_null' => 1, 'default' => 1
- ),
- 'Status' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1,
- 'required' => 1, 'not_null' => 1, 'default' => 1
- ),
- 'Event' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'required' => 1, 'not_null' => 1, 'default' => ''
- ),
- 'RunSchedule' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => '* * * * *'),
- 'LastRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
-
- 'LastRunStatus' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Success', 0 => 'la_opt_Failed', 2 => 'la_opt_Running'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
-
- 'NextRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'RunTime' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Timeout' => Array (
- 'type' => 'int',
- 'min_value_inc' => 1,
- 'not_null' => 1, 'default' => NULL
- ),
- 'LastTimeoutOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'SiteDomainLimitation' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'SiteDomains ORDER BY DomainName ASC', 'option_key_field' => 'DomainId', 'option_title_field' => 'DomainName', 'multiple' => 1,
- 'not_null' => 1, 'default' => ''
- ),
- 'Settings' => Array ('type' => 'string', 'default' => NULL),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- ),
- 'Fields' => Array (
- 'ScheduledTaskId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
- 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60),
- 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 280),
- 'RunSchedule' => Array ('filter_block' => 'grid_range_filter', 'width' => 100),
- 'LastRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
- 'RunTime' => Array ('filter_block' => 'grid_range_filter', 'width' => 100),
- 'LastRunStatus' => Array ('filter_block' => 'grid_options_filter', 'width' => 90),
- 'NextRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
- 'Timeout' => Array ('filter_block' => 'grid_range_filter', 'width' => 85),
- 'LastTimeoutOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145),
- 'SiteDomainLimitation' => Array ('data_block' => 'grid_picker_td', 'filter_block' => 'grid_multioptions_filter', 'separator' => ', ', 'width' => 145),
- ),
- ),
- ),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/promo_block_groups/promo_block_groups_config.php
===================================================================
--- branches/5.3.x/core/units/promo_block_groups/promo_block_groups_config.php (revision 15658)
+++ branches/5.3.x/core/units/promo_block_groups/promo_block_groups_config.php (revision 15659)
@@ -1,120 +1,121 @@
<?php
$config = Array (
'Prefix' => 'promo-block-group',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'PromoBlockGroupEventHandler', 'file' => 'promo_block_group_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'PromoBlockGroupTagProcessor', 'file' => 'promo_block_group_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'PromoBlockGroupId',
'TableName' => TABLE_PREFIX . 'PromoBlockGroups',
'TitleField' => 'Title',
- 'StatusField' => Array('Status'),
+ 'StatusField' => Array ('Status'),
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('promo-block-group' => '!la_title_AddingPromoBlockGroup!'),
'edit_status_labels' => Array ('promo-block-group' => '!la_title_EditingPromoBlockGroup!'),
),
'promo_block_group_list' => Array ('prefixes' => Array ('promo-block-group_List'), 'format' => "!la_title_PromoBlockGroups! (#promo-block-group_recordcount#)"),
'promo_block_group_edit' => Array ('prefixes' => Array ('promo-block-group'), 'format' => "#promo-block-group_status# '#promo-block-group_titlefield#'"),
),
- 'PermSection' => Array('main' => 'in-portal:promo_block_groups'),
+ 'PermSection' => Array ('main' => 'in-portal:promo_block_groups'),
'Sections' => Array (
- 'in-portal:promo_block_groups' => Array(
- 'parent' => 'in-portal:site',
- 'icon' => 'promo_block_groups',
- 'label' => 'la_tab_PromoBlocks',
- 'url' => Array('t' => 'promo_block_groups/promo_block_group_list', 'pass' => 'm'),
- 'late_load' => Array ('t' => 'promo_block_groups/tree_section_xml', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 7,
- 'type' => stTREE,
+ 'in-portal:promo_block_groups' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'promo_block_groups',
+ 'label' => 'la_tab_PromoBlocks',
+ 'url' => Array ('t' => 'promo_block_groups/promo_block_group_list', 'pass' => 'm'),
+ 'late_load' => Array ('t' => 'promo_block_groups/tree_section_xml', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 7,
+ 'type' => stTREE,
),
),
'CalculatedFields' => Array (
'' => Array (
'AssignedToSections' => '(SELECT GROUP_CONCAT(CategoryId SEPARATOR ";") FROM '.TABLE_PREFIX.'Categories WHERE PromoBlockGroupId = %1$s.PromoBlockGroupId)',
),
),
'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Title' => 'asc'),
)
),
'Fields' => Array (
'PromoBlockGroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Title' => Array (
'type' => 'string', 'max_len' => 255,
'not_null' => 1, 'required' => 1, 'default' => '',
),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 1,
),
'RotationDelay' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'required' => 1, 'default' => NULL),
'TransitionTime' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'required' => 1, 'default' => NULL),
'TransitionControls' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1,
),
'TransitionEffect' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options' => Array ('fade' => 'la_opt_AnimationFade', 'slide' => 'la_opt_AnimationSlide', '-1' => 'la_opt_AnimationCustom'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => '',
),
'TransitionEffectCustom' => Array (
'type' => 'string',
'error_field' => 'TransitionEffect',
'formatter' => 'kFormatter',
'not_null' => 1, 'default' => '',
),
),
- 'VirtualFields' => Array(
- 'AssignedToSections' => Array('type' => 'string', 'default' => ''),
+ 'VirtualFields' => Array (
+ 'AssignedToSections' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png', 0 => 'icon16_disabled.png', 1 => 'icon16_item.png'),
'Fields' => Array (
'PromoBlockGroupId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
'Title' => Array ('filter_block' => 'grid_like_filter', 'width' => 150),
'RotationDelay' => Array ('filter_block' => 'grid_range_filter'),
'TransitionTime' => Array ('filter_block' => 'grid_range_filter'),
'TransitionControls' => Array ('filter_block' => 'grid_options_filter'),
'TransitionEffect' => Array ('filter_block' => 'grid_options_filter'),
'TransitionEffectCustom' => Array ('filter_block' => 'grid_like_filter'),
),
),
),
-);
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/images/images_config.php
===================================================================
--- branches/5.3.x/core/units/images/images_config.php (revision 15658)
+++ branches/5.3.x/core/units/images/images_config.php (revision 15659)
@@ -1,184 +1,187 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'img',
- 'Clones' => Array (
- 'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
- ),
-
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ImageEventHandler','file'=>'image_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ImageTagProcessor','file'=>'image_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'AggregateTags' => Array (
- Array (
- 'AggregateTo' => '#PARENT#',
- 'AggregatedTagName' => 'Image',
- 'LocalTagName' => 'ItemImageTag',
- 'LocalSpecial' => '-item',
- ),
-
- Array (
- 'AggregateTo' => '#PARENT#',
- 'AggregatedTagName' => 'ImageSrc',
- 'LocalTagName' => 'ItemImageTag',
- 'LocalSpecial' => '-item',
- ),
-
- Array (
- 'AggregateTo' => '#PARENT#',
- 'AggregatedTagName' => 'ImageSize',
- 'LocalTagName' => 'ItemImageTag',
- 'LocalSpecial' => '-item',
- ),
-
- Array (
- 'AggregateTo' => '#PARENT#',
- 'AggregatedTagName' => 'ListImages',
- 'LocalTagName' => 'PrintList2',
- 'LocalSpecial' => 'list',
- ),
-
- Array (
- 'AggregateTo' => '#PARENT#',
- 'AggregatedTagName' => 'LargeImageExists',
- 'LocalTagName' => 'LargeImageExists',
- ),
- ),
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'ScheduledTasks' => Array (
- 'clean_catalog_images' => Array ('EventName' => 'OnCleanImages', 'RunSchedule' => '0 0 * * 0', 'Status' => STATUS_DISABLED),
- 'clean_resized_catalog_images' => Array ('EventName' => 'OnCleanResizedImages', 'RunSchedule' => '0 0 1 * *', 'Status' => STATUS_DISABLED),
- ),
-
- 'IDField' => 'ImageId',
- 'StatusField' => Array('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
- 'TitleField' => 'Name', // field, used in bluebar when editing existing item
- 'TableName' => TABLE_PREFIX.'CatalogImages',
- 'ParentTableKey'=> 'ResourceId', // linked field in master table
- 'ForeignKey' => 'ResourceId', // linked field in subtable
- 'ParentPrefix' => 'p',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'CalculatedFields' => Array(
- '' => Array (
- 'Preview' => '0',
- ),
- ),
-
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'ImageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Url' => Array('type' => 'string', 'max_len' => 255, 'default' => '', 'not_null' => 1),
- 'Name' => Array('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
- 'AltName' => Array('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'ImageIndex' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
- 'LocalImage' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
- 'LocalPath' => Array(
- 'type' => 'string', 'formatter' => 'kPictureFormatter',
- 'skip_empty' => 1, 'max_len' => 240, 'default' => '',
- 'not_null' => 1, 'include_path' => 1,
- 'allowed_types' => Array(
- 'image/jpeg', 'image/pjpeg', 'image/png',
- 'image/x-png', 'image/gif', 'image/bmp'
- ),
- 'error_msgs' => Array(
- 'bad_file_format' => '!la_error_InvalidFileFormat!',
- 'bad_file_size' => '!la_error_FileTooLarge!',
- 'cant_save_file' => '!la_error_cant_save_file!',
- ),
- ),
- 'Enabled' => Array (
- 'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled',),
- 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
- ),
- 'DefaultImg' => Array (
- 'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'default' => 0, 'not_null' => 1, 'use_phrases' => 1,
- ),
- 'ThumbUrl' => Array('type' => 'string', 'max_len' => 255, 'default' => null),
- 'Priority' => Array('type' => 'int', 'default' => 0, 'not_null'=>1),
- 'ThumbPath' => Array(
- 'type' => 'string', 'formatter' => 'kPictureFormatter',
- 'skip_empty' => 1, 'max_len' => 240, 'default' => NULL,
- 'include_path' => 1,
- 'allowed_types' => Array(
- 'image/jpeg', 'image/pjpeg', 'image/png',
- 'image/x-png', 'image/gif', 'image/bmp'
- ),
- 'error_msgs' => Array(
- 'bad_file_format' => '!la_error_InvalidFileFormat!',
- 'bad_file_size' => '!la_error_FileTooLarge!',
- 'cant_save_file' => '!la_error_cant_save_file!',
- ),
- ),
- 'LocalThumb' => Array('type' => 'int', 'default' => 1, 'not_null'=>1),
- 'SameImages' => Array (
- 'type' => 'int', 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
- ),
- ),
-
- 'VirtualFields' => Array(
- 'Preview' => Array ('type' => 'string', 'default' => ''),
- 'ImageUrl' => Array ('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- '0_0' => 'icon16_disabled.png',
- '0_1' => 'icon16_disabled.png',
- '1_0' => 'icon16_item.png',
- '1_1' => 'icon16_primary.png',
- ),
- 'Fields' => Array(
- 'ImageId' => Array( 'title'=>'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
- 'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'image_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'AltName' => Array( 'title'=>'la_col_AltName', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'image_preview_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Enabled' => Array( 'title'=>'la_col_ImageEnabled', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'img',
+
+ 'Clones' => Array (
+ 'bb-post-img'=> Array ('ParentPrefix' => 'bb-post'),
+ ),
+
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ImageEventHandler', 'file' => 'image_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ImageTagProcessor', 'file' => 'image_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'AggregateTags' => Array (
+ Array (
+ 'AggregateTo' => '#PARENT#',
+ 'AggregatedTagName' => 'Image',
+ 'LocalTagName' => 'ItemImageTag',
+ 'LocalSpecial' => '-item',
+ ),
+
+ Array (
+ 'AggregateTo' => '#PARENT#',
+ 'AggregatedTagName' => 'ImageSrc',
+ 'LocalTagName' => 'ItemImageTag',
+ 'LocalSpecial' => '-item',
+ ),
+
+ Array (
+ 'AggregateTo' => '#PARENT#',
+ 'AggregatedTagName' => 'ImageSize',
+ 'LocalTagName' => 'ItemImageTag',
+ 'LocalSpecial' => '-item',
+ ),
+
+ Array (
+ 'AggregateTo' => '#PARENT#',
+ 'AggregatedTagName' => 'ListImages',
+ 'LocalTagName' => 'PrintList2',
+ 'LocalSpecial' => 'list',
+ ),
+
+ Array (
+ 'AggregateTo' => '#PARENT#',
+ 'AggregatedTagName' => 'LargeImageExists',
+ 'LocalTagName' => 'LargeImageExists',
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'clean_catalog_images' => Array ('EventName' => 'OnCleanImages', 'RunSchedule' => '0 0 * * 0', 'Status' => STATUS_DISABLED),
+ 'clean_resized_catalog_images' => Array ('EventName' => 'OnCleanResizedImages', 'RunSchedule' => '0 0 1 * *', 'Status' => STATUS_DISABLED),
+ ),
+
+ 'IDField' => 'ImageId',
+ 'StatusField' => Array ('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
+ 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+ 'TableName' => TABLE_PREFIX.'CatalogImages',
+ 'ParentTableKey'=> 'ResourceId', // linked field in master table
+ 'ForeignKey' => 'ResourceId', // linked field in subtable
+ 'ParentPrefix' => 'p',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Preview' => '0',
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'ImageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Url' => Array ('type' => 'string', 'max_len' => 255, 'default' => '', 'not_null' => 1),
+ 'Name' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'AltName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ImageIndex' => Array ('type' => 'int', 'default' => 0, 'not_null'=>1),
+ 'LocalImage' => Array ('type' => 'int', 'default' => 1, 'not_null'=>1),
+ 'LocalPath' => Array (
+ 'type' => 'string', 'formatter' => 'kPictureFormatter',
+ 'skip_empty' => 1, 'max_len' => 240, 'default' => '',
+ 'not_null' => 1, 'include_path' => 1,
+ 'allowed_types' => Array (
+ 'image/jpeg', 'image/pjpeg', 'image/png',
+ 'image/x-png', 'image/gif', 'image/bmp'
+ ),
+ 'error_msgs' => Array (
+ 'bad_file_format' => '!la_error_InvalidFileFormat!',
+ 'bad_file_size' => '!la_error_FileTooLarge!',
+ 'cant_save_file' => '!la_error_cant_save_file!',
+ ),
+ ),
+ 'Enabled' => Array (
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled',),
+ 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
+ ),
+ 'DefaultImg' => Array (
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'default' => 0, 'not_null' => 1, 'use_phrases' => 1,
+ ),
+ 'ThumbUrl' => Array ('type' => 'string', 'max_len' => 255, 'default' => null),
+ 'Priority' => Array ('type' => 'int', 'default' => 0, 'not_null'=>1),
+ 'ThumbPath' => Array (
+ 'type' => 'string', 'formatter' => 'kPictureFormatter',
+ 'skip_empty' => 1, 'max_len' => 240, 'default' => NULL,
+ 'include_path' => 1,
+ 'allowed_types' => Array (
+ 'image/jpeg', 'image/pjpeg', 'image/png',
+ 'image/x-png', 'image/gif', 'image/bmp'
+ ),
+ 'error_msgs' => Array (
+ 'bad_file_format' => '!la_error_InvalidFileFormat!',
+ 'bad_file_size' => '!la_error_FileTooLarge!',
+ 'cant_save_file' => '!la_error_cant_save_file!',
+ ),
+ ),
+ 'LocalThumb' => Array ('type' => 'int', 'default' => 1, 'not_null'=>1),
+ 'SameImages' => Array (
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
+ ),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Preview' => Array ('type' => 'string', 'default' => ''),
+ 'ImageUrl' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ '0_0' => 'icon16_disabled.png',
+ '0_1' => 'icon16_disabled.png',
+ '1_0' => 'icon16_item.png',
+ '1_1' => 'icon16_primary.png',
+ ),
+ 'Fields' => Array (
+ 'ImageId' => Array ( 'title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+ 'Name' => Array ( 'title' => 'la_col_ImageName' , 'data_block' => 'image_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'AltName' => Array ( 'title' => 'la_col_AltName', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Url' => Array ( 'title' => 'la_col_ImageUrl', 'data_block' => 'image_url_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Preview' => Array ( 'title' => 'la_col_Preview', 'data_block' => 'image_preview_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Enabled' => Array ( 'title' => 'la_col_ImageEnabled', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/configuration/configuration_config.php
===================================================================
--- branches/5.3.x/core/units/configuration/configuration_config.php (revision 15658)
+++ branches/5.3.x/core/units/configuration/configuration_config.php (revision 15659)
@@ -1,125 +1,126 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'conf',
- 'ItemClass' => Array ('class' => 'ConfigurationItem', 'file' => 'configuration.php', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ConfigurationEventHandler', 'file' => 'configuration_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ConfigurationTagProcessor', 'file' => 'configuration_tag_processor.php', 'build_event' => 'OnBuild'),
- 'ValidatorClass' => 'ConfigurationValidator',
-
- 'AutoLoad' => true,
-
- 'RegisterClasses' => Array (
- Array ('pseudo' => 'ConfigurationValidator', 'class' => 'ConfigurationValidator', 'file' => 'configuration_validator.php', 'build_event' => ''),
- ),
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'VariableId',
- 'TitleField' => 'VariableName',
-
- 'TitlePresets' => Array (
- 'default' => Array ('tag_params' => Array ('conf' => Array ('per_page' => -1))),
-
- 'config_list_general' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
- 'config_list_output' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
- 'config_list_contacts' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
-
- 'config_list_categories' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
- 'config_list_users' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
-
- 'section_label' => Array ('prefixes' => Array ('conf_List'), 'format' => "#section_label#"),
-
- 'config_edit' => Array (
- 'new_status_labels' => Array ('conf' => '!la_title_AddingSystemSetting!'),
- 'edit_status_labels' => Array ('conf' => '!la_title_EditingSystemSetting!'),
- 'prefixes' => Array ('conf'), 'format' => "#conf_status# '#conf_titlefield#'",
- ),
- ),
-
- 'TableName' => TABLE_PREFIX . 'SystemSettings',
-
- 'ListSQLs' => Array (
- '' => 'SELECT %1$s.* %2$s FROM %1$s'
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('DisplayOrder' => 'asc', 'GroupDisplayOrder' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'VariableName' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^[a-z0-9_]+$/i',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'VariableValue' => Array ('type' => 'string', 'default' => NULL),
- 'ModuleOwner' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (),
- 'required' => 1, 'default' => 'In-Portal'
- ),
- 'Section' => Array (
- 'type' => 'string',
- 'error_msgs' => Array ('unknown_section' => '!la_error_UnknownSection!'),
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'Heading' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^la_section_[A-Z\d:_\-\.]+$/i',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'Prompt' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^la_config_[A-Z\d:_\-\.]+$/i',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'ElementType' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'Validation' => Array ('type' => 'string', 'default' => NULL),
- 'ValueList' => Array ('type' => 'string', 'default' => NULL),
- 'DisplayOrder' => Array (
- 'type' => 'float',
- 'unique' => Array ('ModuleOwner', 'Section', 'GroupDisplayOrder'),
- 'not_null' => 1, 'required' => 1, 'default' => 0
- ),
- 'GroupDisplayOrder' => Array (
- 'type' => 'float',
- 'unique' => Array ('ModuleOwner', 'Section', 'DisplayOrder'),
- 'not_null' => 1, 'required' => 1, 'default' => 0
- ),
- 'Install' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'HintLabel' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- ),
-
- 'VirtualFields' => Array (
- 'DirectOptions' => Array ('type' => 'string', 'default' => ''),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'conf',
+ 'ItemClass' => Array ('class' => 'ConfigurationItem', 'file' => 'configuration.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ConfigurationEventHandler', 'file' => 'configuration_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ConfigurationTagProcessor', 'file' => 'configuration_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'ValidatorClass' => 'ConfigurationValidator',
+
+ 'AutoLoad' => true,
+
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'ConfigurationValidator', 'class' => 'ConfigurationValidator', 'file' => 'configuration_validator.php', 'build_event' => ''),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'VariableId',
+ 'TitleField' => 'VariableName',
+
+ 'TitlePresets' => Array (
+ 'default' => Array ('tag_params' => Array ('conf' => Array ('per_page' => -1))),
+
+ 'config_list_general' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
+ 'config_list_output' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
+ 'config_list_contacts' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
+
+ 'config_list_categories' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
+ 'config_list_users' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
+
+ 'section_label' => Array ('prefixes' => Array ('conf_List'), 'format' => "#section_label#"),
+
+ 'config_edit' => Array (
+ 'new_status_labels' => Array ('conf' => '!la_title_AddingSystemSetting!'),
+ 'edit_status_labels' => Array ('conf' => '!la_title_EditingSystemSetting!'),
+ 'prefixes' => Array ('conf'), 'format' => "#conf_status# '#conf_titlefield#'",
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX . 'SystemSettings',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s'
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('DisplayOrder' => 'asc', 'GroupDisplayOrder' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'VariableName' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^[a-z0-9_]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'VariableValue' => Array ('type' => 'string', 'default' => NULL),
+ 'ModuleOwner' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (),
+ 'required' => 1, 'default' => 'In-Portal'
+ ),
+ 'Section' => Array (
+ 'type' => 'string',
+ 'error_msgs' => Array ('unknown_section' => '!la_error_UnknownSection!'),
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Heading' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^la_section_[A-Z\d:_\-\.]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Prompt' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^la_config_[A-Z\d:_\-\.]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'ElementType' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Validation' => Array ('type' => 'string', 'default' => NULL),
+ 'ValueList' => Array ('type' => 'string', 'default' => NULL),
+ 'DisplayOrder' => Array (
+ 'type' => 'float',
+ 'unique' => Array ('ModuleOwner', 'Section', 'GroupDisplayOrder'),
+ 'not_null' => 1, 'required' => 1, 'default' => 0
+ ),
+ 'GroupDisplayOrder' => Array (
+ 'type' => 'float',
+ 'unique' => Array ('ModuleOwner', 'Section', 'DisplayOrder'),
+ 'not_null' => 1, 'required' => 1, 'default' => 0
+ ),
+ 'Install' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
+ 'HintLabel' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'DirectOptions' => Array ('type' => 'string', 'default' => ''),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/filters/filters_config.php
===================================================================
--- branches/5.3.x/core/units/filters/filters_config.php (revision 15658)
+++ branches/5.3.x/core/units/filters/filters_config.php (revision 15659)
@@ -1,130 +1,131 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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!');
$config = Array (
'Prefix' => 'item-filter',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ItemFilterEventHandler', 'file' => 'item_filter_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ItemFilterTagProcessor', 'file' => 'item_filter_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'FilterId',
'TableName' => TABLE_PREFIX . 'ItemFilters',
'TitleField' => 'FilterField',
'StatusField' => Array ('Enabled'),
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('item-filter' => '!la_title_AddingItemFilter!'),
'edit_status_labels' => Array ('item-filter' => '!la_title_EditingItemFilter!'),
),
'item_filter_list' => Array (
'prefixes' => Array ('item-filter_List'), 'format' => "!la_title_ItemFilters!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
'item_filter_edit' => Array (
'prefixes' => Array ('item-filter'), 'format' => "#item-filter_status# '#item-filter_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
- 'PermSection' => Array('main' => 'in-portal:item_filters'),
+ 'PermSection' => Array ('main' => 'in-portal:item_filters'),
'Sections' => Array (
'in-portal:item_filters' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'filters',
- 'label' => 'la_title_ItemFilters',
- 'url' => Array('t' => 'item_filters/item_filter_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 14,
- 'type' => stTREE,
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'filters',
+ 'label' => 'la_title_ItemFilters',
+ 'url' => Array ('t' => 'item_filters/item_filter_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 14,
+ 'type' => stTREE,
),
),
'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
),
'CalculatedFields' => Array (
'' => Array (
'FilterKey' => 'CONCAT(%1$s.ItemPrefix, "_", %1$s.FilterField)',
),
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('FilterId' => 'asc'),
)
),
'Fields' => Array (
'FilterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ItemPrefix' => Array (
'type' => 'string', 'max_len' => 255,
'error_msgs' => Array ('not_registered' => '!la_error_InvalidItemPrefix!'),
'not_null' => 1, 'required' => 1, 'default' => ''
),
'FilterField' => Array (
'type' => 'string', 'max_len' => 255,
'error_msgs' => Array ('non_existing' => '!la_error_InvalidFieldName!'),
'not_null' => 1, 'required' => 1, 'default' => ''
),
'FilterType' => Array (
'type' => 'string', 'max_len' => 100,
'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'range' => 'la_type_RangeSlider'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => ''
),
'Enabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'RangeCount' => Array ('type' => 'int', 'default' => NULL),
),
'VirtualFields' => Array (
'FilterKey' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png', 0 => 'icon16_disabled.png'),
'Fields' => Array (
'FilterId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter'),
'ItemPrefix' => Array ('filter_block' => 'grid_like_filter'),
'FilterField' => Array ('filter_block' => 'grid_like_filter'),
'FilterType' => Array ('filter_block' => 'grid_options_filter'),
'Enabled' => Array ('filter_block' => 'grid_options_filter'),
'RangeCount' => Array ('filter_block' => 'grid_range_filter'),
)
)
)
);
\ No newline at end of file
Index: branches/5.3.x/core/units/modules/modules_config.php
===================================================================
--- branches/5.3.x/core/units/modules/modules_config.php (revision 15658)
+++ branches/5.3.x/core/units/modules/modules_config.php (revision 15659)
@@ -1,114 +1,115 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'mod',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ModulesEventHandler','file'=>'modules_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ModulesTagProcessor','file'=>'modules_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'Name',
- 'TitleField' => 'Name', // field, used in bluebar when editing existing item
- 'StatusField' => Array('Loaded'),
-
- 'TitlePresets' => Array(
- 'module_list' => Array (
- 'prefixes' => Array ('mod_List'), 'format' => "!la_title_Module_Status!",
- 'toolbar_buttons' => Array ('approve', 'deny', 'view'),
- ),
- 'tree_modules' => Array('format' => '!la_section_overview!'),
- ),
-
- 'ForceDontLogChanges' => true,
-
- 'PermSection' => Array('main' => 'in-portal:mod_status'),
-
- 'Sections' => Array(
- 'in-portal:mod_status' => Array(
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_modules',
- 'label' => 'la_title_Module_Status',
- 'url' => Array('t' => 'modules/modules_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'edit', 'advanced:approve', 'advanced:decline'),
- 'priority' => 12,
- 'type' => stTREE,
- ),
-
- // "Configuration" -> "Modules and Settings"
- /*'in-portal:tag_library' => Array(
- 'parent' => 'in-portal:modules',
- 'icon' => 'modules',
- 'label' => 'la_tab_TagLibrary',
- 'url' => Array('index_file' => 'tag_listing.php', 'pass' => 'm'),
- 'permissions' => Array('view'),
- 'priority' => 3,
- 'type' => stTREE,
- ),*/
- ),
-
- 'TableName' => TABLE_PREFIX . 'Modules',
-
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('LoadOrder' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Path' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Var' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Version' => Array('type' => 'string','not_null' => '1','default' => '0.0.0'),
- 'Loaded' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Active', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'LoadOrder' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'TemplatePath' => Array('type' => 'string','not_null' => 1, 'default' => ''),
- 'RootCat' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'BuildDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'AppliedDBRevisions' => Array ('type' => 'string', 'default' => NULL)
- ),
-
- 'VirtualFields' => Array(),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'Name' => Array('data_block' => 'grid_checkbox_td_no_icon', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Version' => Array('filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Path' => Array('title' => 'la_col_SystemPath', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'BuildDate' => Array('title' => 'la_col_BuildDate', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Loaded' => Array('title' => 'column:la_fld_Status', 'header_block' => 'grid_column_title_no_sorting', 'data_block' => 'grid_module_td', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'mod',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ModulesEventHandler', 'file' => 'modules_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ModulesTagProcessor', 'file' => 'modules_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'Name',
+ 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+ 'StatusField' => Array ('Loaded'),
+
+ 'TitlePresets' => Array (
+ 'module_list' => Array (
+ 'prefixes' => Array ('mod_List'), 'format' => "!la_title_Module_Status!",
+ 'toolbar_buttons' => Array ('approve', 'deny', 'view'),
+ ),
+ 'tree_modules' => Array ('format' => '!la_section_overview!'),
+ ),
+
+ 'ForceDontLogChanges' => true,
+
+ 'PermSection' => Array ('main' => 'in-portal:mod_status'),
+
+ 'Sections' => Array (
+ 'in-portal:mod_status' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_modules',
+ 'label' => 'la_title_Module_Status',
+ 'url' => Array ('t' => 'modules/modules_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit', 'advanced:approve', 'advanced:decline'),
+ 'priority' => 12,
+ 'type' => stTREE,
+ ),
+
+ // "Configuration" -> "Modules and Settings"
+ /*'in-portal:tag_library' => Array (
+ 'parent' => 'in-portal:modules',
+ 'icon' => 'modules',
+ 'label' => 'la_tab_TagLibrary',
+ 'url' => Array ('index_file' => 'tag_listing.php', 'pass' => 'm'),
+ 'permissions' => Array ('view'),
+ 'priority' => 3,
+ 'type' => stTREE,
+ ),*/
+ ),
+
+ 'TableName' => TABLE_PREFIX . 'Modules',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('LoadOrder' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Path' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Var' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Version' => Array ('type' => 'string', 'not_null' => '1', 'default' => '0.0.0'),
+ 'Loaded' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'LoadOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'TemplatePath' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'RootCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'BuildDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'AppliedDBRevisions' => Array ('type' => 'string', 'default' => NULL)
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'Name' => Array ('data_block' => 'grid_checkbox_td_no_icon', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Version' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Path' => Array ('title' => 'la_col_SystemPath', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'BuildDate' => Array ('title' => 'la_col_BuildDate', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Loaded' => Array ('title' => 'column:la_fld_Status', 'header_block' => 'grid_column_title_no_sorting', 'data_block' => 'grid_module_td', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/content/content_config.php
===================================================================
--- branches/5.3.x/core/units/content/content_config.php (revision 15658)
+++ branches/5.3.x/core/units/content/content_config.php (revision 15659)
@@ -1,74 +1,75 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'content',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ContentEventHandler', 'file' => 'content_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ContentTagProcessor', 'file' => 'content_tp.php', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode', // needed?
+$config = Array (
+ 'Prefix' => 'content',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ContentEventHandler', 'file' => 'content_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ContentTagProcessor', 'file' => 'content_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode', // needed?
+ ),
+
+ 'IDField' => 'PageContentId',
+ 'ParentTableKey' => Array ('c' => 'CategoryId', 'st' => 'CategoryId', 'page-revision' => 'RevisionId'), // linked field in master table
+ 'ForeignKey' => Array ('c' => 'PageId', 'st' => 'PageId', 'page-revision' => 'RevisionId'), // linked field in subtable
+ 'ParentPrefix' => 'c',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'TitleField' => 'ContentNum', // field, used in bluebar when editing existing item
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('content' => '!la_title_Adding_Content!'),
+ 'edit_status_labels' => Array ('content' => '!la_title_Editing_Content!'),
),
+ 'content_edit' => Array ('prefixes' => Array ('content'), 'format' => '#content_status# - !la_title_General!'),
+ ),
- 'IDField' => 'PageContentId',
- 'ParentTableKey' => Array ('c' => 'CategoryId', 'st' => 'CategoryId', 'page-revision' => 'RevisionId'), // linked field in master table
- 'ForeignKey' => Array ('c' => 'PageId', 'st' => 'PageId', 'page-revision' => 'RevisionId'), // linked field in subtable
- 'ParentPrefix' => 'c',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'TitleField' => 'ContentNum', // field, used in bluebar when editing existing item
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('content' => '!la_title_Adding_Content!'),
- 'edit_status_labels' => Array ('content' => '!la_title_Editing_Content!'),
- ),
- 'content_edit' => Array ('prefixes' => Array ('content'), 'format' => '#content_status# - !la_title_General!'),
- ),
-
- 'TableName' => TABLE_PREFIX . 'PageContent',
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- JOIN ' . TABLE_PREFIX . '%3$sPageRevisions pr ON pr.PageId = %1$s.PageId AND pr.RevisionId = %1$s.RevisionId'
- ),
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('ContentNum' => 'asc', 'RevisionNumber' => 'desc'),
- )
- ),
+ 'TableName' => TABLE_PREFIX . 'PageContent',
- 'Fields' => Array (
- 'PageContentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ContentNum' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'RevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Content' => Array (
- 'type' => 'string', 'max_len' => 65536,
- 'formatter' => 'kMultiLanguage', 'using_fck' => 1,
- 'default' => ''
- ),
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ JOIN ' . TABLE_PREFIX . '%3$sPageRevisions pr ON pr.PageId = %1$s.PageId AND pr.RevisionId = %1$s.RevisionId'
+ ),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('ContentNum' => 'asc', 'RevisionNumber' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'PageContentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ContentNum' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'RevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Content' => Array (
+ 'type' => 'string', 'max_len' => 65536,
+ 'formatter' => 'kMultiLanguage', 'using_fck' => 1,
+ 'default' => ''
),
-
- );
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/permission_types/permission_types_config.php
===================================================================
--- branches/5.3.x/core/units/permission_types/permission_types_config.php (revision 15658)
+++ branches/5.3.x/core/units/permission_types/permission_types_config.php (revision 15659)
@@ -1,107 +1,108 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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!');
$config = Array (
'Prefix' => 'permission-type',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'PermissionTypeEventHandler', 'file' => 'permission_type_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'PermissionConfigId',
'TableName' => TABLE_PREFIX . 'CategoryPermissionsConfig',
'TitleField' => 'PermissionName',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('permission-type' => '!la_title_AddingPermissionType!'),
'edit_status_labels' => Array ('permission-type' => '!la_title_EditingPermissionType!'),
),
'permission_type_list' => Array ('prefixes' => Array ('permission-type_List'), 'format' => "!la_tab_PermissionTypes! (#permission-type_recordcount#)"),
'permission_type_edit' => Array ('prefixes' => Array ('permission-type'), 'format' => "#permission-type_status# '#permission-type_titlefield#'"),
),
- 'PermSection' => Array('main' => 'in-portal:permission_types'),
+ 'PermSection' => Array ('main' => 'in-portal:permission_types'),
'Sections' => Array (
- 'in-portal:permission_types' => Array(
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'permission_types',
- 'label' => 'la_tab_PermissionTypes',
- 'url' => Array('t' => 'permission_types/permission_type_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 13,
- 'type' => stTREE,
+ 'in-portal:permission_types' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'permission_types',
+ 'label' => 'la_tab_PermissionTypes',
+ 'url' => Array ('t' => 'permission_types/permission_type_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 13,
+ 'type' => stTREE,
),
),
'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('PermissionName' => 'asc'),
)
),
'Fields' => Array (
'PermissionConfigId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PermissionName' => Array (
'type' => 'string', 'max_len' => 30,
'not_null' => 1, 'unique' => Array (), 'required' => 1, 'default' => '',
),
'Description' => Array (
'type' => 'string', 'max_len' => 255,
'formatter' => 'kFormatter', 'regexp' => '/^(la|lu)_[A-Z\d:_\-\.]+$/i',
'not_null' => 1, 'required' => 1, 'default' => '',
),
'ModuleId' => Array (
'type' => 'string', 'max_len' => 20,
'formatter' => 'kOptionsFormatter', 'options' => Array ('Admin' => 'Admin', 'Front' => 'Front'), 'options_sql' => 'SELECT Name AS Id, Name FROM ' . TABLE_PREFIX . 'Modules', 'option_key_field' => 'Id', 'option_title_field' => 'Name',
'not_null' => 1, 'required' => 1, 'default' => '',
),
'IsSystem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
),
'Grids' => Array (
'Default' => Array (
'Fields' => Array (
'PermissionConfigId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 80),
'PermissionName' => Array ('title' => 'column:la_fld_Name', 'filter_block' => 'grid_like_filter', 'width' => 225),
'Description' => Array ('filter_block' => 'grid_like_filter', 'as_label' => 1, 'width' => 225),
'ModuleId' => Array ('title' => 'column:la_fld_Module', 'filter_block' => 'grid_options_filter'),
'IsSystem' => Array ('filter_block' => 'grid_options_filter'),
),
),
),
-);
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/system_event_subscriptions/system_event_subscriptions_config.php
===================================================================
--- branches/5.3.x/core/units/system_event_subscriptions/system_event_subscriptions_config.php (revision 15658)
+++ branches/5.3.x/core/units/system_event_subscriptions/system_event_subscriptions_config.php (revision 15659)
@@ -1,142 +1,142 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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!');
$config = Array (
'Prefix' => 'system-event-subscription',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'SystemEventSubscriptionEventHandler', 'file' => 'system_event_subscription_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'SystemEventSubscriptionTagProcessor', 'file' => 'system_event_subscription_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'SubscriptionId',
'TableName' => TABLE_PREFIX . 'SystemEventSubscriptions',
'TitleField' => 'SubscriptionId',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('system-event-subscription' => '!la_title_AddingSystemEventSubscription!'),
'edit_status_labels' => Array ('system-event-subscription' => '!la_title_EditingSystemEventSubscription!'),
),
'system_event_subscription_list' => Array (
'prefixes' => Array ('system-event-subscription_List'), 'format' => "!la_title_SystemEventSubscriptions!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
),
'system_event_subscription_edit' => Array (
'prefixes' => Array ('system-event-subscription'), 'format' => "#system-event-subscription_status# '#system-event-subscription_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
- 'PermSection' => Array('main' => 'in-portal:system_event_subscriptions'),
+ 'PermSection' => Array ('main' => 'in-portal:system_event_subscriptions'),
'Sections' => Array (
'in-portal:system_event_subscriptions' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'system_event_subscriptions',
- 'label' => 'la_title_SystemEventSubscriptions',
- 'url' => Array('t' => 'system_event_subscriptions/system_event_subscription_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 6,
- 'type' => stTREE,
+ 'parent' => 'in-portal:users',
+ 'icon' => 'system_event_subscriptions',
+ 'label' => 'la_title_SystemEventSubscriptions',
+ 'url' => Array ('t' => 'system_event_subscriptions/system_event_subscription_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 6,
+ 'type' => stTREE,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'EmailEvents ee ON %1$s.EmailEventId = ee.EventId
LEFT JOIN ' . TABLE_PREFIX . 'Users u ON %1$s.UserId = u.PortalUserId
LEFT JOIN ' . TABLE_PREFIX . 'Categories c ON %1$s.CategoryId = c.CategoryId',
),
'CalculatedFields' => Array (
'' => Array (
'BindToSystemEvent' => 'ee.BindToSystemEvent',
'EmailEventName' => 'ee.Event',
'Username' => 'CASE %1$s.UserId WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(u.FirstName, u.LastName) <> "", CONCAT(u.FirstName, " ", u.LastName), IF(%1$s.UserId IS NULL, "Guest", u.Username)) END',
'CategoryName' => 'c.l%2$s_Name',
'ItemName' => '%1$s.ItemId',
'ParentItemName' => '%1$s.ParentItemId',
),
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('SubscriptionId' => 'desc'),
)
),
'Fields' => Array (
'SubscriptionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EmailEventId' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'EmailEvents WHERE BindToSystemEvent <> "" ORDER BY Event ASC', 'option_key_field' => 'EventId', 'option_title_field' => 'BindToSystemEvent',
'required' => 1, 'default' => NULL
),
'SubscriberEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'UserId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
'CategoryId' => Array ('type' => 'int', 'default' => NULL),
'IncludeSublevels' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'ItemId' => Array ('type' => 'int', 'default' => NULL),
'ParentItemId' => Array ('type' => 'int', 'default' => NULL),
'SubscribedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#')
),
'VirtualFields' => Array (
'Username' => Array ('type' => 'string', 'default' => ''),
'EmailEventName' => Array ('type' => 'string', 'default' => ''),
'CategoryName' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Fields' => Array (
'SubscriptionId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
'EmailEventId' => Array ('title' => 'column:la_fld_SystemEvent', 'filter_block' => 'grid_options_filter', 'width' => 170),
'EmailEventName' => Array ('title' => 'column:la_fld_EmailEvent', 'filter_block' => 'grid_like_filter', 'width' => 170),
'SubscriberEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter'),
'UserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_range_filter', 'width' => 80),
'Username' => Array ('filter_block' => 'grid_like_filter'),
'CategoryId' => Array ('title' => 'column:la_fld_CategoryId', /*'data_block' => 'grid_category_td',*/ 'filter_block' => 'grid_range_filter', 'width' => 100),
'IncludeSublevels' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'CategoryName' => Array ('title' => 'column:la_fld_Category', 'filter_block' => 'grid_like_filter', 'width' => 200),
'ItemId' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'ItemName' => Array ('data_block' => 'grid_item_name_td', 'associated_field' => 'ItemId', 'filter_block' => 'grid_like_filter', 'width' => 120),
'ParentItemId' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
'ParentItemName' => Array ('data_block' => 'grid_item_name_td', 'associated_field' => 'ParentItemId', 'filter_block' => 'grid_like_filter', 'width' => 120),
'SubscribedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170)
),
),
),
);
\ No newline at end of file
Index: branches/5.3.x/core/units/user_groups/user_groups_config.php
===================================================================
--- branches/5.3.x/core/units/user_groups/user_groups_config.php (revision 15658)
+++ branches/5.3.x/core/units/user_groups/user_groups_config.php (revision 15659)
@@ -1,137 +1,135 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'ug',
- 'Clones' => Array(
- 'g-ug' => Array(
- 'ParentPrefix' => 'g',
- 'ForeignKey' => 'GroupId',
- 'ParentTableKey' => 'GroupId',
-
- 'IDField' => 'PortalUserId',
-
- 'ListSQLs' => Array(
- '' => ' SELECT %1$s.* %2$s FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.GroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId'
- ),
- 'ItemSQLs' => Array(
- '' => ' SELECT %1$s.* %2$s FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.GroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId'
- ),
- 'CalculatedFields' => Array (
- '' => Array(
- 'UserName' => 'CONCAT(u.LastName, \' \', u.FirstName)',
- 'UserLogin' => 'u.Username',
- 'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
- ),
- ),
- 'VirtualFields' => Array (
- 'UserName' => Array('type' => 'string', 'default' => ''),
- 'UserLogin' => Array('type' => 'string', 'default' => ''),
- ),
- 'Grids' => Array(
- 'GroupUsers' => Array(
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array(
- 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'UserName' => Array ('title'=>'la_col_UserFirstLastName', 'width' => 200, ),
- 'UserLogin' => Array ('title'=>'column:la_fld_Username', 'width' => 100, ),
- 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- ),
- ),
- ),
- ),
-
- 'u-ug' => Array(
- 'ParentPrefix' => 'u',
- 'ForeignKey' => 'PortalUserId',
- 'ParentTableKey' => 'PortalUserId',
- ),
- ),
-
- 'ItemClass' => Array('class'=>'UserGroups_DBItem','file'=>'user_groups_dbitem.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'UserGroupsEventHandler','file'=>'user_groups_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
+$config = Array (
+ 'Prefix' => 'ug',
+ 'Clones' => Array (
+ 'g-ug' => Array (
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+
+ 'IDField' => 'PortalUserId',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.GroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId'
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'UserName' => 'CONCAT(u.LastName, \' \', u.FirstName)',
+ 'UserLogin' => 'u.Username',
+ 'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
+ ),
+ ),
+ 'VirtualFields' => Array (
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ ),
+ 'Grids' => Array (
+ 'GroupUsers' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'UserName' => Array ('title' => 'la_col_UserFirstLastName', 'width' => 200, ),
+ 'UserLogin' => Array ('title' => 'column:la_fld_Username', 'width' => 100, ),
+ 'PrimaryGroup' => Array ( 'title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
),
-
- 'IDField' => 'GroupId',
-
- 'TitleField' => 'GroupName',
- 'TableName' => TABLE_PREFIX.'UserGroupRelations',
-
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.GroupId = g.GroupId
- LEFT JOIN '.TABLE_PREFIX.'%3$sUsers u ON %1$s.PortalUserId = u.PortalUserId'),
-
- 'AutoDelete' => true,
- 'AutoClone' => false,
-
- 'CalculatedFields' => Array (
- '' => Array(
- 'GroupName' => 'g.Name',
- 'GroupDescription' => 'g.Description',
- 'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
- ),
- ),
-
- 'Fields' => Array(
- 'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'ExpirationReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'VirtualFields' => Array (
- 'GroupName' => Array('type' => 'string', 'default' => ''),
- 'GroupDescription' => Array('type' => 'string', 'default' => ''),
- 'PrimaryGroup' => Array(
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
- ),
-
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 1 => 'icon16_primary.png'
- ),
- 'Fields' => Array(
- 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'GroupName' => Array ('width' => 100, ),
- 'GroupDescription' => Array ('title' => 'column:la_fld_Description', 'width' => 150, ),
- 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
- 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- ),
- ),
- ),
-
- );
\ No newline at end of file
+ ),
+ ),
+ ),
+
+ 'u-ug' => Array (
+ 'ParentPrefix' => 'u',
+ 'ForeignKey' => 'PortalUserId',
+ 'ParentTableKey' => 'PortalUserId',
+ ),
+ ),
+
+ 'ItemClass' => Array ('class' => 'UserGroups_DBItem', 'file' => 'user_groups_dbitem.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'UserGroupsEventHandler', 'file' => 'user_groups_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'GroupId',
+
+ 'TitleField' => 'GroupName',
+ 'TableName' => TABLE_PREFIX.'UserGroupRelations',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.GroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sUsers u ON %1$s.PortalUserId = u.PortalUserId'
+ ),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => false,
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'GroupName' => 'g.Name',
+ 'GroupDescription' => 'g.Description',
+ 'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MembershipExpires' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'ExpirationReminderSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'VirtualFields' => Array (
+ 'GroupName' => Array ('type' => 'string', 'default' => ''),
+ 'GroupDescription' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryGroup' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ ),
+
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 1 => 'icon16_primary.png'
+ ),
+ 'Fields' => Array (
+ 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'GroupName' => Array ('width' => 100, ),
+ 'GroupDescription' => Array ('title' => 'column:la_fld_Description', 'width' => 150, ),
+ 'PrimaryGroup' => Array ( 'title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
+ 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/category_items/category_items_config.php
===================================================================
--- branches/5.3.x/core/units/category_items/category_items_config.php (revision 15658)
+++ branches/5.3.x/core/units/category_items/category_items_config.php (revision 15659)
@@ -1,86 +1,88 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'ci',
- 'ItemClass' => Array('class'=>'CategoryItems_DBItem','file'=>'category_items_dbitem.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'CategoryItemsEventHander','file'=>'category_items_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'CategoryItemsTagProcessor','file'=>'category_items_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
- 'IDField' => 'CategoryId', // in this case idfield doesn't exit in destination table
- 'StatusField' => Array('PrimaryCat'), // field, that is affected by Approve/Decline events
-
- 'TableName' => TABLE_PREFIX.'CategoryItems',
- 'ParentTableKey'=> 'ResourceId',
- 'ForeignKey' => 'ItemResourceId',
-// 'ParentPrefix' => 'p',
- 'AutoDelete' => true,
- 'AutoClone' => false,
-
- 'CalculatedFields' => Array(
- '' => Array (
- 'DummyId' => 'IF(ISNULL(c.CategoryId),0,c.CategoryId)',
- 'CategoryStatus'=> 'c.Status',
- )
- ),
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Categories AS c ON c.CategoryId = %1$s.CategoryId',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('CategoryName' => 'asc'),
- )
- ),
- 'Fields' => Array(
- 'DummyId' => Array(),
- 'CategoryId' => Array('type'=>'int','not_null'=>1,'default'=>0),
- 'ItemResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PrimaryCat' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ItemPrefix' => Array('type' => 'string','not_null'=>1,'default'=>''),
- 'Filename' => Array('type' => 'string','not_null'=>1,'default'=>''),
- ),
-
- 'VirtualFields' => Array (
- 'CategoryName' => Array ('type' => 'string', 'default' => ''),
- 'DummyId' => Array ('type' => 'int', 'default' => 0),
- 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_item.png',
- 1 => 'icon16_primary.png',
- ),
-
- 'Fields' => Array (
- 'CategoryName' => Array( 'title'=>'column:la_fld_Category', 'data_block' => 'grid_checkbox_category_td'),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'ci',
+ 'ItemClass' => Array ('class' => 'CategoryItems_DBItem', 'file' => 'category_items_dbitem.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CategoryItemsEventHander', 'file' => 'category_items_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'CategoryItemsTagProcessor', 'file' => 'category_items_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'CategoryId', // in this case idfield doesn't exit in destination table
+ 'StatusField' => Array ('PrimaryCat'), // field, that is affected by Approve/Decline events
+
+ 'TableName' => TABLE_PREFIX.'CategoryItems',
+ 'ParentTableKey'=> 'ResourceId',
+ 'ForeignKey' => 'ItemResourceId',
+// 'ParentPrefix' => 'p',
+ 'AutoDelete' => true,
+ 'AutoClone' => false,
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'DummyId' => 'IF(ISNULL(c.CategoryId),0,c.CategoryId)',
+ 'CategoryStatus'=> 'c.Status',
+ )
+ ),
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Categories AS c ON c.CategoryId = %1$s.CategoryId',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('CategoryName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'DummyId' => Array (),
+ 'CategoryId' => Array ('type' => 'int', 'not_null'=>1,'default'=>0),
+ 'ItemResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PrimaryCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ItemPrefix' => Array ('type' => 'string', 'not_null'=>1,'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'not_null'=>1,'default' => ''),
+ ),
+
+ 'VirtualFields' => Array (
+ 'CategoryName' => Array ('type' => 'string', 'default' => ''),
+ 'DummyId' => Array ('type' => 'int', 'default' => 0),
+ 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_item.png',
+ 1 => 'icon16_primary.png',
+ ),
+
+ 'Fields' => Array (
+ 'CategoryName' => Array ( 'title' => 'column:la_fld_Category', 'data_block' => 'grid_checkbox_category_td'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/groups/groups_config.php
===================================================================
--- branches/5.3.x/core/units/groups/groups_config.php (revision 15658)
+++ branches/5.3.x/core/units/groups/groups_config.php (revision 15659)
@@ -1,169 +1,170 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'g',
+$config = Array (
+ 'Prefix' => 'g',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'GroupsEventHandler', 'file' => 'groups_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'GroupTagProcessor', 'file' => 'group_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'GroupId',
- 'StatusField' => Array ('Enabled'),
- 'TitleField' => 'Name',
-
- 'SubItems' => Array ('g-perm', 'g-ug'),
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array('g' => '!la_title_Adding_Group!'),
- 'edit_status_labels' => Array('g' => '!la_title_Editing_Group!'),
- 'new_titlefield' => Array('g' => ''),
- ),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'GroupsEventHandler', 'file' => 'groups_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'GroupTagProcessor', 'file' => 'group_tp.php', 'build_event' => 'OnBuild'),
- 'group_list' => Array (
- 'prefixes' => Array ('g.total_List'), 'format' => "!la_title_Groups!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'e-mail', 'view', 'dbl-click'),
- ),
-
- 'groups_edit' => Array (
- 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_General!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'groups_edit_users' => Array (
- 'prefixes' => Array ('g', 'g-ug_List'), 'format' => "#g_status# '#g_titlefield#' - !la_title_Users!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'usertogroup', 'delete', 'view'),
- ),
-
- 'groups_edit_permissions' => Array (
- 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_Permissions!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'groups_edit_additional_permissions' => Array (
- 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_AdditionalPermissions!",
- 'toolbar_buttons' => Array ('select', 'cancel'),
- ),
-
- 'select_group' => Array(
- 'prefixes' => Array ('g.user_List'), 'format' => "!la_title_Groups! - !la_title_SelectGroup!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'view'),
- ),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'groups/groups_edit', 'priority' => 1),
- 'users' => Array ('title' => 'la_tab_Users', 't' => 'groups/groups_edit_users', 'priority' => 2),
- 'permissions' => Array ('title' => 'la_tab_Permissions', 't' => 'groups/groups_edit_permissions', 'priority' => 3),
- ),
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'GroupId',
+ 'StatusField' => Array ('Enabled'),
+ 'TitleField' => 'Name',
+
+ 'SubItems' => Array ('g-perm', 'g-ug'),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('g' => '!la_title_Adding_Group!'),
+ 'edit_status_labels' => Array ('g' => '!la_title_Editing_Group!'),
+ 'new_titlefield' => Array ('g' => ''),
),
- 'PermSection' => Array ('main' => 'in-portal:user_groups'),
+ 'group_list' => Array (
+ 'prefixes' => Array ('g.total_List'), 'format' => "!la_title_Groups!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'e-mail', 'view', 'dbl-click'),
+ ),
- 'TableName' => TABLE_PREFIX.'UserGroups',
+ 'groups_edit' => Array (
+ 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_General!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
- 'ListSQLs' => Array (
- '' => 'SELECT %1$s.* %2$s FROM %1$s',
+ 'groups_edit_users' => Array (
+ 'prefixes' => Array ('g', 'g-ug_List'), 'format' => "#g_status# '#g_titlefield#' - !la_title_Users!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'usertogroup', 'delete', 'view'),
),
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Name' => 'asc'),
- ),
+ 'groups_edit_permissions' => Array (
+ 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_Permissions!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
- 'CalculatedFields' => Array (
- 'total' => Array (
- 'UserCount' => 'SELECT COUNT(*) FROM ' . TABLE_PREFIX . 'UserGroupRelations ug WHERE ug.GroupId = %1$s.GroupId',
- ),
+ 'groups_edit_additional_permissions' => Array (
+ 'prefixes' => Array ('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_AdditionalPermissions!",
+ 'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'Fields' => Array (
- 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'System' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Personal' => Array ('type' => 'int','not_null' => 1, 'default' => 0),
- 'Enabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'FrontRegistration' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'IPRestrictions' => Array ('type' => 'string', 'default' => NULL),
- ),
+ 'select_group' => Array (
+ 'prefixes' => Array ('g.user_List'), 'format' => "!la_title_Groups! - !la_title_SelectGroup!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'view'),
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'groups/groups_edit', 'priority' => 1),
+ 'users' => Array ('title' => 'la_tab_Users', 't' => 'groups/groups_edit_users', 'priority' => 2),
+ 'permissions' => Array ('title' => 'la_tab_Permissions', 't' => 'groups/groups_edit_permissions', 'priority' => 3),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:user_groups'),
+
+ 'TableName' => TABLE_PREFIX.'UserGroups',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
- 'VirtualFields' => Array (
- 'UserCount' => Array ('type' => 'int', 'default' => 0),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
),
+ ),
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
- 'Fields' => Array (
- 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 200, ),
- 'UserCount' => Array ('title' => 'la_col_UserCount', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
- 'FrontRegistration' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),
- ),
+ 'CalculatedFields' => Array (
+ 'total' => Array (
+ 'UserCount' => 'SELECT COUNT(*) FROM ' . TABLE_PREFIX . 'UserGroupRelations ug WHERE ug.GroupId = %1$s.GroupId',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'System' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Personal' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Enabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'FrontRegistration' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'IPRestrictions' => Array ('type' => 'string', 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'UserCount' => Array ('type' => 'int', 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
+ 'Fields' => Array (
+ 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 200, ),
+ 'UserCount' => Array ('title' => 'la_col_UserCount', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
+ 'FrontRegistration' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),
),
+ ),
- 'UserGroups' => Array (
- 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
- 'Fields' => Array (
- 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
- ),
+ 'UserGroups' => Array (
+ 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
+ 'Fields' => Array (
+ 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
),
+ ),
- 'Radio' => Array (
- 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
- 'Selector' => 'radio',
- 'Fields' => Array (
- 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
- 'Description' => Array ('width' => 250, ),
- ),
+ 'Radio' => Array (
+ 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'),
+ 'Selector' => 'radio',
+ 'Fields' => Array (
+ 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
+ 'Description' => Array ('width' => 250, ),
),
+ ),
- 'GroupSelector' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
- 'Description' => Array ('width' => 250, ),
- ),
+ 'GroupSelector' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'column:la_fld_GroupName', 'width' => 150, ),
+ 'Description' => Array ('width' => 250, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/reviews/reviews_config.php
===================================================================
--- branches/5.3.x/core/units/reviews/reviews_config.php (revision 15658)
+++ branches/5.3.x/core/units/reviews/reviews_config.php (revision 15659)
@@ -1,220 +1,218 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'rev',
+$config = Array (
+ 'Prefix' => 'rev',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ReviewsEventHandler', 'file' => 'reviews_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ReviewsTagProcessor', 'file' => 'reviews_tag_processor.php', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ReviewsEventHandler', 'file' => 'reviews_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ReviewsTagProcessor', 'file' => 'reviews_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'AutoLoad' => true,
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
- 'RewriteListener' => 'CategoryItemRewrite:ReviewRewriteListener',
+ 'RewriteListener' => 'CategoryItemRewrite:ReviewRewriteListener',
- 'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too
- 'ConfigMapping' => Array (
- 'PerPage' => 'Comm_Perpage_Reviews',
+ 'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too
+ 'ConfigMapping' => Array (
+ 'PerPage' => 'Comm_Perpage_Reviews',
- 'ReviewDelayInterval' => 'product_ReviewDelay_Value',
- 'ReviewDelayValue' => 'product_ReviewDelay_Interval',
- ),
+ 'ReviewDelayInterval' => 'product_ReviewDelay_Value',
+ 'ReviewDelayValue' => 'product_ReviewDelay_Interval',
+ ),
- 'IDField' => 'ReviewId',
- 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
- 'TableName' => TABLE_PREFIX.'CatalogReviews',
- 'ParentTableKey' => 'ResourceId', // linked field in master table
- 'ForeignKey' => 'ItemId', // linked field in subtable
+ 'IDField' => 'ReviewId',
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
+ 'TableName' => TABLE_PREFIX.'CatalogReviews',
+ 'ParentTableKey' => 'ResourceId', // linked field in master table
+ 'ForeignKey' => 'ItemId', // linked field in sub-table
- 'AutoDelete' => true,
- 'AutoClone' => true,
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
- 'TitlePresets' => Array (
- 'reviews_edit' => Array ('format' => "!la_title_Editing_Review!"),
+ 'TitlePresets' => Array (
+ 'reviews_edit' => Array ('format' => "!la_title_Editing_Review!"),
- 'reviews' => Array (
- 'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
- ),
+ 'reviews' => Array (
+ 'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
+ ),
- 'CalculatedFields' => Array (
- '' => Array (
- 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
- ),
-
- 'products' => Array (
- 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
- 'ItemName' => 'pr.l1_Name',
- 'ProductId' => 'pr.ProductId',
- ),
-
- 'product' => Array (
- 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
- 'ItemName' => 'pr.l1_Name',
- 'ProductId' => 'pr.ProductId',
- ),
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
),
- // key - special, value - list select sql
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
-
- 'products' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
- LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
-
- 'product' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
- LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
+ 'products' => Array (
+ 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
+ 'ItemName' => 'pr.l1_Name',
+ 'ProductId' => 'pr.ProductId',
),
- 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
-
- 'ListSortings' => Array (
- '' => Array (
- 'ForcedSorting' => Array ('Priority' => 'desc'),
- 'Sorting' => Array ('ReviewId' => 'desc'),
- )
+ 'product' => Array (
+ 'ReviewedBy' => 'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END',
+ 'ItemName' => 'pr.l1_Name',
+ 'ProductId' => 'pr.ProductId',
),
+ ),
- 'Fields' => Array (
- 'ReviewId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedOn' => Array (
- 'type' => 'int',
- 'formatter' => 'kDateFormatter', 'default' => '#NOW#',
- ),
- 'ReviewText' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter',
- 'using_fck' => 1, 'default' => null, 'required' => 1,
- ),
- 'Rating' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (
- 0 => 'lu_None',
- 1 => 'lu_Rating_1',
- 2 => 'lu_Rating_2',
- 3 => 'lu_Rating_3',
- 4 => 'lu_Rating_4',
- 5 => 'lu_Rating_5'),
- 'use_phrases' => 1,
- 'min_value_inc' => 0, 'max_value_inc' => 5, 'not_null' => 1, 'default' => 0,
- ),
- 'IPAddress' => Array (
- 'type' => 'string',
- 'max_value_inc' => 15, 'not_null' =>1, 'default' => '',
- ),
- 'ItemId' => Array (
- 'type' => 'int',
- 'not_null' => 1, 'default' => 0
- ),
- 'CreatedById' => Array (
- 'type' => 'int',
- 'formatter' => 'kLEFTFormatter',
- 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
- 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users
- WHERE `%s` = \'%s\' ',
- 'left_key_field' => 'PortalUserId',
- 'left_title_field' => 'Username',
- 'required' => 1, 'default' => NULL,
- 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- ),
- 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
- 'options' => Array (
- 0 => 'la_Disabled',
- 1 => 'la_Active',
- 2 => 'la_Pending',
- ),
- 'not_null' =>1, 'default' => 2,
- ),
- 'TextFormat' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_text', 1 => 'la_html'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
- ),
- 'Module' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'HelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'NotHelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0)
- ),
-
- 'VirtualFields' => Array (
- 'ReviewedBy' => Array ('type' => 'string', 'default' => ''),
- 'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
- 'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
- 'CatalogItemCategory' => Array ('type' => 'int', 'default' => 0),
-
- 'ItemName' => Array ('type' => 'string', 'default' => ''),
- 'ProductId' => Array ('type' => 'int', 'default' => 0),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- 2 => 'icon16_pending.png',
- ),
- 'Fields' => Array (
- 'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'ReviewText' => Array ('filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
- 'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
- 'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
- ),
- ),
+ // key - special, value - list select sql
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
- 'ReviewsSection' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- 2 => 'icon16_pending.png',
- ),
- 'Fields' => Array (
- 'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'ReviewText' => Array ('data_block' => 'grid_reviewtext_td', 'filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
- 'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
- 'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
- ),
+ 'products' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
+ LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
+
+ 'product' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
+ LEFT JOIN ' . TABLE_PREFIX . 'Users pu ON pu.PortalUserId = %1$s.CreatedById',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('ReviewId' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'ReviewId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedOn' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kDateFormatter', 'default' => '#NOW#',
+ ),
+ 'ReviewText' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter',
+ 'using_fck' => 1, 'default' => null, 'required' => 1,
+ ),
+ 'Rating' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 0 => 'lu_None',
+ 1 => 'lu_Rating_1',
+ 2 => 'lu_Rating_2',
+ 3 => 'lu_Rating_3',
+ 4 => 'lu_Rating_4',
+ 5 => 'lu_Rating_5'),
+ 'use_phrases' => 1,
+ 'min_value_inc' => 0, 'max_value_inc' => 5, 'not_null' => 1, 'default' => 0,
+ ),
+ 'IPAddress' => Array (
+ 'type' => 'string',
+ 'max_value_inc' => 15, 'not_null' =>1, 'default' => '',
+ ),
+ 'ItemId' => Array (
+ 'type' => 'int',
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'CreatedById' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kLEFTFormatter',
+ 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users
+ WHERE `%s` = \'%s\' ',
+ 'left_key_field' => 'PortalUserId',
+ 'left_title_field' => 'Username',
+ 'required' => 1, 'default' => NULL,
+ 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
+ ),
+ 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'options' => Array (
+ 0 => 'la_Disabled',
+ 1 => 'la_Active',
+ 2 => 'la_Pending',
+ ),
+ 'not_null' =>1, 'default' => 2,
+ ),
+ 'TextFormat' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_text', 1 => 'la_html'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Module' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'HelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'NotHelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0)
+ ),
+
+ 'VirtualFields' => Array (
+ 'ReviewedBy' => Array ('type' => 'string', 'default' => ''),
+ 'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
+ 'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
+ 'CatalogItemCategory' => Array ('type' => 'int', 'default' => 0),
+
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ProductId' => Array ('type' => 'int', 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
+ 'Fields' => Array (
+ 'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'ReviewText' => Array ('filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
+ 'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
+ 'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
+ ),
+ ),
+
+ 'ReviewsSection' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
+ 'Fields' => Array (
+ 'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'ReviewText' => Array ('data_block' => 'grid_reviewtext_td', 'filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
+ 'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
+ 'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/form_submissions/form_submissions_config.php
===================================================================
--- branches/5.3.x/core/units/forms/form_submissions/form_submissions_config.php (revision 15658)
+++ branches/5.3.x/core/units/forms/form_submissions/form_submissions_config.php (revision 15659)
@@ -1,167 +1,166 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array(
- 'Prefix' => 'formsubs',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'FormSubmissionsEventHandler','file'=>'form_submissions_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'FormSubmissionTagProcessor', 'file' => 'form_submission_tp.php', 'build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnBuildFormFields',
- ),
-
- // Captcha processing
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => 'captcha',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareCaptcha',
- ),
- ),
-
- 'TitlePresets' => Array(
- 'default' => Array(
- 'new_status_labels' => Array('form'=>'!la_title_Adding_Form!'),
- 'edit_status_labels' => Array('form'=>'!la_title_Editing_Form!'),
- ),
-
- 'formsubs_list' => Array (
- 'prefixes' => Array('form', 'formsubs_List'),
- 'format' => "!la_title_FormSubmissions! '#form_titlefield#'",
- 'toolbar_buttons' => Array ('edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'formsubs_view' => Array(
- 'prefixes' => Array('formsubs'),
- 'format' => "!la_title_ViewingFormSubmission!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'submission_edit_logs' => Array (
- 'prefixes' => Array ('formsubs', 'submission-log_List'),
- 'format' => "!la_title_ViewingFormSubmission! - !la_title_Messages! (#submission-log_recordcount#)"
- ),
-
- 'submission_log_edit' => Array (
- 'new_status_labels' => Array ('submission-log' => '!la_title_NewReply!'),
- 'edit_status_labels' => Array ('submission-log' => '!la_title_ViewingReply!'),
-
- 'prefixes' => Array ('submission-log'), 'format' => "!la_title_ViewingFormSubmission! - #submission-log_status#"
- ),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- Array ('title' => 'la_tab_General', 't' => 'submissions/submission_view', 'priority' => 1),
- Array ('title' => 'la_tab_Messages', 't' => 'submissions/submission_edit_logs', 'priority' => 2),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:submissions'),
-
- 'IDField' => 'FormSubmissionId',
- /*'TitleField' => 'Name',*/
- 'StatusField' => Array ('LogStatus'),
- 'TableName' => TABLE_PREFIX.'FormSubmissions',
- 'ListSQLs' => Array(
- ''=>' SELECT %1$s.* %2$s FROM %1$s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array(
- ''=>'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- /*'ForeignKey' => 'FormId',
- 'ParentTableKey' => 'FormId',
- 'ParentPrefix' => 'form',
- 'AutoDelete' => true,
- 'AutoClone' => true,*/
-
- 'SubItems' => Array ('submission-log', 'draft'),
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('SubmissionTime' => 'desc'),
- )
- ),
-
- 'Fields' => Array(
- 'FormSubmissionId' => Array('type' => 'int', 'not_null' => 1,'default' => 0),
- 'FormId' => Array('type' => 'int','not_null' => '1','default' => 0),
- 'SubmissionTime' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'IPAddress' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
- 'ReferrerURL' => Array ('type' => 'string', 'default' => NULL),
-
- 'LogStatus' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Replied', 2 => 'la_opt_NotReplied', 3 => 'la_opt_NewEmail', 4 => 'la_opt_Bounce'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => 2
- ),
-
- 'LastUpdatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'Notes' => Array ('type' => 'string', 'default' => NULL),
- 'MessageId' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- ),
- 'VirtualFields' => Array (
- 'MergeToSubmission' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (),
- 'default' => NULL
- ),
-
- 'IsMergeToSubmission' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0
- ),
- ),
- 'CalculatedFields' => Array(
- ),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default' => 'icon16_item.png', 1 => 'icon16_replied.gif', 2 => 'icon16_not_replied.gif', 3 => 'icon16_new_email.gif', 4 => 'icon16_bounce.gif'),
- 'Fields' => Array(
- 'FormSubmissionId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ),
- 'SubmissionTime' => Array ('title' => 'la_prompt_SumbissionTime', 'filter_block' => 'grid_date_range_filter', 'width' => 145 ),
- 'IPAddress' => Array ('filter_block' => 'grid_like_filter', 'width' => 100 ),
- 'ReferrerURL' => Array ('filter_block' => 'grid_like_filter', 'first_chars' => 100, 'width' => 200 ),
- 'LogStatus' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 100 ),
- 'LastUpdatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145 ),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'formsubs',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FormSubmissionsEventHandler', 'file' => 'form_submissions_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FormSubmissionTagProcessor', 'file' => 'form_submission_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnBuildFormFields',
+ ),
+
+ // Captcha processing
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => 'captcha',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnPrepareCaptcha',
+ ),
+ ),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('form' => '!la_title_Adding_Form!'),
+ 'edit_status_labels' => Array ('form' => '!la_title_Editing_Form!'),
+ ),
+
+ 'formsubs_list' => Array (
+ 'prefixes' => Array ('form', 'formsubs_List'),
+ 'format' => "!la_title_FormSubmissions! '#form_titlefield#'",
+ 'toolbar_buttons' => Array ('edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'formsubs_view' => Array (
+ 'prefixes' => Array ('formsubs'),
+ 'format' => "!la_title_ViewingFormSubmission!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'submission_edit_logs' => Array (
+ 'prefixes' => Array ('formsubs', 'submission-log_List'),
+ 'format' => "!la_title_ViewingFormSubmission! - !la_title_Messages! (#submission-log_recordcount#)"
+ ),
+
+ 'submission_log_edit' => Array (
+ 'new_status_labels' => Array ('submission-log' => '!la_title_NewReply!'),
+ 'edit_status_labels' => Array ('submission-log' => '!la_title_ViewingReply!'),
+
+ 'prefixes' => Array ('submission-log'), 'format' => "!la_title_ViewingFormSubmission! - #submission-log_status#"
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ Array ('title' => 'la_tab_General', 't' => 'submissions/submission_view', 'priority' => 1),
+ Array ('title' => 'la_tab_Messages', 't' => 'submissions/submission_edit_logs', 'priority' => 2),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:submissions'),
+
+ 'IDField' => 'FormSubmissionId',
+// 'TitleField' => 'Name',
+ 'StatusField' => Array ('LogStatus'),
+ 'TableName' => TABLE_PREFIX.'FormSubmissions',
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ /*'ForeignKey' => 'FormId',
+ 'ParentTableKey' => 'FormId',
+ 'ParentPrefix' => 'form',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,*/
+
+ 'SubItems' => Array ('submission-log', 'draft'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('SubmissionTime' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FormSubmissionId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ 'FormId' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'SubmissionTime' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'IPAddress' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
+ 'ReferrerURL' => Array ('type' => 'string', 'default' => NULL),
+
+ 'LogStatus' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Replied', 2 => 'la_opt_NotReplied', 3 => 'la_opt_NewEmail', 4 => 'la_opt_Bounce'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 2
+ ),
+
+ 'LastUpdatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Notes' => Array ('type' => 'string', 'default' => NULL),
+ 'MessageId' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ ),
+ 'VirtualFields' => Array (
+ 'MergeToSubmission' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (),
+ 'default' => NULL
+ ),
+
+ 'IsMergeToSubmission' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0
+ ),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png', 1 => 'icon16_replied.gif', 2 => 'icon16_not_replied.gif', 3 => 'icon16_new_email.gif', 4 => 'icon16_bounce.gif'),
+ 'Fields' => Array (
+ 'FormSubmissionId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ),
+ 'SubmissionTime' => Array ('title' => 'la_prompt_SumbissionTime', 'filter_block' => 'grid_date_range_filter', 'width' => 145 ),
+ 'IPAddress' => Array ('filter_block' => 'grid_like_filter', 'width' => 100 ),
+ 'ReferrerURL' => Array ('filter_block' => 'grid_like_filter', 'first_chars' => 100, 'width' => 200 ),
+ 'LogStatus' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 100 ),
+ 'LastUpdatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145 ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/forms/forms_config.php
===================================================================
--- branches/5.3.x/core/units/forms/forms/forms_config.php (revision 15658)
+++ branches/5.3.x/core/units/forms/forms/forms_config.php (revision 15659)
@@ -1,225 +1,227 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'form',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'FormsEventHandler','file'=>'forms_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'FormsTagProcessor','file'=>'forms_tp.php','build_event'=>'OnBuild'),
-
- 'AutoLoad' => true,
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'ScheduledTasks' => Array (
- 'check_submission_repies' => Array('EventName' => 'OnProcessReplies', 'RunSchedule' => '0 * * * *'),
- 'check_bounced_submission_repies' => Array('EventName' => 'OnProcessBouncedReplies', 'RunSchedule' => '0 */5 * * *'),
- ),
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'form', //self
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnCreateSubmissionNodes',
- ),
- ),
-
- 'TableName' => TABLE_PREFIX.'Forms',
- 'IDField' => 'FormId',
- 'TitleField' => 'Title',
- 'PermSection' => Array('main' => 'in-portal:forms'),
- 'Sections' => Array(
- 'in-portal:forms' => Array(
- 'parent' => 'in-portal:site',
- 'icon' => 'form',
- 'use_parent_header' => 1,
- 'label' => 'la_tab_CMSForms', //'la_tab_FormsConfig',
- 'url' => Array('t' => 'forms/forms_list', 'pass' => 'm'), // set "container" parameter (in section definition, not url) to true when form editing should be disabled, but submissions still visible
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 6,
-// 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
- ),
- ),
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('form'=>'!la_title_Adding_Form!'),
- 'edit_status_labels' => Array('form'=>'!la_title_Editing_Form!'),
- 'new_titlefield' => Array('form'=>''),
- ),
-
- 'forms_list' => Array (
- 'prefixes' => Array ('form_List'),
- 'format' => "!la_title_Forms!",
- 'toolbar_buttons' => Array('new_item', 'edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'forms_edit' => Array (
- 'prefixes' => Array('form'),
- 'format' => "#form_status# '#form_titlefield#' - !la_title_General!",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next'),
- ),
-
- 'forms_edit_fields' => Array (
- 'prefixes' => Array('form'),
- 'format' => "#form_status# '#form_titlefield#' - !la_title_Fields!",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'view', 'dbl-click'),
- ),
-
- 'form_edit_emails' => Array (
- 'prefixes' => Array('form'),
- 'format' => "#form_status# '#form_titlefield#' - !la_title_EmailCommunication!",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next'),
- ),
-
- 'form_field_edit' => Array (
- 'prefixes' => Array('form', 'formflds'),
- 'new_status_labels' => Array('formflds'=>"!la_title_Adding_FormField!"),
- 'edit_status_labels' => Array('formflds'=>'!la_title_Editing_FormField!'),
- 'new_titlefield' => Array('formflds'=>''),
- 'format' => "#form_status# '#form_titlefield#' - #formflds_status# '#formflds_titlefield#'",
- 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next'),
- ),
-
- 'tree_submissions' => Array (
- 'format' => "!la_title_FormSubmissions!",
- ),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'forms/forms_edit', 'priority' => 1),
- 'fields' => Array ('title' => 'la_tab_Fields', 't' => 'forms/forms_edit_fields', 'priority' => 2),
- 'emails' => Array ('title' => 'la_tab_EmailCommunication', 't' => 'forms/form_edit_emails', 'priority' => 3),
- ),
- ),
-
- 'ListSQLs' => Array(
- ''=>' SELECT %1$s.* %2$s FROM %1$s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array(
- ''=>'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'SubItems' => Array('formflds'),
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Title' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'FormId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
- 'Title' => Array('type' => 'string','not_null' => 1, 'default' => '','required' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'RequireLogin' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'UseSecurityImage' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'SubmitNotifyEmail' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
- 'sample_value' => 'email@domain.com', 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'),
- 'not_null' => 1, 'default' => ''
- ),
- 'EnableEmailCommunication' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'ProcessUnmatchedEmails' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'ReplyFromName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'ReplyFromEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'ReplyCc' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'ReplyBcc' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'ReplyMessageSignature' => Array ('type' => 'string', 'default' => NULL),
- 'ReplyServer' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'connection_failed' => '!la_error_ConnectionFailed!',
- 'message_listing_failed' => '!la_error_MessagesListReceivingFailed!',
- ),
- 'not_null' => 1, 'default' => ''
- ),
- 'ReplyPort' => Array ('type' => 'int', 'not_null' => 1, 'default' => 110),
- 'ReplyUsername' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'login_failed' => '!la_error_LoginFailed!',
- ),
- 'not_null' => 1, 'default' => ''
- ),
- 'ReplyPassword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'BounceEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'BounceServer' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'connection_failed' => '!la_error_ConnectionFailed!',
- 'message_listing_failed' => '!la_error_MessageListingFailed!',
- ),
- 'not_null' => 1, 'default' => ''
- ),
- 'BouncePort' => Array ('type' => 'int', 'not_null' => 1, 'default' => 110),
- 'BounceUsername' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'login_failed' => '!la_error_LoginFailed!',
- ),
- 'not_null' => 1, 'default' => ''
- ),
- 'BouncePassword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- ),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- 2 => 'icon16_pending.png',
- ),
- 'Fields' => Array(
- 'FormId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Title' => Array ('filter_block' => 'grid_like_filter', 'width' => 220, ),
- 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 300, ),
- 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 80,),
- 'UseSecurityImage' => Array ('filter_block' => 'grid_options_filter', 'width' => 110,),
- 'EnableEmailCommunication' => Array ('title' => 'la_col_EnableEmailCommunication', 'filter_block' => 'grid_options_filter', 'width' => 120,),
- 'SubmitNotifyEmail' => Array ('filter_block' => 'grid_like_filter'),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'form',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FormsEventHandler', 'file' => 'forms_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FormsTagProcessor', 'file' => 'forms_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'check_submission_repies' => Array ('EventName' => 'OnProcessReplies', 'RunSchedule' => '0 * * * *'),
+ 'check_bounced_submission_repies' => Array ('EventName' => 'OnProcessBouncedReplies', 'RunSchedule' => '0 */5 * * *'),
+ ),
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'form', //self
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCreateSubmissionNodes',
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Forms',
+ 'IDField' => 'FormId',
+ 'TitleField' => 'Title',
+ 'PermSection' => Array ('main' => 'in-portal:forms'),
+
+ 'Sections' => Array (
+ 'in-portal:forms' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'form',
+ 'use_parent_header' => 1,
+ 'label' => 'la_tab_CMSForms', //'la_tab_FormsConfig',
+ 'url' => Array ('t' => 'forms/forms_list', 'pass' => 'm'), // set "container" parameter (in section definition, not url) to true when form editing should be disabled, but submissions still visible
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 6,
+// 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('form' => '!la_title_Adding_Form!'),
+ 'edit_status_labels' => Array ('form' => '!la_title_Editing_Form!'),
+ 'new_titlefield' => Array ('form' => ''),
+ ),
+
+ 'forms_list' => Array (
+ 'prefixes' => Array ('form_List'),
+ 'format' => "!la_title_Forms!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'forms_edit' => Array (
+ 'prefixes' => Array ('form'),
+ 'format' => "#form_status# '#form_titlefield#' - !la_title_General!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'forms_edit_fields' => Array (
+ 'prefixes' => Array ('form'),
+ 'format' => "#form_status# '#form_titlefield#' - !la_title_Fields!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'view', 'dbl-click'),
+ ),
+
+ 'form_edit_emails' => Array (
+ 'prefixes' => Array ('form'),
+ 'format' => "#form_status# '#form_titlefield#' - !la_title_EmailCommunication!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'form_field_edit' => Array (
+ 'prefixes' => Array ('form', 'formflds'),
+ 'new_status_labels' => Array ('formflds'=>"!la_title_Adding_FormField!"),
+ 'edit_status_labels' => Array ('formflds' => '!la_title_Editing_FormField!'),
+ 'new_titlefield' => Array ('formflds' => ''),
+ 'format' => "#form_status# '#form_titlefield#' - #formflds_status# '#formflds_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'tree_submissions' => Array (
+ 'format' => "!la_title_FormSubmissions!",
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'forms/forms_edit', 'priority' => 1),
+ 'fields' => Array ('title' => 'la_tab_Fields', 't' => 'forms/forms_edit_fields', 'priority' => 2),
+ 'emails' => Array ('title' => 'la_tab_EmailCommunication', 't' => 'forms/form_edit_emails', 'priority' => 3),
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'SubItems' => Array ('formflds'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Title' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FormId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
+ 'Title' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'RequireLogin' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'UseSecurityImage' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'SubmitNotifyEmail' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
+ 'sample_value' => 'email@domain.com', 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'EnableEmailCommunication' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'ProcessUnmatchedEmails' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'ReplyFromName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ReplyFromEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ReplyCc' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ReplyBcc' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ReplyMessageSignature' => Array ('type' => 'string', 'default' => NULL),
+ 'ReplyServer' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'connection_failed' => '!la_error_ConnectionFailed!',
+ 'message_listing_failed' => '!la_error_MessagesListReceivingFailed!',
+ ),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'ReplyPort' => Array ('type' => 'int', 'not_null' => 1, 'default' => 110),
+ 'ReplyUsername' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'login_failed' => '!la_error_LoginFailed!',
+ ),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'ReplyPassword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'BounceEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'BounceServer' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'connection_failed' => '!la_error_ConnectionFailed!',
+ 'message_listing_failed' => '!la_error_MessageListingFailed!',
+ ),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'BouncePort' => Array ('type' => 'int', 'not_null' => 1, 'default' => 110),
+ 'BounceUsername' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'login_failed' => '!la_error_LoginFailed!',
+ ),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'BouncePassword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
+ 'Fields' => Array (
+ 'FormId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Title' => Array ('filter_block' => 'grid_like_filter', 'width' => 220, ),
+ 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 300, ),
+ 'RequireLogin' => Array ('filter_block' => 'grid_options_filter', 'width' => 80,),
+ 'UseSecurityImage' => Array ('filter_block' => 'grid_options_filter', 'width' => 110,),
+ 'EnableEmailCommunication' => Array ('title' => 'la_col_EnableEmailCommunication', 'filter_block' => 'grid_options_filter', 'width' => 120,),
+ 'SubmitNotifyEmail' => Array ('filter_block' => 'grid_like_filter'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/form_fields/form_fields_config.php
===================================================================
--- branches/5.3.x/core/units/forms/form_fields/form_fields_config.php (revision 15658)
+++ branches/5.3.x/core/units/forms/form_fields/form_fields_config.php (revision 15659)
@@ -1,116 +1,116 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'formflds',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'FormFieldEventHandler','file'=>'form_field_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'FormFieldsTagProcessor','file'=>'form_fields_tp.php'),
- 'AutoLoad' => true,
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'FormFieldId',
- 'TitleField' => 'FieldName',
- 'TableName' => TABLE_PREFIX.'FormFields',
- 'ListSQLs' => Array(
- ''=>' SELECT %1$s.* %2$s FROM %1$s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array(
- ''=>'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ForeignKey' => 'FormId',
- 'ParentTableKey' => 'FormId',
- 'ParentPrefix' => 'form',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
- )
- ),
-
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('FieldName' => 'asc'),
- )
- ),
-
- 'Fields' => Array(
- 'FormFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FormId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Type' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FieldName' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => null),
- 'Heading' => Array('type' => 'string', 'default' => null),
- 'Prompt' => Array('type' => 'string', 'default' => null, 'required' => 1),
- 'ElementType' => Array(
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_SingleCheckbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'upload' => 'la_type_upload', 'label' => 'la_type_label'), 'use_phrases' => 1,
- 'required' => 1, 'not_null' => 1, 'default' => '',
- ),
- 'ValueList' => Array('type' => 'string','default' => null),
- 'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'IsSystem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Required' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'DisplayInGrid' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'DefaultValue' => Array('type' => 'string', 'default' => NULL),
- 'Validation' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_None', 1 => 'la_ValidationEmail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'UploadExtensions' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'UploadMaxSize' => Array ('type' => 'int', 'default' => NULL),
- 'Visibility' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Everyone', 2 => 'la_opt_GuestsOnly'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
- 'EmailCommunicationRole' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_RecipientName', 2 => 'la_opt_RecipientEmail', 3 => 'la_opt_EmailSubject', 4 => 'la_opt_EmailBody'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- ),
-
- 'VirtualFields' => Array(
- 'DirectOptions' => Array('type' => 'string', 'default' => ''),
- ),
-
- 'CalculatedFields' => Array(
- ),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_item.png'),
- 'Fields' => Array(
- 'FormFieldId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ),
- 'FieldName' => Array( 'title'=>'la_prompt_FieldName', 'filter_block' => 'grid_like_filter', 'width' => 100 ),
- 'FieldLabel' => Array( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'label_grid_data_td', 'filter_block' => 'grid_like_filter', 'width' => 150 ),
- 'Priority' => Array('title' => 'la_prompt_Priority', 'filter_block' => 'grid_range_filter', 'width' => 80 ),
- 'ElementType' => Array('title' => 'la_prompt_ElementType', 'filter_block' => 'grid_options_filter'),
- 'Required' => Array('title' => 'la_prompt_Required', 'filter_block' => 'grid_options_filter'),
- 'DisplayInGrid' => Array('title' => 'la_prompt_DisplayInGrid', 'filter_block' => 'grid_options_filter', 'width' => 150 ),
- 'Visibility' => Array('filter_block' => 'grid_options_filter', 'width' => 100),
- 'EmailCommunicationRole' => Array('filter_block' => 'grid_options_filter', 'width' => 150),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'formflds',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FormFieldEventHandler', 'file' => 'form_field_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FormFieldsTagProcessor', 'file' => 'form_fields_tp.php'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'FormFieldId',
+ 'TitleField' => 'FieldName',
+ 'TableName' => TABLE_PREFIX.'FormFields',
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ForeignKey' => 'FormId',
+ 'ParentTableKey' => 'FormId',
+ 'ParentPrefix' => 'form',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ )
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('FieldName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FormFieldId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FormId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Type' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FieldName' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'FieldLabel' => Array ('type' => 'string', 'required' => 1, 'default' => null),
+ 'Heading' => Array ('type' => 'string', 'default' => null),
+ 'Prompt' => Array ('type' => 'string', 'default' => null, 'required' => 1),
+ 'ElementType' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_SingleCheckbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'upload' => 'la_type_upload', 'label' => 'la_type_label'), 'use_phrases' => 1,
+ 'required' => 1, 'not_null' => 1, 'default' => '',
+ ),
+ 'ValueList' => Array ('type' => 'string', 'default' => null),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'IsSystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'Required' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'DisplayInGrid' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'DefaultValue' => Array ('type' => 'string', 'default' => NULL),
+ 'Validation' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_None', 1 => 'la_ValidationEmail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'UploadExtensions' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'UploadMaxSize' => Array ('type' => 'int', 'default' => NULL),
+ 'Visibility' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Everyone', 2 => 'la_opt_GuestsOnly'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'EmailCommunicationRole' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_RecipientName', 2 => 'la_opt_RecipientEmail', 3 => 'la_opt_EmailSubject', 4 => 'la_opt_EmailBody'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ ),
+
+ 'VirtualFields' => Array (
+ 'DirectOptions' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'CalculatedFields' => Array (
+ ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'FormFieldId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ),
+ 'FieldName' => Array ( 'title' => 'la_prompt_FieldName', 'filter_block' => 'grid_like_filter', 'width' => 100 ),
+ 'FieldLabel' => Array ( 'title' => 'la_prompt_FieldLabel', 'data_block' => 'label_grid_data_td', 'filter_block' => 'grid_like_filter', 'width' => 150 ),
+ 'Priority' => Array ('title' => 'la_prompt_Priority', 'filter_block' => 'grid_range_filter', 'width' => 80 ),
+ 'ElementType' => Array ('title' => 'la_prompt_ElementType', 'filter_block' => 'grid_options_filter'),
+ 'Required' => Array ('title' => 'la_prompt_Required', 'filter_block' => 'grid_options_filter'),
+ 'DisplayInGrid' => Array ('title' => 'la_prompt_DisplayInGrid', 'filter_block' => 'grid_options_filter', 'width' => 150 ),
+ 'Visibility' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'EmailCommunicationRole' => Array ('filter_block' => 'grid_options_filter', 'width' => 150),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/admin/admin_config.php
===================================================================
--- branches/5.3.x/core/units/admin/admin_config.php (revision 15658)
+++ branches/5.3.x/core/units/admin/admin_config.php (revision 15659)
@@ -1,104 +1,99 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'adm',
- 'ItemClass' => Array ('class' => 'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'EventHandlerClass' => Array ('class' => 'AdminEventsHandler', 'file' => 'admin_events_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'AdminTagProcessor', 'file' => 'admin_tag_processor.php', 'build_event' => 'OnBuild'),
-
- 'QueryString' => Array (
- 1 => 'event',
- ),
-
- 'ScheduledTasks' => Array(
- 'optimize_performance' => Array('EventName' => 'OnOptimizePerformance', 'RunSchedule' => '0 0 * * *'),
- 'pre_resize_images' => Array('EventName' => 'OnPreResizeImages', 'RunSchedule' => '0 * * * *'),
- ),
-
- 'TitlePresets' => Array (
- 'tree_root' => Array ('format' => '!la_section_overview!'),
-
- 'tree_reports' => Array ('format' => '!la_section_overview!'),
-
- 'tree_system' => Array ('format' => '!la_section_overview!'),
-
- 'tree_tools' => Array ('format' => '!la_section_overview!'),
-
- 'system_tools' => Array ('format' => '!la_title_SystemTools!'),
-
- 'backup' => Array ('format' => '!la_performing_backup! - !la_Step! <span id="step_number"></span>'),
- 'import' => Array ('format' => '!la_performing_import! - !la_Step! <span id="step_number"></span>'),
- 'restore' => Array ('format' => '!la_performing_restore! - !la_Step! <span id="step_number"></span>'),
- 'server_info' => Array ('format' => '!la_tab_ServerInfo!'),
- 'sql_query' => Array ('format' => '!la_tab_QueryDB!'),
-
- 'no_permissions' => Array ('format' => '!la_title_NoPermissions!'),
-
- 'column_picker' => Array ('format' => '!la_title_ColumnPicker!'),
- 'csv_export' => Array ('format' => '!la_title_CSVExport!'),
- 'csv_import' => Array ('format' => '!la_title_CSVImport!'),
- ),
-
-
- 'PermSection' => Array ('main' => 'in-portal:service'),
-
- 'Sections' => Array (
- 'in-portal:root' => Array (
- 'parent' => null,
- 'icon' => 'site',
- 'label' => 'SITE_NAME',
- 'url' => Array ('t' => 'index', 'pass' => 'm', 'pass_section' => true, 'no_amp' => 1),
- 'permissions' => Array (),
- 'priority' => 0,
- 'container' => true,
- 'type' => stTREE,
- 'icon_module' => 'core',
- ),
-
- 'in-portal:service' => Array (
- 'parent' => 'in-portal:tools',
- 'icon' => 'service',
- 'label' => 'la_tab_Service',
- 'url' => Array ('t' => 'tools/system_tools', 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 6,
- 'type' => stTREE,
+$config = Array (
+ 'Prefix' => 'adm',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'EventHandlerClass' => Array ('class' => 'AdminEventsHandler', 'file' => 'admin_events_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'AdminTagProcessor', 'file' => 'admin_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'QueryString' => Array (
+ 1 => 'event',
+ ),
+
+ 'ScheduledTasks' => Array (
+ 'optimize_performance' => Array ('EventName' => 'OnOptimizePerformance', 'RunSchedule' => '0 0 * * *'),
+ 'pre_resize_images' => Array ('EventName' => 'OnPreResizeImages', 'RunSchedule' => '0 * * * *'),
+ ),
+
+ 'TitlePresets' => Array (
+ 'tree_root' => Array ('format' => '!la_section_overview!'),
+ 'tree_reports' => Array ('format' => '!la_section_overview!'),
+ 'tree_system' => Array ('format' => '!la_section_overview!'),
+ 'tree_tools' => Array ('format' => '!la_section_overview!'),
+ 'system_tools' => Array ('format' => '!la_title_SystemTools!'),
+
+ 'backup' => Array ('format' => '!la_performing_backup! - !la_Step! <span id="step_number"></span>'),
+ 'import' => Array ('format' => '!la_performing_import! - !la_Step! <span id="step_number"></span>'),
+ 'restore' => Array ('format' => '!la_performing_restore! - !la_Step! <span id="step_number"></span>'),
+ 'server_info' => Array ('format' => '!la_tab_ServerInfo!'),
+ 'sql_query' => Array ('format' => '!la_tab_QueryDB!'),
+
+ 'no_permissions' => Array ('format' => '!la_title_NoPermissions!'),
+
+ 'column_picker' => Array ('format' => '!la_title_ColumnPicker!'),
+ 'csv_export' => Array ('format' => '!la_title_CSVExport!'),
+ 'csv_import' => Array ('format' => '!la_title_CSVImport!'),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:service'),
+
+ 'Sections' => Array (
+ 'in-portal:root' => Array (
+ 'parent' => null,
+ 'icon' => 'site',
+ 'label' => 'SITE_NAME',
+ 'url' => Array ('t' => 'index', 'pass' => 'm', 'pass_section' => true, 'no_amp' => 1),
+ 'permissions' => Array (),
+ 'priority' => 0,
+ 'container' => true,
+ 'type' => stTREE,
+ 'icon_module' => 'core',
+ ),
+
+ 'in-portal:service' => Array (
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'service',
+ 'label' => 'la_tab_Service',
+ 'url' => Array ('t' => 'tools/system_tools', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
+ 'priority' => 6,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => '', // to prevent warning
+ ),
+
+ 'Fields' => Array (), // we need empty array because kernel doesn't use virtual fields else
+ 'VirtualFields' => Array (
+ 'ImportFile' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
+ 'error_msgs' => Array (
+ 'cant_open_file' => '!la_error_CantOpenFile!',
+ 'no_matching_columns' => '!la_error_NoMatchingColumns!',
),
+ 'file_types' => '*.csv', 'files_description' => '!la_hint_CSVFiles!',
+ 'upload_dir' => '/system/import/', // relative to project's home
+ 'multiple' => false, 'direct_links' => false,
+ 'default' => null,
),
- 'ListSQLs' => Array (
- '' => '', // to prevent warning
- ),
-
- 'Fields' => Array (), // we need empty array because kernel doesn't use virtual fields else
- 'VirtualFields' => Array (
- 'ImportFile' => Array (
- 'type' => 'string',
- 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
- 'error_msgs' => Array (
- 'cant_open_file' => '!la_error_CantOpenFile!',
- 'no_matching_columns' => '!la_error_NoMatchingColumns!',
- ),
- 'file_types' => '*.csv', 'files_description' => '!la_hint_CSVFiles!',
- 'upload_dir' => '/system/import/', // relative to project's home
- 'multiple' => false, 'direct_links' => false,
- 'default' => null,
- ),
-
- 'Content' => Array ('type' => 'string', 'default' => ''),
- ),
- );
+ 'Content' => Array ('type' => 'string', 'default' => ''),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/config_search/config_search_config.php
===================================================================
--- branches/5.3.x/core/units/config_search/config_search_config.php (revision 15658)
+++ branches/5.3.x/core/units/config_search/config_search_config.php (revision 15659)
@@ -1,144 +1,146 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'confs',
+$config = Array (
+ 'Prefix' => 'confs',
- 'Clones' => Array (
- 'confs-cf' => Array (
- 'Prefix' => 'confs-cf',
- 'ParentPrefix' => 'cf',
- 'ParentTableKey' => 'CustomFieldId', // linked field in master table
- 'ForeignKey' => 'CustomFieldId', // linked field in subtable
- 'AutoClone' => false, // because OnCreateCustomField hook does the stuff
- 'AutoDelete' => true,
-
- 'Hooks' => Array (
- Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '#PARENT#',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array ('OnAfterItemCreate', 'OnAfterItemUpdate'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCreateCustomField',
- ),
+ 'Clones' => Array (
+ 'confs-cf' => Array (
+ 'Prefix' => 'confs-cf',
+ 'ParentPrefix' => 'cf',
+ 'ParentTableKey' => 'CustomFieldId', // linked field in master table
+ 'ForeignKey' => 'CustomFieldId', // linked field in subtable
+ 'AutoClone' => false, // because OnCreateCustomField hook does the stuff
+ 'AutoDelete' => true,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterItemCreate', 'OnAfterItemUpdate'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCreateCustomField',
),
),
),
+ ),
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ConfigSearchEventHandler', 'file' => 'config_search_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ConfigSearchTagProcessor', 'file' => 'config_search_tag_processor.php', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
- 'hooks' => Array (),
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'SearchConfigId',
-
- 'TitleField' => 'FieldName',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('confs' => '!la_title_Adding_ConfigSearch!'),
- 'edit_status_labels' => Array ('confs' => '!la_title_Editing_ConfigSearch!'),
- 'new_titlefield' => Array ('confs' => '!la_title_New_ConfigSearch!'),
- ),
- 'configsearch_edit' => Array ('prefixes' => Array ('confs'), 'format' => "#confs_status# '#confs_titlefield#' - !la_title_General!"),
- 'config_list_search' => Array ('prefixes' => Array ('confs_List'), 'tag_params' => Array ('confs' => Array ('per_page' => -1) ), 'format' => "!la_updating_config!"),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ConfigSearchEventHandler', 'file' => 'config_search_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ConfigSearchTagProcessor', 'file' => 'config_search_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'SearchConfigId',
+
+ 'TitleField' => 'FieldName',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('confs' => '!la_title_Adding_ConfigSearch!'),
+ 'edit_status_labels' => Array ('confs' => '!la_title_Editing_ConfigSearch!'),
+ 'new_titlefield' => Array ('confs' => '!la_title_New_ConfigSearch!'),
+ ),
+ 'configsearch_edit' => Array ('prefixes' => Array ('confs'), 'format' => "#confs_status# '#confs_titlefield#' - !la_title_General!"),
+ 'config_list_search' => Array ('prefixes' => Array ('confs_List'), 'tag_params' => Array ('confs' => Array ('per_page' => -1) ), 'format' => "!la_updating_config!"),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'SearchConfig',
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'IsCustom' => 'IF(CustomFieldId IS NULL, 0, 1)',
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s'
+ ),
+
+ 'Fields' => Array (
+ 'TableName' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''),
+ 'FieldName' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''),
+ 'SimpleSearch' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1,
+ ),
+ 'AdvancedSearch' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1,
+ ),
+ 'Description' => Array ('type' => 'string', 'default' => null),
+ 'DisplayName' => Array ('type' => 'string', 'required' => 1, 'default' => null),
+ 'ModuleName' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ '' => '',
+ ),
+ 'options_sql' => 'SELECT %s
+ FROM '.TABLE_PREFIX.'Modules
+ WHERE Loaded = 1 ORDER BY LoadOrder',
+ 'option_key_field' => 'Name', 'option_title_field' => 'Name',
+ 'not_null' => '1', 'default' => 'In-Portal'
+ ),
+ 'ConfigHeader' => Array ('type' => 'string', 'required' => 1, 'default' => null),
+ 'DisplayOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SearchConfigId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FieldType' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 'text' => 'text', 'range' => 'range',
+ 'boolean' => 'boolean', 'date' => 'date',
+ ),
+ 'not_null' => '1', 'required' => 1, 'default' => 'text'
+ ),
+ 'ForeignField' => Array ('type' => 'string', 'default' => null),
+ 'JoinClause' => Array ('type' => 'string', 'default' => null),
+ 'IsWhere' => Array ('type' => 'string', 'default' => null),
+ 'IsNotWhere' => Array ('type' => 'string', 'default' => null),
+ 'ContainsWhere' => Array ('type' => 'string', 'default' => null),
+ 'NotContainsWhere' => Array ('type' => 'string', 'default' => null),
+ 'CustomFieldId' => Array ('type' => 'int', 'default' => null),
+ ),
+
+ 'VirtualFields' => Array (
+ 'IsCustom' => Array ('type' => 'int', 'default' => 0),
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('IsCustom' => 'asc'),
+ 'Sorting' => Array ('DisplayOrder' => 'asc'),
),
-
- 'TableName' => TABLE_PREFIX.'SearchConfig',
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'IsCustom' => 'IF(CustomFieldId IS NULL, 0, 1)',
- ),
- ),
-
- 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'ItemSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'Fields' => Array (
- 'TableName' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''),
- 'FieldName' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''),
- 'SimpleSearch' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'default' => 1, 'not_null' => 1,
- ),
- 'AdvancedSearch' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'default' => 1, 'not_null' => 1,
- ),
- 'Description' => Array ('type' => 'string', 'default' => null),
- 'DisplayName' => Array ('type' => 'string', 'required' => 1, 'default' => null),
- 'ModuleName' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (
- '' => '',
- ),
- 'options_sql' => 'SELECT %s
- FROM '.TABLE_PREFIX.'Modules
- WHERE Loaded = 1 ORDER BY LoadOrder',
- 'option_key_field' => 'Name', 'option_title_field' => 'Name',
- 'not_null' => '1', 'default' => 'In-Portal'
- ),
- 'ConfigHeader' => Array ('type' => 'string', 'required' => 1, 'default' => null),
- 'DisplayOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SearchConfigId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'FieldType' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (
- 'text' => 'text', 'range' => 'range',
- 'boolean' => 'boolean', 'date' => 'date',
- ),
- 'not_null' => '1', 'required' => 1, 'default' => 'text'
- ),
- 'ForeignField' => Array ('type' => 'string', 'default' => null),
- 'JoinClause' => Array ('type' => 'string', 'default' => null),
- 'IsWhere' => Array ('type' => 'string', 'default' => null),
- 'IsNotWhere' => Array ('type' => 'string', 'default' => null),
- 'ContainsWhere' => Array ('type' => 'string', 'default' => null),
- 'NotContainsWhere' => Array ('type' => 'string', 'default' => null),
- 'CustomFieldId' => Array ('type' => 'int', 'default' => null),
- ),
-
- 'VirtualFields' => Array (
- 'IsCustom' => Array ('type' => 'int', 'default' => 0),
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'ForcedSorting' => Array ('IsCustom' => 'asc'),
- 'Sorting' => Array ('DisplayOrder' => 'asc'),
- ),
- ),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/email_queue/email_queue_config.php
===================================================================
--- branches/5.3.x/core/units/email_queue/email_queue_config.php (revision 15658)
+++ branches/5.3.x/core/units/email_queue/email_queue_config.php (revision 15659)
@@ -1,94 +1,94 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'email-queue',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'EmailQueueTagProcessor', 'file' => 'email_queue_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'EmailQueueId',
-
- 'TableName' => TABLE_PREFIX . 'EmailQueue',
-
- 'TitlePresets' => Array (
- 'email_queue_list' => Array ('prefixes' => Array('email-queue_List'), 'format' => '!la_tab_EmailQueue!',),
- ),
-
- 'PermSection' => Array ('main' => 'in-portal:email_queue'),
-
- 'Sections' => Array (
- 'in-portal:email_queue' => Array (
- 'parent' => 'in-portal:mailing_folder',
- 'icon' => 'mailing_list',
- 'label' => 'la_tab_EmailQueue',
- 'url' => Array('t' => 'logs/email_logs/email_queue_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'delete'),
- 'priority' => 5.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
- 'type' => stTAB,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Queued' => 'desc'),
- )
- ),
-
- 'Fields' => Array (
- 'EmailQueueId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ToEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'MessageHeaders' => Array ('type' => 'string', 'default' => NULL),
- 'MessageBody' => Array ('type' => 'string', 'default' => NULL),
- 'Queued' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'SendRetries' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'LastSendRetry' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'EmailQueueId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'MailingId' => Array ('title' => 'la_col_MailingList', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'ToEmail' => Array ('title' => 'la_prompt_AddressTo', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'MessageHeaders' => Array ('title' => 'la_col_MessageHeaders', 'data_block' => 'grid_headers_td', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
- 'Queued' => Array ('title' => 'la_col_Queued', 'filter_block' => 'grid_date_range_filter', 'width' => 80, ),
- 'SendRetries' => Array ('title' => 'la_col_SendRetries', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
- 'LastSendRetry' => Array ('title' => 'la_col_LastSendRetry', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
-
- ),
+$config = Array (
+ 'Prefix' => 'email-queue',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'EmailQueueTagProcessor', 'file' => 'email_queue_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'EmailQueueId',
+
+ 'TableName' => TABLE_PREFIX . 'EmailQueue',
+
+ 'TitlePresets' => Array (
+ 'email_queue_list' => Array ('prefixes' => Array ('email-queue_List'), 'format' => '!la_tab_EmailQueue!',),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:email_queue'),
+
+ 'Sections' => Array (
+ 'in-portal:email_queue' => Array (
+ 'parent' => 'in-portal:mailing_folder',
+ 'icon' => 'mailing_list',
+ 'label' => 'la_tab_EmailQueue',
+ 'url' => Array ('t' => 'logs/email_logs/email_queue_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'delete'),
+ 'priority' => 5.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
+ 'type' => stTAB,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Queued' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'EmailQueueId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ToEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'MessageHeaders' => Array ('type' => 'string', 'default' => NULL),
+ 'MessageBody' => Array ('type' => 'string', 'default' => NULL),
+ 'Queued' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'SendRetries' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'LastSendRetry' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'EmailQueueId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'MailingId' => Array ('title' => 'la_col_MailingList', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'ToEmail' => Array ('title' => 'la_prompt_AddressTo', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'MessageHeaders' => Array ('title' => 'la_col_MessageHeaders', 'data_block' => 'grid_headers_td', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
+ 'Queued' => Array ('title' => 'la_col_Queued', 'filter_block' => 'grid_date_range_filter', 'width' => 80, ),
+ 'SendRetries' => Array ('title' => 'la_col_SendRetries', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
+ 'LastSendRetry' => Array ('title' => 'la_col_LastSendRetry', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/user_profile/user_profile_config.php
===================================================================
--- branches/5.3.x/core/units/user_profile/user_profile_config.php (revision 15658)
+++ branches/5.3.x/core/units/user_profile/user_profile_config.php (revision 15659)
@@ -1,49 +1,51 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'user-profile',
- 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'UserProfileEventHandler', 'file' => 'user_profile_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array('class' => 'UserProfileTagProcessor', 'file' => 'user_profile_tp.php', 'build_event' => 'OnBuild'),
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'VariableId',
- 'TableName' => TABLE_PREFIX.'UserPersistentSessionData',
-
- 'ForeignKey' => 'PortalUserId',
- 'ParentTableKey' => 'PortalUserId',
- 'ParentPrefix' => 'u',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s',),
- 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s',),
-
- 'Fields' => Array (
- 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'VariableName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'VariableValue' => Array ('type' => 'string', 'default' => NULL),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'user-profile',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'UserProfileEventHandler', 'file' => 'user_profile_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'UserProfileTagProcessor', 'file' => 'user_profile_tp.php', 'build_event' => 'OnBuild'),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'VariableId',
+ 'TableName' => TABLE_PREFIX.'UserPersistentSessionData',
+
+ 'ForeignKey' => 'PortalUserId',
+ 'ParentTableKey' => 'PortalUserId',
+ 'ParentPrefix' => 'u',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'Fields' => Array (
+ 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'VariableName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'VariableValue' => Array ('type' => 'string', 'default' => NULL),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/relationship/relationship_config.php
===================================================================
--- branches/5.3.x/core/units/relationship/relationship_config.php (revision 15658)
+++ branches/5.3.x/core/units/relationship/relationship_config.php (revision 15659)
@@ -1,109 +1,118 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'rel',
+$config = Array (
+ 'Prefix' => 'rel',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'RelationshipEventHandler','file'=>'relationship_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'RelationshipTagProcessor','file'=>'relationship_tp.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '#PARENT#',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemDelete'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnDeleteForeignRelations',
- ),
- ),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
- 'IDField' => 'RelationshipId',
- 'StatusField' => Array('Enabled','Type'),
- 'TableName' => TABLE_PREFIX.'CatalogRelationships',
- 'ParentTableKey'=> 'ResourceId',
- 'ForeignKey' => 'SourceId',
- 'ParentPrefix' => 'p',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'ItemName' => 'TRIM(CONCAT(#ITEM_NAMES#))',
- 'ItemType' => '#ITEM_TYPES#',
- ),
- ),
-
- 'ListSQLs' => Array( ''=> 'SELECT %1$s.RelationshipId, %1$s.Priority, %1$s.Type, %1$s.Enabled %2$s
- FROM %1$s #ITEM_JOIN#',
- ), // key - special, value - list select sql
-
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('ItemName' => 'asc', 'ItemType' => 'asc'),
- )
- ),
- 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s #ITEM_JOIN#',),
-
- 'Fields' => Array(
- 'RelationshipId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'SourceId' => Array('type'=>'int', 'required' => 1, 'default' => NULL),
- 'TargetId' => Array('type'=>'int', 'required' => 1, 'default' => NULL),
- 'SourceType' => Array('type'=>'int','not_null'=>1,'default'=>0),
- 'TargetType' => Array('type'=>'int','not_null'=>1,'default'=>0),
- 'Type' => Array('type'=>'int','formatter'=>'kOptionsFormatter', 'required' => 1, 'options'=>Array(1=>'la_Reciprocal',0=>'la_OneWay'), 'not_null'=>1,'default'=>0,'use_phrases'=>1),
- 'Enabled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1,
- ),
- 'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
- ),
- 'VirtualFields' => Array(
- 'ItemName' => Array ('type' => 'string', 'default' => ''),
- 'ItemType' => Array ('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default' => 'icon16_item.png',
- '1_0' => 'icon16_relation_one-way.gif',
- '0_0' => 'icon16_relation_one-way_disabled.gif',
- '1_1' => 'icon16_relation_reciprocal.gif',
- '0_1' => 'icon16_relation_reciprocal_disabled.gif'
- ), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
- 'Fields' => Array(
- 'RelationshipId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
- 'ItemName' => Array( 'title' => 'column:la_fld_TargetId', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'ItemType' => Array( 'title' => 'la_col_TargetType', 'filter_block' => 'grid_like_filter', 'width' => 80, ),
- 'Type' => Array( 'title' => 'column:la_fld_RelationshipType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Enabled' => Array('filter_block' => 'grid_options_filter', 'width' => 70, ),
- ),
- ),
- ),
- );
\ No newline at end of file
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'RelationshipEventHandler', 'file' => 'relationship_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'RelationshipTagProcessor', 'file' => 'relationship_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterItemDelete'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnDeleteForeignRelations',
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'RelationshipId',
+ 'StatusField' => Array ('Enabled', 'Type'),
+ 'TableName' => TABLE_PREFIX.'CatalogRelationships',
+ 'ParentTableKey'=> 'ResourceId',
+ 'ForeignKey' => 'SourceId',
+ 'ParentPrefix' => 'p',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'ItemName' => 'TRIM(CONCAT(#ITEM_NAMES#))',
+ 'ItemType' => '#ITEM_TYPES#',
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.RelationshipId, %1$s.Priority, %1$s.Type, %1$s.Enabled %2$s
+ FROM %1$s #ITEM_JOIN#',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('ItemName' => 'asc', 'ItemType' => 'asc'),
+ )
+ ),
+
+ 'ItemSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s #ITEM_JOIN#',
+ ),
+
+ 'Fields' => Array (
+ 'RelationshipId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'SourceId' => Array ('type' => 'int', 'required' => 1, 'default' => NULL),
+ 'TargetId' => Array ('type' => 'int', 'required' => 1, 'default' => NULL),
+ 'SourceType' => Array ('type' => 'int', 'not_null'=>1,'default'=>0),
+ 'TargetType' => Array ('type' => 'int', 'not_null'=>1,'default'=>0),
+ 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'required' => 1, 'options'=>Array (1=>'la_Reciprocal',0=>'la_OneWay'), 'not_null'=>1,'default'=>0,'use_phrases'=>1),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null'=>1,'default'=>0),
+ ),
+ 'VirtualFields' => Array (
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ItemType' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ '1_0' => 'icon16_relation_one-way.gif',
+ '0_0' => 'icon16_relation_one-way_disabled.gif',
+ '1_1' => 'icon16_relation_reciprocal.gif',
+ '0_1' => 'icon16_relation_reciprocal_disabled.gif'
+ ), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+ 'Fields' => Array (
+ 'RelationshipId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+ 'ItemName' => Array ( 'title' => 'column:la_fld_TargetId', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'ItemType' => Array ( 'title' => 'la_col_TargetType', 'filter_block' => 'grid_like_filter', 'width' => 80, ),
+ 'Type' => Array ( 'title' => 'column:la_fld_RelationshipType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/spelling_dictionary/spelling_dictionary_config.php
===================================================================
--- branches/5.3.x/core/units/spelling_dictionary/spelling_dictionary_config.php (revision 15658)
+++ branches/5.3.x/core/units/spelling_dictionary/spelling_dictionary_config.php (revision 15659)
@@ -1,98 +1,97 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'spelling-dictionary',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'SpellingDictionaryId',
-
- 'TableName' => TABLE_PREFIX.'SpellingDictionary',
-
- 'TitleField' => 'MisspelledWord',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('spelling-dictionary' => '!la_title_AddingSpellingDictionary!'),
- 'edit_status_labels' => Array ('spelling-dictionary' => '!la_title_EditingSpellingDictionary!'),
- ),
-
- 'spelling_dictionary_list' => Array (
- 'prefixes' => Array ('spelling-dictionary_List'), 'format' => "!la_title_SpellingDictionary!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
- ),
- 'spelling_dictionary_edit' => Array (
- 'prefixes' => Array ('spelling-dictionary'), 'format' => "#spelling-dictionary_status# '#spelling-dictionary_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:spelling_dictionary'),
-
-
- /*'Sections' => Array (
- 'in-portal:spelling_dictionary' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'spelling_dictionary',
- 'label' => 'la_title_SpellingDictionary',
- 'url' => Array('t' => 'spelling_dictionary/spelling_dictionary_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 7,
- 'type' => stTREE,
- ),
- ),*/
-
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('MisspelledWord' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'SpellingDictionaryId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MisspelledWord' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'SuggestedCorrection' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_spelling_dictionary.gif'),
- 'Fields' => Array (
- 'SpellingDictionaryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', ),
- 'MisspelledWord' => Array ('filter_block' => 'grid_like_filter',),
- 'SuggestedCorrection' => Array ('filter_block' => 'grid_like_filter',),
- ),
+$config = Array (
+ 'Prefix' => 'spelling-dictionary',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'SpellingDictionaryId',
+
+ 'TableName' => TABLE_PREFIX.'SpellingDictionary',
+
+ 'TitleField' => 'MisspelledWord',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('spelling-dictionary' => '!la_title_AddingSpellingDictionary!'),
+ 'edit_status_labels' => Array ('spelling-dictionary' => '!la_title_EditingSpellingDictionary!'),
+ ),
+
+ 'spelling_dictionary_list' => Array (
+ 'prefixes' => Array ('spelling-dictionary_List'), 'format' => "!la_title_SpellingDictionary!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
+ ),
+ 'spelling_dictionary_edit' => Array (
+ 'prefixes' => Array ('spelling-dictionary'), 'format' => "#spelling-dictionary_status# '#spelling-dictionary_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:spelling_dictionary'),
+
+ /*'Sections' => Array (
+ 'in-portal:spelling_dictionary' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'spelling_dictionary',
+ 'label' => 'la_title_SpellingDictionary',
+ 'url' => Array ('t' => 'spelling_dictionary/spelling_dictionary_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 7,
+ 'type' => stTREE,
+ ),
+ ),*/
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('MisspelledWord' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'SpellingDictionaryId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MisspelledWord' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'SuggestedCorrection' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_spelling_dictionary.gif'),
+ 'Fields' => Array (
+ 'SpellingDictionaryId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', ),
+ 'MisspelledWord' => Array ('filter_block' => 'grid_like_filter',),
+ 'SuggestedCorrection' => Array ('filter_block' => 'grid_like_filter',),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/captcha/captcha_config.php
===================================================================
--- branches/5.3.x/core/units/captcha/captcha_config.php (revision 15658)
+++ branches/5.3.x/core/units/captcha/captcha_config.php (revision 15659)
@@ -1,22 +1,22 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'captcha',
-// 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
-// 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'CaptchaEventHandler', 'file' => 'captcha_eh.php', 'build_event' => 'OnBuild'),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'captcha',
+// 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+// 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CaptchaEventHandler', 'file' => 'captcha_eh.php', 'build_event' => 'OnBuild'),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/phrases/phrases_config.php
===================================================================
--- branches/5.3.x/core/units/phrases/phrases_config.php (revision 15658)
+++ branches/5.3.x/core/units/phrases/phrases_config.php (revision 15659)
@@ -1,247 +1,248 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'phrases',
+$config = Array (
+ 'Prefix' => 'phrases',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'PhrasesEventHandler', 'file' => 'phrases_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'PhraseTagProcessor', 'file' => 'phrase_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'label', // labels can be edited directly
- 6 => 'mode',
- ),
-
- 'IDField' => 'PhraseId',
- 'TitleField' => 'Phrase',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'),
- 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'),
- ),
-
- 'phrase_edit' => Array (
- 'prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#',
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
-
- // for separate phrases list
- 'phrases_list_st' => Array (
- 'prefixes' => Array ('phrases_List'), 'format' => "!la_title_Phrases!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
- ),
-
- 'phrase_edit_single' => Array (
- 'prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#',
- 'toolbar_buttons' => Array ('select', 'setprimary', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'CheckSimulatniousEdit' => true,
-
- 'PermSection' => Array ('main' => 'in-portal:phrases'),
-
- 'Sections' => Array (
- // "Phrases"
- 'in-portal:phrases' => Array (
- 'parent' => 'in-portal:site',
- 'icon' => 'phrases_labels',
- 'label' => 'la_title_Phrases',
- 'url' => Array ('t' => 'languages/phrase_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 4,
- 'type' => stTREE,
- ),
- ),
-
- 'FilterMenu' => Array (
- 'Groups' => Array (
- Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => kDBList::HAVING_FILTER),
- ),
- 'Filters' => Array (
- 'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NULL'),
- 'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NOT NULL'),
- )
- ),
-
- 'TableName' => TABLE_PREFIX . 'LanguageLabels',
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'PrimaryTranslation' => 'l%4$s_Translation',
-
- 'SourceTranslation' => 'l%4$s_Translation',
- 'SourceHintTranslation' => 'l%4$s_HintTranslation',
- 'SourceColumnTranslation' => 'l%4$s_ColumnTranslation',
-
- 'CurrentTranslation' => 'l%5$s_Translation',
- 'CurrentHintTranslation' => 'l%5$s_HintTranslation',
- 'CurrentColumnTranslation' => 'l%5$s_ColumnTranslation',
-
- 'TranslationInSync' => 'IF(l%5$s_TranslateFrom = 0, 1, 0)',
- 'TranslateFromLanguage' => 'l%5$s_TranslateFrom',
- ),
- ),
-
- 'ListSQLs' => Array(
- '' => 'SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Phrase' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'PhraseId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Phrase' => Array (
- 'type' => 'string',
- 'formatter' => 'kFormatter', 'regexp' => '/^(la|lu|lc)_[A-Z\d:_\-\.]+$/i', 'unique' => Array (),
- 'not_null' => 1, 'required' => 1, 'default' => '',
- ),
- 'PhraseKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'Translation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
- 'HintTranslation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
- 'ColumnTranslation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
- 'TranslateFrom' => Array (
- 'type' => 'int',
- 'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int',
- 'not_null' => 1, 'default' => 0
- ),
- 'PhraseType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_PhraseType_Front', 1 => 'la_PhraseType_Admin', 2 => 'la_PhraseType_Both'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => Language::PHRASE_TYPE_COMMON,
- ),
- 'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'LastChangeIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Module' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Modules WHERE (Loaded = 1) AND (Name <> "In-Portal") ORDER BY LoadOrder', 'option_key_field' => 'Name', 'option_title_field' => 'Name',
- 'not_null' => 1, 'required' => 1, 'default' => 'Core'
- ),
- ),
-
- 'VirtualFields' => Array (
- 'PrimaryTranslation' => Array ('type' => 'string', 'default' => ''),
-
- 'SourceTranslation' => Array ('type' => 'string', 'default' => ''),
- 'SourceHintTranslation' => Array ('type' => 'string', 'default' => ''),
- 'SourceColumnTranslation' => Array ('type' => 'string', 'default' => ''),
-
- 'CurrentTranslation' => Array ('type' => 'string', 'default' => ''),
- 'CurrentHintTranslation' => Array ('type' => 'string', 'default' => ''),
- 'CurrentColumnTranslation' => Array ('type' => 'string', 'default' => ''),
-
- 'TranslationInSync' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0,
- ),
- 'TranslateFromLanguage' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
- 'default' => 0,
- ),
- // for language pack import/export
- 'LangFile' => Array (
- 'type' => 'string',
- 'formatter' => 'kUploadFormatter',
- 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => WRITEBALE_BASE . '/',
- 'max_len' => 255, 'default' => ''
- ),
- 'ImportOverwrite' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0,
- ),
- 'ImportSynced' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 1,
- ),
- 'DoNotEncode' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array(
- 0 => 'la_No',
- 1 => 'la_Yes',
- ),
- 'use_phrases' => 1, 'default' => 0,
- ),
- 'ExportPhrases' => Array ('type' => 'string', 'default' => ''),
- 'ExportEmailEvents' => Array ('type' => 'string', 'default' => ''),
- 'ExportCountries' => Array ('type' => 'string', 'default' => ''),
- 'ExportDataTypes' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array ('phrases' => 'la_opt_Phrases', 'emailevents' => 'la_opt_EmailEvents', 'country-state' => 'la_opt_Countries'), 'use_phrases' => 1, 'multiple' => 1,
- 'default' => '|phrases|emailevents|country-state|'
- ),
- ),
-
- 'Grids' => Array (
- // used on "Phrases" tab in language editing in "Regional" section
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'PhraseId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50),
- 'Phrase' => Array ('title' => 'la_col_Label', 'data_block' => 'grid_checkbox_td', 'width' => 200),
- 'CurrentTranslation' => Array ('title' => 'column:la_fld_Phrase', 'width' => 200),
- 'PrimaryTranslation' => Array ('title' => 'la_col_PrimaryValue', 'width' => 200),
- 'PhraseType' => Array ('filter_block' => 'grid_options_filter', 'width' => 60),
- 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
- 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100),
- 'CurrentHintTranslation' => Array ('title' => 'la_col_HintPhrase', 'width' => 200, 'hidden' => 1),
- 'CurrentColumnTranslation' => Array ('title' => 'la_col_ColumnPhrase', 'width' => 200, 'hidden' => 1),
- ),
- ),
-
- // used on "Labels & Phrases" section
- 'Phrases' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'PhraseId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50),
- 'Phrase' => Array ('title' => 'la_col_Label', 'filter_block' => 'grid_like_filter', 'width' => 170),
- 'CurrentTranslation' => Array ('title' => 'column:la_fld_Phrase', 'filter_block' => 'grid_like_filter', 'width' => 180),
- 'CurrentHintTranslation' => Array ('title' => 'la_col_HintPhrase', 'filter_block' => 'grid_like_filter', 'width' => 200, 'hidden' => 1),
- 'CurrentColumnTranslation' => Array ('title' => 'la_col_ColumnPhrase', 'filter_block' => 'grid_like_filter', 'width' => 200, 'hidden' => 1),
- 'PhraseType' => Array ('title' => 'column:la_fld_Location', 'filter_block' => 'grid_multioptions_filter', 'width' => 80),
- 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
- 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100),
- 'TranslationInSync' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
- 'TranslateFromLanguage' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, 'hidden' => 1),
- ),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'PhrasesEventHandler', 'file' => 'phrases_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'PhraseTagProcessor', 'file' => 'phrase_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'label', // labels can be edited directly
+ 6 => 'mode',
+ ),
+
+ 'IDField' => 'PhraseId',
+ 'TitleField' => 'Phrase',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'),
+ 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'),
+ ),
+
+ 'phrase_edit' => Array (
+ 'prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#',
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+
+ // for separate phrases list
+ 'phrases_list_st' => Array (
+ 'prefixes' => Array ('phrases_List'), 'format' => "!la_title_Phrases!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'view', 'dbl-click'),
+ ),
+
+ 'phrase_edit_single' => Array (
+ 'prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#',
+ 'toolbar_buttons' => Array ('select', 'setprimary', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'CheckSimulatniousEdit' => true,
+
+ 'PermSection' => Array ('main' => 'in-portal:phrases'),
+
+ 'Sections' => Array (
+ // "Phrases"
+ 'in-portal:phrases' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'phrases_labels',
+ 'label' => 'la_title_Phrases',
+ 'url' => Array ('t' => 'languages/phrase_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => kDBList::HAVING_FILTER),
+ ),
+ 'Filters' => Array (
+ 'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NULL'),
+ 'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NOT NULL'),
+ )
+ ),
+
+ 'TableName' => TABLE_PREFIX . 'LanguageLabels',
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'PrimaryTranslation' => 'l%4$s_Translation',
+
+ 'SourceTranslation' => 'l%4$s_Translation',
+ 'SourceHintTranslation' => 'l%4$s_HintTranslation',
+ 'SourceColumnTranslation' => 'l%4$s_ColumnTranslation',
+
+ 'CurrentTranslation' => 'l%5$s_Translation',
+ 'CurrentHintTranslation' => 'l%5$s_HintTranslation',
+ 'CurrentColumnTranslation' => 'l%5$s_ColumnTranslation',
+
+ 'TranslationInSync' => 'IF(l%5$s_TranslateFrom = 0, 1, 0)',
+ 'TranslateFromLanguage' => 'l%5$s_TranslateFrom',
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Phrase' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'PhraseId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Phrase' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^(la|lu|lc)_[A-Z\d:_\-\.]+$/i', 'unique' => Array (),
+ 'not_null' => 1, 'required' => 1, 'default' => '',
+ ),
+ 'PhraseKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'Translation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
+ 'HintTranslation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
+ 'ColumnTranslation' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL, 'db_type' => 'text'),
+ 'TranslateFrom' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int',
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'PhraseType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_PhraseType_Front', 1 => 'la_PhraseType_Admin', 2 => 'la_PhraseType_Both'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => Language::PHRASE_TYPE_COMMON,
+ ),
+ 'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'LastChangeIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Module' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Modules WHERE (Loaded = 1) AND (Name <> "In-Portal") ORDER BY LoadOrder', 'option_key_field' => 'Name', 'option_title_field' => 'Name',
+ 'not_null' => 1, 'required' => 1, 'default' => 'Core'
+ ),
+ ),
+
+ 'VirtualFields' => Array (
+ 'PrimaryTranslation' => Array ('type' => 'string', 'default' => ''),
+
+ 'SourceTranslation' => Array ('type' => 'string', 'default' => ''),
+ 'SourceHintTranslation' => Array ('type' => 'string', 'default' => ''),
+ 'SourceColumnTranslation' => Array ('type' => 'string', 'default' => ''),
+
+ 'CurrentTranslation' => Array ('type' => 'string', 'default' => ''),
+ 'CurrentHintTranslation' => Array ('type' => 'string', 'default' => ''),
+ 'CurrentColumnTranslation' => Array ('type' => 'string', 'default' => ''),
+
+ 'TranslationInSync' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ ),
+ 'TranslateFromLanguage' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
+ 'default' => 0,
+ ),
+ // for language pack import/export
+ 'LangFile' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kUploadFormatter',
+ 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => WRITEBALE_BASE . '/',
+ 'max_len' => 255, 'default' => ''
+ ),
+ 'ImportOverwrite' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ ),
+ 'ImportSynced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 1,
+ ),
+ 'DoNotEncode' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 0 => 'la_No',
+ 1 => 'la_Yes',
+ ),
+ 'use_phrases' => 1, 'default' => 0,
+ ),
+ 'ExportPhrases' => Array ('type' => 'string', 'default' => ''),
+ 'ExportEmailEvents' => Array ('type' => 'string', 'default' => ''),
+ 'ExportCountries' => Array ('type' => 'string', 'default' => ''),
+ 'ExportDataTypes' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('phrases' => 'la_opt_Phrases', 'emailevents' => 'la_opt_EmailEvents', 'country-state' => 'la_opt_Countries'), 'use_phrases' => 1, 'multiple' => 1,
+ 'default' => '|phrases|emailevents|country-state|'
+ ),
+ ),
+
+ 'Grids' => Array (
+ // used on "Phrases" tab in language editing in "Regional" section
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'PhraseId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50),
+ 'Phrase' => Array ('title' => 'la_col_Label', 'data_block' => 'grid_checkbox_td', 'width' => 200),
+ 'CurrentTranslation' => Array ('title' => 'column:la_fld_Phrase', 'width' => 200),
+ 'PrimaryTranslation' => Array ('title' => 'la_col_PrimaryValue', 'width' => 200),
+ 'PhraseType' => Array ('filter_block' => 'grid_options_filter', 'width' => 60),
+ 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
+ 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100),
+ 'CurrentHintTranslation' => Array ('title' => 'la_col_HintPhrase', 'width' => 200, 'hidden' => 1),
+ 'CurrentColumnTranslation' => Array ('title' => 'la_col_ColumnPhrase', 'width' => 200, 'hidden' => 1),
+ ),
+ ),
+
+ // used on "Labels & Phrases" section
+ 'Phrases' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'PhraseId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50),
+ 'Phrase' => Array ('title' => 'la_col_Label', 'filter_block' => 'grid_like_filter', 'width' => 170),
+ 'CurrentTranslation' => Array ('title' => 'column:la_fld_Phrase', 'filter_block' => 'grid_like_filter', 'width' => 180),
+ 'CurrentHintTranslation' => Array ('title' => 'la_col_HintPhrase', 'filter_block' => 'grid_like_filter', 'width' => 200, 'hidden' => 1),
+ 'CurrentColumnTranslation' => Array ('title' => 'la_col_ColumnPhrase', 'filter_block' => 'grid_like_filter', 'width' => 200, 'hidden' => 1),
+ 'PhraseType' => Array ('title' => 'column:la_fld_Location', 'filter_block' => 'grid_multioptions_filter', 'width' => 80),
+ 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
+ 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100),
+ 'TranslationInSync' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
+ 'TranslateFromLanguage' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, 'hidden' => 1),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/languages/languages_config.php
===================================================================
--- branches/5.3.x/core/units/languages/languages_config.php (revision 15658)
+++ branches/5.3.x/core/units/languages/languages_config.php (revision 15659)
@@ -1,274 +1,278 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
$config = Array (
'Prefix' => 'lang',
'ItemClass' => Array ('class' => 'LanguagesItem', 'file' => 'languages_item.php', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'LanguagesEventHandler', 'file' => 'languages_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'LanguagesTagProcessor', 'file' => 'languages_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
+
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lang',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnSave', 'OnMassDelete'),
+ 'HookToEvent' => Array ('OnSave', 'OnMassDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnScheduleTopFrameReload',
),
),
+
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'LanguageId',
- 'StatusField' => Array ('Enabled', 'PrimaryLang'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Enabled', 'PrimaryLang'), // field, that is affected by Approve/Decline events
- 'TitleField' => 'PackName', // field, used in bluebar when editing existing item
+ 'TitleField' => 'PackName', // field, used in bluebar when editing existing item
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('lang' => '!la_title_Adding_Language!'),
'edit_status_labels' => Array ('lang' => '!la_title_Editing_Language!'),
),
- 'languages_list' => Array (
+ 'languages_list' => Array (
'prefixes' => Array ('lang_List'), 'format' => "!la_title_Configuration! - !la_title_LanguagePacks!",
'toolbar_buttons' => Array (
'new_item', 'edit', 'delete', 'export', 'import', 'setprimary', 'refresh', 'view', 'dbl-click'
),
),
'languages_edit_general' => Array ('prefixes' => Array ('lang'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_General!"),
'phrases_list' => Array (
'prefixes' => Array ('lang', 'phrases_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_Labels!"
),
'phrase_edit' => Array (
'prefixes' => Array ('phrases'),
'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'),
- 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'),
+ 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'),
'format' => "#phrases_status# '#phrases_titlefield#'",
),
'import_language' => Array (
'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep1!",
),
'import_language_step2' => Array (
'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep2!",
),
'export_language' => Array (
'prefixes' => Array ('phrases.export'), 'format' => "!la_title_ExportLanguagePackStep1!",
),
'export_language_results' => Array (
- 'prefixes' => Array(), 'format' => "!la_title_ExportLanguagePackResults!",
+ 'prefixes' => Array (), 'format' => "!la_title_ExportLanguagePackResults!",
),
'events_list' => Array (
'prefixes' => Array ('lang', 'emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!",
),
'email_messages_edit' => Array (
'prefixes' => Array ('lang', 'emailevents'),
'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailevents_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
// for separate language list
'languages_list_st' => Array (
'prefixes' => Array ('lang_List'), 'format' => "!la_title_LanguagesManagement!",
),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'regional/languages_edit', 'priority' => 1),
'labels' => Array ('title' => 'la_tab_Labels', 't' => 'regional/languages_edit_phrases', 'priority' => 2),
'email_events' => Array ('title' => 'la_tab_EmailEvents', 't' => 'regional/languages_edit_email_events', 'priority' => 3),
),
),
'PermSection' => Array ('main' => 'in-portal:configure_lang'),
'Sections' => Array (
'in-portal:configure_lang' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_regional',
'label' => 'la_tab_Regional',
'url' => Array ('t' => 'regional/languages_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:set_primary', 'advanced:import', 'advanced:export'),
'priority' => 4,
'type' => stTREE,
),
// "Lang. Management"
/*'in-portal:lang_management' => Array (
'parent' => 'in-portal:system',
- 'icon' => 'core:settings_general',
- 'label' => 'la_title_LangManagement',
- 'url' => Array ('t' => 'languages/language_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'perm_prefix' => 'lang',
- 'priority' => 10.03,
- 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
+ 'icon' => 'core:settings_general',
+ 'label' => 'la_title_LangManagement',
+ 'url' => Array ('t' => 'languages/language_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'perm_prefix' => 'lang',
+ 'priority' => 10.03,
+ 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
),*/
),
'TableName' => TABLE_PREFIX . 'Languages',
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
- 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s'
+ ),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Priority' => 'desc', 'PackName' => 'asc'),
),
),
'Fields' => Array (
'LanguageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PackName' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'PackName',
'not_null' => 1, 'required' => 1, 'default' => ''
),
'LocalName' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'LocalName', 'option_key_field' => 'LocalName',
'not_null' => 1, 'required' => 1, 'default' => ''
),
'Enabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_Active'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
- 'PrimaryLang' => Array(
+ 'PrimaryLang' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'AdminInterfaceLang' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'IconURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'IconDisabledURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'InputDateFormat' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options' => Array ('m/d/Y' => 'mm/dd/yyyy', 'd/m/Y' => 'dd/mm/yyyy', 'm.d.Y' => 'mm.dd.yyyy', 'd.m.Y' => 'dd.mm.yyyy'),
'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'
),
'InputTimeFormat' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options' => Array ('g:i:s A' => 'g:i:s A', 'g:i A' => 'g:i A', 'H:i:s' => 'H:i:s', 'H:i' => 'H:i'),
'not_null' => '1', 'required' => 1, 'default' => 'g:i:s A',
),
'DateFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'),
'ShortDateFormat' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'm/d'),
'TimeFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'g:i:s A'),
'ShortTimeFormat' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'g:i A'),
'DecimalPoint' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => '.'),
'ThousandSep' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'UnitSystem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'FilenameReplacements' => Array ('type' => 'string', 'default' => NULL),
'Locale' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => " SELECT CONCAT(LocaleName, ' ' ,'\/',Locale,'\/') AS Name, Locale
FROM " . TABLE_PREFIX . 'LocalesList
ORDER BY LocaleId',
'option_title_field' => 'Name', 'option_key_field' => 'Locale',
'not_null' => 1, 'default' => 'en-US',
),
'UserDocsUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'SynchronizationModes' => Array (
'type' => 'string', 'max_len' => 255,
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_SynchronizeToOthers', 2 => 'la_opt_SynchronizeFromOthers'), 'use_phrases' => 1, 'multiple' => 1,
'not_null' => 1, 'default' => ''
),
'HtmlEmailTemplate' => Array (
'type' => 'string',
'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!', 'body_missing' => '!la_error_EmailTemplateBodyMissing!'),
'default' => '$body'
),
'TextEmailTemplate' => Array (
'type' => 'string',
'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!', 'body_missing' => '!la_error_EmailTemplateBodyMissing!'),
'default' => NULL
),
),
- 'VirtualFields' => Array (
+ 'VirtualFields' => Array (
'Charset' => Array ('type' => 'string', 'default' => CHARSET), // for backwards compatibility
'CopyLabels' => Array ('type' => 'int', 'default' => 0),
'CopyFromLanguage' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
'default' => '',
),
),
- 'Grids' => Array(
+ 'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
),
- 'Fields' => Array(
+ 'Fields' => Array (
'LanguageId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'PackName' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),//
'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
'AdminInterfaceLang' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),
'Priority' => Array ('filter_block' => 'grid_like_filter', 'width' => 60, ),
'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'SynchronizationModes' => Array ('filter_block' => 'grid_picker_filter', 'width' => 120, 'format' => ', ', 'hidden' => 1),
),
),
/*'LangManagement' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
),
'Fields' => Array (
'LanguageId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
'PackName' => Array ('title' => 'column:la_fld_Language', 'filter_block' => 'grid_options_filter', 'width' => 120),
'LocalName' => Array ('title' => 'column:la_fld_Prefix', 'filter_block' => 'grid_options_filter', 'width' => 120),
'IconURL' => Array ('title' => 'column:la_fld_Image', 'filter_block' => 'grid_empty_filter', 'width' => 80),
),
),*/
),
);
\ No newline at end of file
Index: branches/5.3.x/core/units/pdf/pdf_config.php
===================================================================
--- branches/5.3.x/core/units/pdf/pdf_config.php (revision 15658)
+++ branches/5.3.x/core/units/pdf/pdf_config.php (revision 15659)
@@ -1,24 +1,24 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'pdf',
- 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+$config = Array (
+ 'Prefix' => 'pdf',
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo' => 'PDFHelper', 'class'=>'kPDFHelper', 'file' => 'pdf_helper.php', 'build_event'=>'', 'require_classes' => 'kHelper'),
- ),
- );
\ No newline at end of file
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'PDFHelper', 'class' => 'kPDFHelper', 'file' => 'pdf_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/ban_rules/ban_rules_config.php
===================================================================
--- branches/5.3.x/core/units/ban_rules/ban_rules_config.php (revision 15658)
+++ branches/5.3.x/core/units/ban_rules/ban_rules_config.php (revision 15659)
@@ -1,146 +1,147 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'ban-rule',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'RuleId',
-
- 'TableName' => TABLE_PREFIX.'UserBanRules',
-
- 'StatusField' => Array ('Status'),
-
- 'TitleField' => 'ItemValue',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('ban-rule' => '!la_title_AddingBanRule!'),
- 'edit_status_labels' => Array ('ban-rule' => '!la_title_EditingBanRule!'),
- ),
-
- 'ban_rule_list' => Array (
- 'prefixes' => Array ('ban-rule_List'), 'format' => "!la_tab_BanList!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
- ),
-
- 'ban_rule_edit' => Array (
- 'prefixes' => Array ('ban-rule'), 'format' => "#ban-rule_status# '#ban-rule_titlefield#'",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:user_banlist'),
-
- 'Sections' => Array (
- 'in-portal:user_banlist' => Array (
- 'parent' => 'in-portal:users',
- 'icon' => 'banlist',
- 'label' => 'la_tab_BanList',
- 'url' => Array('t' => 'ban_rules/ban_rule_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 4,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Priority' => 'desc'),
+$config = Array (
+ 'Prefix' => 'ban-rule',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'RuleId',
+
+ 'TableName' => TABLE_PREFIX.'UserBanRules',
+
+ 'StatusField' => Array ('Status'),
+
+ 'TitleField' => 'ItemValue',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('ban-rule' => '!la_title_AddingBanRule!'),
+ 'edit_status_labels' => Array ('ban-rule' => '!la_title_EditingBanRule!'),
+ ),
+
+ 'ban_rule_list' => Array (
+ 'prefixes' => Array ('ban-rule_List'), 'format' => "!la_tab_BanList!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
+ ),
+
+ 'ban_rule_edit' => Array (
+ 'prefixes' => Array ('ban-rule'), 'format' => "#ban-rule_status# '#ban-rule_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:user_banlist'),
+
+ 'Sections' => Array (
+ 'in-portal:user_banlist' => Array (
+ 'parent' => 'in-portal:users',
+ 'icon' => 'banlist',
+ 'label' => 'la_tab_BanList',
+ 'url' => Array ('t' => 'ban_rules/ban_rule_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Priority' => 'desc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'RuleId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'RuleType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_Deny', 1 => 'la_opt_Allow'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 0
+ ),
+ 'ItemField' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (
+ 'ip' => 'la_opt_IP_Address',
+ 'Username' => 'la_opt_Username',
+ 'Email' => 'la_opt_Email',
+ 'FirstName' => 'la_opt_FirstName',
+ 'LastName' => 'la_opt_LastName',
+ 'Address' => 'la_opt_Address',
+ 'City' => 'la_opt_City',
+ 'State' => 'la_opt_State',
+ 'Zip' => 'la_opt_Zip',
+ 'Phone' => 'la_opt_Phone',
+ ), 'use_phrases' => 1,
+ 'required' => 1,
+ 'default' => NULL,
+ ),
+ 'ItemVerb' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options'=>Array (
+ 1 => 'la_opt_Exact',
+ 2 => 'la_opt_DoesntMatch',
+ 3 => 'la_opt_Sub-match',
+ 4 => 'la_opt_NotLike',
+ 7 => 'la_opt_NotEmpty',
+ 8 => 'la_opt_IsUnique',
+ ), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 0,
+ ),
+ 'ItemValue' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 6),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1, 'use_phrases' => 1, 'formatter' => 'kOptionsFormatter', 'options'=>Array (
+ 1 => 'la_Enabled',
+ 0 => 'la_Disabled'
)
),
+ 'ErrorTag' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ ),
- 'Fields' => Array (
- 'RuleId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'RuleType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_opt_Deny', 1 => 'la_opt_Allow'), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => 0
- ),
- 'ItemField' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter'=>'kOptionsFormatter', 'options' => Array(
- 'ip' => 'la_opt_IP_Address',
- 'Username' => 'la_opt_Username',
- 'Email' => 'la_opt_Email',
- 'FirstName' => 'la_opt_FirstName',
- 'LastName' => 'la_opt_LastName',
- 'Address' => 'la_opt_Address',
- 'City' => 'la_opt_City',
- 'State' => 'la_opt_State',
- 'Zip' => 'la_opt_Zip',
- 'Phone' => 'la_opt_Phone',
- ), 'use_phrases' => 1,
- 'required' => 1,
- 'default' => NULL,
- ),
- 'ItemVerb' => Array (
- 'type' => 'int',
- 'formatter'=>'kOptionsFormatter', 'options'=>Array(
- 1 => 'la_opt_Exact',
- 2 => 'la_opt_DoesntMatch',
- 3 => 'la_opt_Sub-match',
- 4 => 'la_opt_NotLike',
- 7 => 'la_opt_NotEmpty',
- 8 => 'la_opt_IsUnique',
- ), 'use_phrases' => 1,
- 'not_null' => 1, 'required' => 1, 'default' => 0,
- ),
- 'ItemValue' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 6),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1, 'use_phrases' => 1, 'formatter'=>'kOptionsFormatter', 'options'=>Array(
- 1 => 'la_Enabled',
- 0 => 'la_Disabled'
- )
- ),
- 'ErrorTag' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'RuleId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'RuleType' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'ItemField' => Array ('filter_block' => 'grid_options_filter', 'width' => 130, ),
- 'ItemVerb' => Array ('title' => 'column:la_fld_FieldComparision', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'ItemValue' => Array ('title' => 'column:la_fld_FieldValue', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 90, ),
- ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'RuleId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'RuleType' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'ItemField' => Array ('filter_block' => 'grid_options_filter', 'width' => 130, ),
+ 'ItemVerb' => Array ('title' => 'column:la_fld_FieldComparision', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'ItemValue' => Array ('title' => 'column:la_fld_FieldValue', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 90, ),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/permissions/permissions_config.php
===================================================================
--- branches/5.3.x/core/units/permissions/permissions_config.php (revision 15658)
+++ branches/5.3.x/core/units/permissions/permissions_config.php (revision 15659)
@@ -1,101 +1,104 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'perm',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
-
- 'Clones' => Array(
- 'c-perm' => Array(
- 'Constrain' => 'Type = 0', // non-system
- 'ParentPrefix' => 'c',
- 'ForeignKey' => 'CatId',
- 'ParentTableKey' => 'CategoryId',
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => true,
- 'HookToPrefix' => '#PARENT#',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnPreSave'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnCategorySavePermissions',
- ),
- ),
- ),
-
- 'g-perm' => Array(
- 'Constrain' => 'Type = 1', // system
- 'ParentPrefix' => 'g',
- 'ForeignKey' => 'GroupId',
- 'ParentTableKey' => 'GroupId',
-
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => true,
- 'HookToPrefix' => '#PARENT#',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnPreSave'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnGroupSavePermissions',
- ),
- ),
- ),
- ),
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- ),
-
- 'IDField' => 'PermissionId',
-
- 'StatusField' => Array('PermissionValue'),
-
- 'TitleField' => 'Permission',
-
- 'TableName' => TABLE_PREFIX.'Permissions',
-
- 'AutoDelete' => false,
- 'AutoClone' => false,
-
- 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
- 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Permission' => 'asc'),
- )
- ),
- 'Fields' => Array(
- 'PermissionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'GroupId' => Array('type' => 'int','default' => 0),
- 'PermissionValue' => Array('type' => 'int','not_null' => 1,'default' => 0),
- 'Type' => Array('type' => 'int','not_null' => 1,'default' => 0),
- 'CatId' => Array('type' => 'int','not_null' => 1,'default' => 0),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'perm',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'PermissionsEventHandler', 'file' => 'permissions_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'PermissionsTagProcessor', 'file' => 'permissions_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Clones' => Array (
+ 'c-perm' => Array (
+ 'Constrain' => 'Type = 0', // non-system
+ 'ParentPrefix' => 'c',
+ 'ForeignKey' => 'CatId',
+ 'ParentTableKey' => 'CategoryId',
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCategorySavePermissions',
+ ),
+ ),
+ ),
+
+ 'g-perm' => Array (
+ 'Constrain' => 'Type = 1', // system
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnGroupSavePermissions',
+ ),
+ ),
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ ),
+
+ 'IDField' => 'PermissionId',
+
+ 'StatusField' => Array ('PermissionValue'),
+
+ 'TitleField' => 'Permission',
+
+ 'TableName' => TABLE_PREFIX.'Permissions',
+
+ 'AutoDelete' => false,
+ 'AutoClone' => false,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s'
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Permission' => 'asc'),
+ )
+ ),
+ 'Fields' => Array (
+ 'PermissionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Permission' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'GroupId' => Array ('type' => 'int', 'default' => 0),
+ 'PermissionValue' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ 'Type' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ 'CatId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/email_events/email_events_config.php
===================================================================
--- branches/5.3.x/core/units/email_events/email_events_config.php (revision 15658)
+++ branches/5.3.x/core/units/email_events/email_events_config.php (revision 15659)
@@ -1,310 +1,311 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'emailevents',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'EmailEventsEventsHandler', 'file' => 'email_events_event_handler.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'EmailEventTagProcessor', 'file' => 'email_event_tp.php', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
-
- 'IDField' => 'EventId',
- 'StatusField' => Array ('Enabled'),
- 'TitleField' => 'Event',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('emailevents' => '!la_title_Adding_E-mail!'),
- 'edit_status_labels' => Array ('emailevents' => '!la_title_EditingEmailEvent!' /*'!la_title_Editing_E-mail!'*/),
- 'new_titlefield' => Array ('emailevents' => '!la_title_NewEmailEvent!'),
- ),
-
- // for separate grid with email editing
- 'email_message_list' => Array (
- 'prefixes' => Array ('emailevents_List'), 'format' => "!la_title_EmailMessages!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'export', 'view', 'dbl-click'),
- ),
+$config = Array (
+ 'Prefix' => 'emailevents',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'EmailEventsEventsHandler', 'file' => 'email_events_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'EmailEventTagProcessor', 'file' => 'email_event_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'EventId',
+ 'StatusField' => Array ('Enabled'),
+ 'TitleField' => 'Event',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('emailevents' => '!la_title_Adding_E-mail!'),
+ 'edit_status_labels' => Array ('emailevents' => '!la_title_EditingEmailEvent!' /*'!la_title_Editing_E-mail!'*/),
+ 'new_titlefield' => Array ('emailevents' => '!la_title_NewEmailEvent!'),
+ ),
- 'email_message_edit' => Array (
- 'prefixes' => Array ('emailevents'),
- 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_General!',
- 'toolbar_buttons' => Array ('select', 'setprimary', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
+ // for separate grid with email editing
+ 'email_message_list' => Array (
+ 'prefixes' => Array ('emailevents_List'), 'format' => "!la_title_EmailMessages!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'export', 'view', 'dbl-click'),
+ ),
- 'email_message_edit_settings' => Array (
- 'prefixes' => Array ('emailevents'),
- 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_Settings!',
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
+ 'email_message_edit' => Array (
+ 'prefixes' => Array ('emailevents'),
+ 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_General!',
+ 'toolbar_buttons' => Array ('select', 'setprimary', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
- // for mass mailing
- 'email_send_form' => Array ('prefixes' => Array (), 'format' => '!la_title_SendEmail!'),
- 'email_send' => Array ('prefixes' => Array (), 'format' => '!la_title_SendingPreparedEmails!. !la_title_PleaseWait!'),
- 'email_send_complete' => Array ('prefixes' => Array (), 'format' => '!la_title_SendMailComplete!'),
+ 'email_message_edit_settings' => Array (
+ 'prefixes' => Array ('emailevents'),
+ 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_Settings!',
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'languages/email_message_edit', 'priority' => 1),
- 'settings' => Array ('title' => 'la_tab_Settings', 't' => 'languages/email_message_settings', 'priority' => 2),
- ),
+ // for mass mailing
+ 'email_send_form' => Array ('prefixes' => Array (), 'format' => '!la_title_SendEmail!'),
+ 'email_send' => Array ('prefixes' => Array (), 'format' => '!la_title_SendingPreparedEmails!. !la_title_PleaseWait!'),
+ 'email_send_complete' => Array ('prefixes' => Array (), 'format' => '!la_title_SendMailComplete!'),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'languages/email_message_edit', 'priority' => 1),
+ 'settings' => Array ('title' => 'la_tab_Settings', 't' => 'languages/email_message_settings', 'priority' => 2),
),
+ ),
- 'CheckSimulatniousEdit' => true,
+ 'CheckSimulatniousEdit' => true,
- 'PermSection' => Array ('main' => 'in-portal:configemail'),
+ 'PermSection' => Array ('main' => 'in-portal:configemail'),
- 'Sections' => Array (
- 'in-portal:configemail' => Array (
- 'parent' => 'in-portal:site',
- 'icon' => 'email_templates',
- 'label' => 'la_tab_E-mails',
- 'url' => Array ('t' => 'languages/email_message_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 5,
- 'type' => stTREE,
- ),
+ 'Sections' => Array (
+ 'in-portal:configemail' => Array (
+ 'parent' => 'in-portal:site',
+ 'icon' => 'email_templates',
+ 'label' => 'la_tab_E-mails',
+ 'url' => Array ('t' => 'languages/email_message_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 5,
+ 'type' => stTREE,
),
+ ),
- 'TableName' => TABLE_PREFIX . 'EmailEvents',
+ 'TableName' => TABLE_PREFIX . 'EmailEvents',
- 'CalculatedFields' => Array (
- '' => Array (
- 'SourceSubject' => 'l%4$s_Subject',
- 'SourceHtmlBody' => 'l%4$s_HtmlBody',
- 'SourcePlainTextBody' => 'l%4$s_PlainTextBody',
-
- 'CurrentSubject' => 'l%5$s_Subject',
- 'CurrentHtmlBody' => 'l%5$s_HtmlBody',
- 'CurrentPlainTextBody' => 'l%5$s_PlainTextBody',
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'SourceSubject' => 'l%4$s_Subject',
+ 'SourceHtmlBody' => 'l%4$s_HtmlBody',
+ 'SourcePlainTextBody' => 'l%4$s_PlainTextBody',
+
+ 'CurrentSubject' => 'l%5$s_Subject',
+ 'CurrentHtmlBody' => 'l%5$s_HtmlBody',
+ 'CurrentPlainTextBody' => 'l%5$s_PlainTextBody',
- 'TranslationInSync' => 'IF(l%5$s_TranslateFrom = 0, 1, 0)',
- 'TranslateFromLanguage' => 'l%5$s_TranslateFrom',
- ),
+ 'TranslationInSync' => 'IF(l%5$s_TranslateFrom = 0, 1, 0)',
+ 'TranslateFromLanguage' => 'l%5$s_TranslateFrom',
),
+ ),
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Enabled' => 'desc'),
+ 'Sorting' => Array ('Event' => 'asc'),
+ ),
+ 'module' => Array (
+ 'ForcedSorting' => Array ('Enabled' => 'desc'),
+ 'Sorting' => Array ('Description' => 'asc')
),
+ ),
- 'ListSortings' => Array (
- '' => Array (
- 'ForcedSorting' => Array ('Enabled' => 'desc'),
- 'Sorting' => Array ('Event' => 'asc'),
- ),
- 'module' => Array (
- 'ForcedSorting' => Array ('Enabled' => 'desc'),
- 'Sorting' => Array ('Description' => 'asc')
+ 'Fields' => Array (
+ 'EventId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Event' => Array ('type' => 'string', 'not_null' => 1, 'unique' => Array ('Type'), 'required' => 1, 'default' => ''),
+ 'Headers' => Array ('type' => 'string', 'default' => NULL),
+ 'ReplacementTags' => Array ('type' => 'string', 'default' => NULL),
+
+ 'AllowChangingSender' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'CustomSender' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomSender'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'SenderName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'SenderAddressType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User'), 'use_phrases' => 1,
+ 'not_null' => 1, 'error_field' => 'SenderAddress', 'default' => 0
+ ),
+ 'SenderAddress' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'invalid_email' => '!la_err_invalid_format!',
+ 'invalid_user' => '!la_error_UserNotFound!',
),
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'AllowChangingRecipient' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'CustomRecipient' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomRecipients'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
),
+ 'Recipients' => Array ('type' => 'string', 'default' => NULL),
- 'Fields' => Array (
- 'EventId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Event' => Array ('type' => 'string', 'not_null' => 1, 'unique' => Array ('Type'), 'required' => 1, 'default' => ''),
- 'Headers' => Array ('type' => 'string', 'default' => NULL),
- 'ReplacementTags' => Array ('type' => 'string', 'default' => NULL),
-
- 'AllowChangingSender' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'CustomSender' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomSender'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'SenderName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'SenderAddressType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User'), 'use_phrases' => 1,
- 'not_null' => 1, 'error_field' => 'SenderAddress', 'default' => 0
- ),
- 'SenderAddress' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'invalid_email' => '!la_err_invalid_format!',
- 'invalid_user' => '!la_error_UserNotFound!',
- ),
- 'not_null' => 1, 'default' => ''
- ),
- 'AllowChangingRecipient' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'CustomRecipient' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomRecipients'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'Recipients' => Array ('type' => 'string', 'default' => NULL),
+ 'Subject' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'text',
+ 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
+ 'required' => 1, 'default' => null
+ ),
- 'Subject' => Array (
- 'type' => 'string',
- 'formatter' => 'kMultiLanguage', 'db_type' => 'text',
- 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
- 'required' => 1, 'default' => null
- ),
+ 'HtmlBody' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'longtext',
+ 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
+ 'default' => null
+ ),
- 'HtmlBody' => Array (
- 'type' => 'string',
- 'formatter' => 'kMultiLanguage', 'db_type' => 'longtext',
- 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
- 'default' => null
- ),
+ 'PlainTextBody' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'longtext',
+ 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
+ 'default' => null
+ ),
- 'PlainTextBody' => Array (
- 'type' => 'string',
- 'formatter' => 'kMultiLanguage', 'db_type' => 'longtext',
- 'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!'),
- 'default' => null
- ),
+ 'TranslateFrom' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int',
+ 'not_null' => 1, 'default' => 0
+ ),
- 'TranslateFrom' => Array (
- 'type' => 'int',
- 'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int',
- 'not_null' => 1, 'default' => 0
- ),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
- 'Enabled' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 1
- ),
-
- 'FrontEndOnly' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
-
- 'Module' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (),
- 'not_null' => 1, 'required' => 1, 'default' => 'Core'
- ),
-
- 'Description' => Array ('type' => 'string', 'default' => NULL),
-
- 'Type' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
- 'not_null' => 1, 'unique' => Array ('Event'), 'required' => 1, 'default' => 0
- ),
- 'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'BindToSystemEvent' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- ),
-
- 'VirtualFields' => Array (
- 'RecipientType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'To', 2 => 'Cc', 3 => 'Bcc'),
- 'default' => 1
- ),
- 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'default' => ''),
- 'RecipientAddressType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User', 3 => 'la_opt_Group'), 'use_phrases' => 1,
- 'error_field' => 'RecipientAddress', 'default' => 0
- ),
- 'RecipientAddress' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'error_msgs' => Array (
- 'invalid_email' => '!la_err_invalid_format!',
- 'invalid_user' => '!la_error_UserNotFound!',
- 'invalid_group' => '!la_error_GroupNotFound!',
- ),
- 'default' => ''
- ),
+ 'FrontEndOnly' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
- 'Tag' => Array ('type' => 'string', 'default' => ''),
- 'Replacement' => Array ('type' => 'string', 'default' => ''),
- 'ReplacementTagsXML' => Array ('type' => 'string', 'default' => ''),
-
- 'SourceSubject' => Array ('type' => 'string', 'default' => ''),
- 'SourceHtmlBody' => Array ('type' => 'string', 'default' => ''),
- 'SourcePlainTextBody' => Array ('type' => 'string', 'default' => ''),
-
- 'CurrentSubject' => Array ('type' => 'string', 'default' => ''),
- 'CurrentHtmlBody' => Array ('type' => 'string', 'default' => ''),
- 'CurrentPlainTextBody' => Array ('type' => 'string', 'default' => ''),
-
- 'TranslationInSync' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0,
- ),
- 'TranslateFromLanguage' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
- 'default' => 0,
+ 'Module' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (),
+ 'not_null' => 1, 'required' => 1, 'default' => 'Core'
+ ),
+
+ 'Description' => Array ('type' => 'string', 'default' => NULL),
+
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
+ 'not_null' => 1, 'unique' => Array ('Event'), 'required' => 1, 'default' => 0
+ ),
+ 'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'BindToSystemEvent' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'VirtualFields' => Array (
+ 'RecipientType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'To', 2 => 'Cc', 3 => 'Bcc'),
+ 'default' => 1
+ ),
+ 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'default' => ''),
+ 'RecipientAddressType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User', 3 => 'la_opt_Group'), 'use_phrases' => 1,
+ 'error_field' => 'RecipientAddress', 'default' => 0
+ ),
+ 'RecipientAddress' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'error_msgs' => Array (
+ 'invalid_email' => '!la_err_invalid_format!',
+ 'invalid_user' => '!la_error_UserNotFound!',
+ 'invalid_group' => '!la_error_GroupNotFound!',
),
+ 'default' => ''
+ ),
+
+ 'Tag' => Array ('type' => 'string', 'default' => ''),
+ 'Replacement' => Array ('type' => 'string', 'default' => ''),
+ 'ReplacementTagsXML' => Array ('type' => 'string', 'default' => ''),
+
+ 'SourceSubject' => Array ('type' => 'string', 'default' => ''),
+ 'SourceHtmlBody' => Array ('type' => 'string', 'default' => ''),
+ 'SourcePlainTextBody' => Array ('type' => 'string', 'default' => ''),
+
+ 'CurrentSubject' => Array ('type' => 'string', 'default' => ''),
+ 'CurrentHtmlBody' => Array ('type' => 'string', 'default' => ''),
+ 'CurrentPlainTextBody' => Array ('type' => 'string', 'default' => ''),
+
+ 'TranslationInSync' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ ),
+ 'TranslateFromLanguage' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
+ 'default' => 0,
),
+ ),
- 'Grids' => Array (
- // used on "Email Events" tab in language editing in "Regional" section
- 'Default' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'EventId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, ),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
- 'Enabled' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
- ),
+ 'Grids' => Array (
+ // used on "Email Events" tab in language editing in "Regional" section
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'EventId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, ),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
+ 'Enabled' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
),
+ ),
- // used on "Email Templates" section
- 'Emails' => Array (
- 'Icons' => Array (
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png',
- ),
- 'Fields' => Array (
- 'EventId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'CurrentSubject' => Array ('title' => 'column:la_fld_Subject', 'filter_block' => 'grid_like_filter', 'no_special' => 0, 'width' => 300, ),
- 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60, ),
- 'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ),
- 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, ),
- 'FrontEndOnly' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, 'hidden' => 1),
- 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
- 'TranslationInSync' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
- 'TranslateFromLanguage' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, 'hidden' => 1),
- ),
+ // used on "Email Templates" section
+ 'Emails' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array (
+ 'EventId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'CurrentSubject' => Array ('title' => 'column:la_fld_Subject', 'filter_block' => 'grid_like_filter', 'no_special' => 0, 'width' => 300, ),
+ 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60, ),
+ 'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, ),
+ 'FrontEndOnly' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, 'hidden' => 1),
+ 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
+ 'TranslationInSync' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
+ 'TranslateFromLanguage' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, 'hidden' => 1),
),
),
- );
\ No newline at end of file
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/stylesheets/stylesheets_config.php
===================================================================
--- branches/5.3.x/core/units/stylesheets/stylesheets_config.php (revision 15658)
+++ branches/5.3.x/core/units/stylesheets/stylesheets_config.php (revision 15659)
@@ -1,167 +1,168 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array(
- 'Prefix' => 'css',
- 'ItemClass' => Array('class'=>'StylesheetsItem','file'=>'stylesheets_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'StylesheetsEventHandler','file'=>'stylesheets_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'css',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array('OnSave'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnCompileStylesheet',
- ),
- ),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
- 'IDField' => 'StylesheetId',
-
- 'StatusField' => Array('Enabled'),
-
- 'TitleField' => 'Name',
-
- 'TitlePresets' => Array(
- 'default' => Array(
- 'new_status_labels' => Array('css'=>'!la_title_Adding_Stylesheet!'),
- 'edit_status_labels' => Array('css'=>'!la_title_Editing_Stylesheet!'),
- 'new_titlefield' => Array('css'=>'!la_title_New_Stylesheet!'),
- ),
-
- 'styles_list' => Array(
- 'prefixes' => Array('css_List'), 'format' => "!la_title_Stylesheets!",
- 'toolbar_buttons' => Array('new_style', 'edit', 'delete', 'approve', 'decline', 'clone', 'view', 'dbl-click'),
- ),
-
- 'stylesheets_edit' => Array(
- 'prefixes' => Array('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
- ),
-
- 'base_styles' => Array(
- 'prefixes' => Array('css', 'selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_selector', 'edit', 'delete', 'clone', 'view', 'dbl-click'),
- ),
-
- 'block_styles' => Array(
- 'prefixes' => Array('css', 'selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_selector', 'edit', 'delete', 'clone', 'reset_to_base', 'view', 'dbl-click'),
- ),
-
- 'base_style_edit' => Array(
- 'prefixes' => Array('css', 'selectors',),
- 'new_status_labels' => Array('selectors' => '!la_title_Adding_BaseStyle!'),
- 'edit_status_labels' => Array('selectors' => '!la_title_Editing_BaseStyle!'),
- 'new_titlefield' => Array('selectors'=>'!la_title_New_BaseStyle!'),
- 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'",
- 'toolbar_buttons' => Array('select', 'cancel'),
- ),
-
- 'block_style_edit' => Array(
- 'prefixes' => Array('css', 'selectors'),
- 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BlockStyle!'),
- 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BlockStyle!'),
- 'new_titlefield' => Array('selectors'=>'!la_title_New_BlockStyle!'),
- 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'",
- 'toolbar_buttons' => Array('select', 'cancel', 'reset_to_base'),
- ),
-
- 'style_edit' => Array(
- 'prefixes' => Array('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'",
- 'toolbar_buttons' => Array('select', 'cancel', 'reset_to_base'),
- ),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'stylesheets/stylesheets_edit', 'priority' => 1),
- 'block_styles' => Array ('title' => 'la_tab_BlockStyles', 't' => 'stylesheets/stylesheets_edit_block', 'priority' => 2),
- 'base_styles' => Array ('title' => 'la_tab_BaseStyles', 't' => 'stylesheets/stylesheets_edit_base', 'priority' => 3),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:configure_styles'),
- /* removed until figure out what to do with this section
- 'Sections' => Array (
- 'in-portal:configure_styles' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'style',
- 'label' => 'la_tab_Stylesheets',
- 'url' => Array('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 10,
- 'type' => stTREE,
- ),
- ),
- */
- 'TableName' => TABLE_PREFIX.'Stylesheets',
- 'SubItems' => Array('selectorsbase', 'selectorsblock'),
-
- 'AutoDelete' => true,
-
- 'AutoClone' => true,
-
- 'ListSQLs' => Array(
- '' => 'SELECT * FROM %s', ), // key - special, value - list select sql
-
- 'ItemSQLs' => Array(
- '' => 'SELECT * FROM %s', ),
-
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
- ),
- ),
-
- 'Fields' => Array(
- 'StylesheetId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
- 'AdvancedCSS' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
- ),
-
- 'VirtualFields' => Array(),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default' => 'icon16_item.png',
- 0 => 'icon16_disabled.png',
- 1 => 'icon16_item.png'
- ),
- 'Fields' => Array(
- 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
- 'Description' => Array ('first_chars' => 100, 'filter_block' => 'grid_like_filter'),
- 'Enabled' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter'),
- 'LastCompiled' => Array ('title' => 'la_col_LastCompiled', 'filter_block' => 'grid_date_range_filter'),
- ),
- ),
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'css',
+ 'ItemClass' => Array ('class' => 'StylesheetsItem', 'file' => 'stylesheets_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'StylesheetsEventHandler', 'file' => 'stylesheets_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'css',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array ('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCompileStylesheet',
+ ),
+ ),
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'StylesheetId',
+
+ 'StatusField' => Array ('Enabled'),
+
+ 'TitleField' => 'Name',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('css' => '!la_title_Adding_Stylesheet!'),
+ 'edit_status_labels' => Array ('css' => '!la_title_Editing_Stylesheet!'),
+ 'new_titlefield' => Array ('css' => '!la_title_New_Stylesheet!'),
+ ),
+
+ 'styles_list' => Array (
+ 'prefixes' => Array ('css_List'), 'format' => "!la_title_Stylesheets!",
+ 'toolbar_buttons' => Array ('new_style', 'edit', 'delete', 'approve', 'decline', 'clone', 'view', 'dbl-click'),
+ ),
+
+ 'stylesheets_edit' => Array (
+ 'prefixes' => Array ('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
+ ),
+
+ 'base_styles' => Array (
+ 'prefixes' => Array ('css', 'selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_selector', 'edit', 'delete', 'clone', 'view', 'dbl-click'),
+ ),
+
+ 'block_styles' => Array (
+ 'prefixes' => Array ('css', 'selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_selector', 'edit', 'delete', 'clone', 'reset_to_base', 'view', 'dbl-click'),
+ ),
+
+ 'base_style_edit' => Array (
+ 'prefixes' => Array ('css', 'selectors',),
+ 'new_status_labels' => Array ('selectors' => '!la_title_Adding_BaseStyle!'),
+ 'edit_status_labels' => Array ('selectors' => '!la_title_Editing_BaseStyle!'),
+ 'new_titlefield' => Array ('selectors' => '!la_title_New_BaseStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel'),
+ ),
+
+ 'block_style_edit' => Array (
+ 'prefixes' => Array ('css', 'selectors'),
+ 'new_status_labels' => Array ('selectors' => '!la_title_Adding_BlockStyle!'),
+ 'edit_status_labels' => Array ('selectors' => '!la_title_Editing_BlockStyle!'),
+ 'new_titlefield' => Array ('selectors' => '!la_title_New_BlockStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_to_base'),
+ ),
+
+ 'style_edit' => Array (
+ 'prefixes' => Array ('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_to_base'),
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'stylesheets/stylesheets_edit', 'priority' => 1),
+ 'block_styles' => Array ('title' => 'la_tab_BlockStyles', 't' => 'stylesheets/stylesheets_edit_block', 'priority' => 2),
+ 'base_styles' => Array ('title' => 'la_tab_BaseStyles', 't' => 'stylesheets/stylesheets_edit_base', 'priority' => 3),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:configure_styles'),
+/* removed until figure out what to do with this section
+ 'Sections' => Array (
+ 'in-portal:configure_styles' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'style',
+ 'label' => 'la_tab_Stylesheets',
+ 'url' => Array ('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 10,
+ 'type' => stTREE,
+ ),
+ ),
+*/
+ 'TableName' => TABLE_PREFIX.'Stylesheets',
+ 'SubItems' => Array ('selectorsbase', 'selectorsblock'),
+
+ 'AutoDelete' => true,
+
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT *
+ FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'StylesheetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+ 'AdvancedCSS' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'LastCompiled' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Enabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1', 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png'
+ ),
+ 'Fields' => Array (
+ 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
+ 'Description' => Array ('first_chars' => 100, 'filter_block' => 'grid_like_filter'),
+ 'Enabled' => Array ('title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter'),
+ 'LastCompiled' => Array ('title' => 'la_col_LastCompiled', 'filter_block' => 'grid_date_range_filter'),
+ ),
+ ),
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/page_revisions/page_revisions_config.php
===================================================================
--- branches/5.3.x/core/units/page_revisions/page_revisions_config.php (revision 15658)
+++ branches/5.3.x/core/units/page_revisions/page_revisions_config.php (revision 15659)
@@ -1,93 +1,95 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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!');
- $config = Array (
- 'Prefix' => 'page-revision',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'PageRevisionEventHandler', 'file' => 'page_revision_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'PageRevisionTagProcessor', 'file' => 'page_revision_tp.php', 'build_event' => 'OnBuild'),
- 'AutoLoad' => true,
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode', // needed?
- ),
-
- 'IDField' => 'RevisionId',
- 'ParentTableKey' => 'CategoryId', // linked field in master table
- 'ForeignKey' => 'PageId', // linked field in subtable
- 'ParentPrefix' => 'c',
- 'AutoDelete' => true,
- 'AutoClone' => true,
-
- 'TitleField' => 'RevisionNumber',
-
- 'TableName' => TABLE_PREFIX . 'PageRevisions',
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN ' . TABLE_PREFIX . '%3$sCategories c ON c.CategoryId = %1$s.PageId
- LEFT JOIN ' . TABLE_PREFIX . 'Users created_by ON created_by.PortalUserId = %1$s.CreatedById'
- ),
-
- 'SubItems' => Array ('content'),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('IsDraft' => 'desc', 'RevisionNumber' => 'desc'),
- )
- ),
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'CreatedBy' => 'created_by.Username',
- 'IsLive' => 'IF(%1$s.RevisionNumber = c.LiveRevisionNumber, 1, 0)',
- ),
- ),
-
- 'Fields' => Array (
- 'RevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'RevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'IsDraft' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'FromRevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array (
- 'type' => 'int',
- 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'sample_value' => 'Guest', 'required' => 1,
- 'default' => NULL
- ),
- 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'AutoSavedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Pending', 1 => 'la_opt_Published', 0 => 'la_opt_Declined'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2)
- ),
-
- 'VirtualFields' => Array (
- 'CreatedBy' => Array ('type' => 'string', 'default' => ''),
- 'IsLive' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'default' => 0,
- )
- ),
- );
+$config = Array (
+ 'Prefix' => 'page-revision',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'PageRevisionEventHandler', 'file' => 'page_revision_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'PageRevisionTagProcessor', 'file' => 'page_revision_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode', // needed?
+ ),
+
+ 'IDField' => 'RevisionId',
+ 'ParentTableKey' => 'CategoryId', // linked field in master table
+ 'ForeignKey' => 'PageId', // linked field in subtable
+ 'ParentPrefix' => 'c',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'TitleField' => 'RevisionNumber',
+
+ 'TableName' => TABLE_PREFIX . 'PageRevisions',
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . '%3$sCategories c ON c.CategoryId = %1$s.PageId
+ LEFT JOIN ' . TABLE_PREFIX . 'Users created_by ON created_by.PortalUserId = %1$s.CreatedById'
+ ),
+
+ 'SubItems' => Array ('content'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('IsDraft' => 'desc', 'RevisionNumber' => 'desc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'CreatedBy' => 'created_by.Username',
+ 'IsLive' => 'IF(%1$s.RevisionNumber = c.LiveRevisionNumber, 1, 0)',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'RevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'RevisionNumber' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'IsDraft' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'FromRevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'sample_value' => 'Guest', 'required' => 1,
+ 'default' => NULL
+ ),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'AutoSavedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Pending', 1 => 'la_opt_Published', 0 => 'la_opt_Declined'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2)
+ ),
+
+ 'VirtualFields' => Array (
+ 'CreatedBy' => Array ('type' => 'string', 'default' => ''),
+ 'IsLive' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'default' => 0,
+ )
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/general/general_config.php
===================================================================
--- branches/5.3.x/core/units/general/general_config.php (revision 15658)
+++ branches/5.3.x/core/units/general/general_config.php (revision 15659)
@@ -1,46 +1,46 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @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!');
- $config = Array (
- 'Prefix' => 'm',
- 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
-// 'TagProcessorClass' => Array ('class' => 'kMainTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'QueryString' => Array (
- 1 => 'cat_id',
- 2 => 'cat_page',
- 3 => 'lang',
- 4 => 'theme',
- 5 => 'opener',
- 6 => 'wid',
- ),
-
- 'TitleField' => 'CachedNavbar',
- 'TitlePhrase' => 'la_Text_Category',
- 'CatalogTabIcon' => 'icon16_section.png',
- 'ItemType' => 1,
- 'TableName' => TABLE_PREFIX . 'Categories',
-
- 'CatalogItem' => true,
-
- 'PortalStyleEnv' => true,
-
- 'RewritePriority' => 100,
- 'RewriteListener' => 'c_EventHandler:CategoryRewriteListener',
-
- 'PermTabText' => 'In-Portal',
- 'PermSection' => Array ('search' => 'in-portal:configuration_search', 'custom' => 'in-portal:configuration_custom'),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'm',
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+// 'TagProcessorClass' => Array ('class' => 'kMainTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'QueryString' => Array (
+ 1 => 'cat_id',
+ 2 => 'cat_page',
+ 3 => 'lang',
+ 4 => 'theme',
+ 5 => 'opener',
+ 6 => 'wid',
+ ),
+
+ 'TitleField' => 'CachedNavbar',
+ 'TitlePhrase' => 'la_Text_Category',
+ 'CatalogTabIcon' => 'icon16_section.png',
+ 'ItemType' => 1,
+ 'TableName' => TABLE_PREFIX . 'Categories',
+
+ 'CatalogItem' => true,
+
+ 'PortalStyleEnv' => true,
+
+ 'RewritePriority' => 100,
+ 'RewriteListener' => 'c_EventHandler:CategoryRewriteListener',
+
+ 'PermTabText' => 'In-Portal',
+ 'PermSection' => Array ('search' => 'in-portal:configuration_search', 'custom' => 'in-portal:configuration_custom'),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/site_domains/site_domains_config.php
===================================================================
--- branches/5.3.x/core/units/site_domains/site_domains_config.php (revision 15658)
+++ branches/5.3.x/core/units/site_domains/site_domains_config.php (revision 15659)
@@ -1,156 +1,157 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2010 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!');
+defined('FULL_PATH') or die('restricted access!');
- $config = Array (
- 'Prefix' => 'site-domain',
- 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
- 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'SiteDomainEventHandler', 'file' => 'site_domain_eh.php', 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
- ),
-
- 'IDField' => 'DomainId',
-
- 'TableName' => TABLE_PREFIX . 'SiteDomains',
-
- 'TitleField' => 'DomainName',
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('site-domain' => '!la_title_AddingSiteDomain!'),
- 'edit_status_labels' => Array ('site-domain' => '!la_title_EditingSiteDomain!'),
- ),
-
- 'site_domain_list' => Array (
- 'prefixes' => Array ('site-domain_List'), 'format' => "!la_title_SiteDomains!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
- ),
-
- 'site_domain_edit' => Array (
- 'prefixes' => Array ('site-domain'), 'format' => "#site-domain_status# '#site-domain_titlefield#' - !la_title_General!",
- 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
- ),
- ),
-
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'site_domains/site_domain_edit', 'priority' => 1),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:site_domains'),
-
- 'Sections' => Array (
- 'in-portal:site_domains' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'site_domain',
- 'label' => 'la_title_SiteDomains',
- 'url' => Array('t' => 'site_domains/site_domain_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 7,
- 'type' => stTREE,
- ),
- ),
-
- 'ListSQLs' => Array (
- '' => ' SELECT %1$s.* %2$s FROM %1$s',
- ),
-
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Priority' => 'desc', 'DomainName' => 'asc'),
- )
- ),
-
- 'Fields' => Array (
- 'DomainId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'DomainName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'DomainNameUsesRegExp' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'SSLUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'SSLUrlUsesRegExp' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'AdminEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'DefaultEmailRecipients' => Array ('type' => 'string', 'default' => NULL),
- 'Country' => Array (
- 'type' => 'string', 'max_len' => 3,
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
- FROM ' . TABLE_PREFIX . 'CountryStates
- WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
- ORDER BY Name',
- 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
- 'not_null' => 1, 'default' => ''
- ),
- 'PrimaryLanguageId' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 ORDER BY PackName ASC', 'option_key_field' => 'LanguageId', 'option_title_field' => 'PackName',
- 'not_null' => 1, 'default' => 0
- ),
- 'Languages' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 ORDER BY PackName ASC', 'option_key_field' => 'LanguageId', 'option_title_field' => 'PackName',
- 'not_null' => 1, 'default' => ''
- ),
- 'PrimaryThemeId' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Themes WHERE Enabled = 1 ORDER BY Name ASC', 'option_key_field' => 'ThemeId', 'option_title_field' => 'Name',
- 'not_null' => 1, 'default' => 0
- ),
- 'Themes' => Array (
- 'type' => 'string', 'max_len' => 255,
- 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Themes WHERE Enabled = 1 ORDER BY Name ASC', 'option_key_field' => 'ThemeId', 'option_title_field' => 'Name',
- 'not_null' => 1, 'default' => ''
- ),
- 'DomainIPRange' => Array ('type' => 'string', 'default' => NULL),
- 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- 'RedirectOnIPMatch' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_opt_CurrentDomain', 2 => 'la_opt_ExternalUrl'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
-
- 'Grids' => Array (
- 'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_item.png'),
- 'Fields' => Array (
- 'DomainId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'DomainName' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'SSLUrl' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
- 'Country' => Array ('filter_block' => 'grid_options_filter', 'width' => 250, ),
- 'PrimaryLanguageId' => Array ('title' => 'column:la_fld_Language', 'filter_block' => 'grid_options_filter', 'width' => 250, ),
- 'PrimaryThemeId' => Array ('title' => 'column:la_fld_Theme', 'filter_block' => 'grid_options_filter', 'width' => 250, ),
- 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ),
- ),
+$config = Array (
+ 'Prefix' => 'site-domain',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'SiteDomainEventHandler', 'file' => 'site_domain_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+
+ 'IDField' => 'DomainId',
+
+ 'TableName' => TABLE_PREFIX . 'SiteDomains',
+
+ 'TitleField' => 'DomainName',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('site-domain' => '!la_title_AddingSiteDomain!'),
+ 'edit_status_labels' => Array ('site-domain' => '!la_title_EditingSiteDomain!'),
+ ),
+
+ 'site_domain_list' => Array (
+ 'prefixes' => Array ('site-domain_List'), 'format' => "!la_title_SiteDomains!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'site_domain_edit' => Array (
+ 'prefixes' => Array ('site-domain'), 'format' => "#site-domain_status# '#site-domain_titlefield#' - !la_title_General!",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'site_domains/site_domain_edit', 'priority' => 1),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:site_domains'),
+
+ 'Sections' => Array (
+ 'in-portal:site_domains' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'site_domain',
+ 'label' => 'la_title_SiteDomains',
+ 'url' => Array ('t' => 'site_domains/site_domain_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'priority' => 7,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Priority' => 'desc', 'DomainName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'DomainId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'DomainName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'DomainNameUsesRegExp' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'SSLUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'SSLUrlUsesRegExp' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'AdminEmail' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'DefaultEmailRecipients' => Array ('type' => 'string', 'default' => NULL),
+ 'Country' => Array (
+ 'type' => 'string', 'max_len' => 3,
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'PrimaryLanguageId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 ORDER BY PackName ASC', 'option_key_field' => 'LanguageId', 'option_title_field' => 'PackName',
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'Languages' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 ORDER BY PackName ASC', 'option_key_field' => 'LanguageId', 'option_title_field' => 'PackName',
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'PrimaryThemeId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Themes WHERE Enabled = 1 ORDER BY Name ASC', 'option_key_field' => 'ThemeId', 'option_title_field' => 'Name',
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'Themes' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Themes WHERE Enabled = 1 ORDER BY Name ASC', 'option_key_field' => 'ThemeId', 'option_title_field' => 'Name',
+ 'not_null' => 1, 'default' => ''
+ ),
+ 'DomainIPRange' => Array ('type' => 'string', 'default' => NULL),
+ 'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'RedirectOnIPMatch' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_opt_CurrentDomain', 2 => 'la_opt_ExternalUrl'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'DomainId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'DomainName' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'SSLUrl' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'Country' => Array ('filter_block' => 'grid_options_filter', 'width' => 250, ),
+ 'PrimaryLanguageId' => Array ('title' => 'column:la_fld_Language', 'filter_block' => 'grid_options_filter', 'width' => 250, ),
+ 'PrimaryThemeId' => Array ('title' => 'column:la_fld_Theme', 'filter_block' => 'grid_options_filter', 'width' => 250, ),
+ 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ),
),
),
- );
+ ),
+);
\ No newline at end of file
Index: branches/5.3.x/core/units/spam_reports/spam_reports_config.php
===================================================================
--- branches/5.3.x/core/units/spam_reports/spam_reports_config.php (revision 15658)
+++ branches/5.3.x/core/units/spam_reports/spam_reports_config.php (revision 15659)
@@ -1,112 +1,112 @@
<?php
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'spam-report',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'SpamReportEventHandler', 'file' => 'spam_report_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'SpamReportTagProcessor', 'file' => 'spam_report_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'ReportId',
'TableName' => TABLE_PREFIX . 'SpamReports',
'TitleField' => 'MessageText',
'TitlePresets' => Array (
'default' => Array (
'edit_status_labels' => Array ('spam-report' => '!la_title_EditingSpamReport!'),
),
'spam_report_list' => Array (
'prefixes' => Array ('spam-report_List'), 'format' => "!la_title_SpamReports!",
'toolbar_buttons' => Array ('edit', 'delete', 'view'),
),
'spam_report_edit' => Array (
'prefixes' => Array ('spam-report'), 'format' => "#spam-report_status# '#spam-report_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'delete'),
),
),
- 'PermSection' => Array('main' => 'in-portal:spam_reports'),
+ 'PermSection' => Array ('main' => 'in-portal:spam_reports'),
'Sections' => Array (
'in-portal:spam_reports' => Array (
- 'parent' => 'in-portal:reports',
- 'icon' => 'spam_reports',
- 'label' => 'la_title_SpamReports',
- 'url' => Array('t' => 'spam_reports/spam_report_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'edit', 'delete'),
- 'priority' => 8,
- 'type' => stTREE,
+ 'parent' => 'in-portal:reports',
+ 'icon' => 'spam_reports',
+ 'label' => 'la_title_SpamReports',
+ 'url' => Array ('t' => 'spam_reports/spam_report_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit', 'delete'),
+ 'priority' => 8,
+ 'type' => stTREE,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Users reported_by ON reported_by.PortalUserId = %1$s.ReportedById
LEFT JOIN ' . TABLE_PREFIX . 'CatalogReviews review ON review.ReviewId = %1$s.ItemId AND %1$s.ItemPrefix LIKE "%rev"',
),
'CalculatedFields' => Array (
'' => Array (
'ItemName' => 'IF(%1$s.ItemPrefix LIKE "%rev", review.ReviewText, "")',
'ReportedBy' => 'reported_by.Username',
),
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('ReportId' => 'desc'),
)
),
'Fields' => Array (
'ReportId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ItemPrefix' => Array (
'type' => 'string', 'max_len' => 255,
'formatter' => 'kOptionsFormatter', 'options' => Array ('p-rev' => 'la_opt_ProductReview'), 'use_phrases' => 1,
'not_null' => 1, 'default' => ''
),
'ItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'MessageText' => Array ('type' => 'string', 'required' => 1, 'default' => NULL),
'ReportedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'ReportedById' => Array (
'type' => 'int',
'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'sample_value' => 'Guest',
'default' => NULL
)
),
'VirtualFields' => Array (
'ItemName' => Array ('type' => 'string', 'default' => ''),
'ReportedBy' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Fields' => Array (
'ReportId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter'),
'ItemPrefix' => Array ('data_block' => 'grid_item_prefix_td', 'filter_block' => 'grid_options_filter', 'width' => 150),
'ItemId' => Array ('filter_block' => 'grid_range_filter'),
'ItemName' => Array ('data_block' => 'grid_edit_item_td', 'filter_block' => 'grid_like_filter'),
'MessageText' => Array ('filter_block' => 'grid_like_filter'),
'ReportedOn' => Array ('filter_block' => 'grid_date_range_filter'),
'ReportedBy' => Array ('filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file

Event Timeline