Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Fri, Feb 7, 2:34 AM

in-portal

Index: branches/5.0.x/core/units/categories/categories_config.php
===================================================================
--- branches/5.0.x/core/units/categories/categories_config.php (revision 13269)
+++ branches/5.0.x/core/units/categories/categories_config.php (revision 13270)
@@ -1,470 +1,482 @@
<?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',
),
),
'AutoLoad' => true,
'CatalogItem' => true,
'AdminTemplatePath' => 'categories',
'AdminTemplatePrefix' => 'categories_',
'SearchConfigPostfix' => 'category',
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => '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.'Category',
'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', 'g_List'), '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'),
),
'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'),
),
'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'),
),
'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',*/ 'email' => 'in-portal:configuration_email', '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', '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_email' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Category', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 11.3,
'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.4,
'type' => stTREE,
),
),
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
'show_active' => Array ('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1'),
'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2'),
'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'),
's1' => 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.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PermCache ON '.TABLE_PREFIX.'PermCache.CategoryId = %1$s.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryCustomData cust ON %1$s.ResourceId = cust.ResourceId'
),
'SubItems' => Array ('c-rel', 'c-search','c-img', 'c-cdata', 'c-perm', 'content'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Priority' => 'desc', 'Name' => 'asc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'CreatedBySystem' => 'IF(ThemeId != 0, 1, 0)',
)
),
'CacheModRewrite' => true,
'Fields' => Array (
'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
'Type' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
'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', 'not_null' => 1, 'default' => 1),
+ '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', 'not_null' => 1, 'default' => 0),
+ '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', '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 (-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
'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),
'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 (-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
// 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 . 'Theme 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
+ '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
+ '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),
'IsSystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_System', 0 => 'la_text_User'), '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' => 0
),
'FormSubmittedTemplate' => Array ('type' => 'string', 'default' => null),
'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array (
'CurrentSort' => Array('type' => 'string', 'default' => ''),
'IsNew' => Array('type' => 'int', 'default' => 0),
'OldPriority' => Array('type' => 'int', 'default' => 0),
// for primary image
'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' => ''),
'CreatedBySystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_System', 0 => 'la_text_User'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
),
'Grids' => Array(
'Default' => Array (
'Icons' => Array( // 'StatusField' => Array ('IsSystem', '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'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array( 'title'=>'la_col_Priority', 'filter_block' => 'grid_options_filter', 'width' => 65),
'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'IsMenu' => Array( 'title'=>'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'CreatedBySystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Radio' => Array (
'Selector' => 'radio',
'Icons' => Array( // 'StatusField' => Array ('IsSystem', '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'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array( 'title'=>'la_col_Priority', 'filter_block' => 'grid_options_filter', 'width' => 75),
'IsMenu' => Array( 'title'=>'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'CreatedBySystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Structure' => Array (
'Icons' => Array( // 'StatusField' => Array ('IsSystem', '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'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array( 'title'=>'la_col_Priority', 'filter_block' => 'grid_options_filter', 'width' => 75),
'IsMenu' => Array( 'title'=>'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Path' => Array( 'title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter'),
'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'CreatedBySystem' => Array( 'title'=>'la_col_System', '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.0.x/core/units/themes/themes_config.php
===================================================================
--- branches/5.0.x/core/units/themes/themes_config.php (revision 13269)
+++ branches/5.0.x/core/units/themes/themes_config.php (revision 13270)
@@ -1,170 +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' => '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 => 'event',
4 => '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', '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'),
),
'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.'Theme',
'SubItems' => Array('theme-file'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
)
),
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array ('' => ' SELECT %1$s.* %2$s
FROM %s
LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'),
'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %s
LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'StyleName' => 'st.Name',
'LastCompiled' => 'st.LastCompiled',
),
),
'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(1=>'la_Active', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => 1, 'default' => 1),
+ '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 (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ '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,
+ '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:{}'),
),
'VirtualFields' => Array (
'StyleName' => Array ('type' => 'string', 'default' => ''),
'LastCompiled' => Array ('type' => 'int', '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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'Enabled' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
// 'PrimaryTheme' => Array( 'title'=>'la_col_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.0.x/core/units/related_searches/related_searches_config.php
===================================================================
--- branches/5.0.x/core/units/related_searches/related_searches_config.php (revision 13269)
+++ branches/5.0.x/core/units/related_searches/related_searches_config.php (revision 13270)
@@ -1,102 +1,107 @@
<?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',
'Clones' => Array(
'c-search' => Array('ParentPrefix' => 'c'),
/*'l-rel' => Array('ParentPrefix' => 'l'),
'n-rel' => Array('ParentPrefix' => 'n'),
'bb-rel'=> Array('ParentPrefix' => 'bb'),
'p-rel' => Array('ParentPrefix' => 'p'),
'cms-rel'=> Array('ParentPrefix' => 'cms'),*/
),
'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 => 'event',
),
'IDField' => 'RelatedSearchId',
'StatusField' => Array('Enabled'),
'TableName' => TABLE_PREFIX.'RelatedSearches',
'ParentTableKey' => 'ResourceId',
'ForeignKey' => 'ResourceId',
'ParentPrefix' => 'c',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
)
),
'CalculatedFields' => Array(
'' => Array(
),
),
'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'),'not_null'=>1,'default'=>1,'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(
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png'
),
'Fields' => Array(
'RelatedSearchId' => Array( 'title'=>'la_col_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'=>'la_col_Status', 'filter_block' => 'grid_options_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/custom_fields/custom_fields_config.php
===================================================================
--- branches/5.0.x/core/units/custom_fields/custom_fields_config.php (revision 13269)
+++ branches/5.0.x/core/units/custom_fields/custom_fields_config.php (revision 13270)
@@ -1,167 +1,188 @@
<?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 => 'event',
4 => 'type',
5 => '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.'CustomField',
'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(
+ '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 (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ '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('' => 'la_EmptyValue', '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', '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 (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, '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' => 'int', 'not_null' => 1, 'default' => ''),
'OptionTitle' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'Options' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
),
'Grids' => Array(
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
),
'Fields' => Array (
'CustomFieldId' => Array ( 'title'=>'la_col_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' => 'la_col_IsSystem', 'filter_block' => 'grid_options_filter'),
),
),
'SeparateTab' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
),
'Selector' => '',
'Fields' => Array (
'FieldName' => Array ( 'title'=>'la_col_FieldName', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'Prompt' => Array ( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType', 'filter_block' => 'grid_empty_filter', 'width' => 200, ),
'Value' => Array ( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td', 'filter_block' => 'grid_empty_filter', 'width' => 200, ),
'Error' => Array ( 'title'=>'la_col_Error', 'data_block' => 'custom_error_td', 'filter_block' => 'grid_empty_filter', 'width' => 100, ),
),
),
'SeparateTabOriginal' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
),
'Selector' => '',
'Fields' => Array (
'FieldName' => Array ( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td', 'filter_block' => 'grid_like_filter'),
'Prompt' => Array ( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType', 'filter_block' => 'grid_empty_filter'),
'Value' => Array ( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td', 'filter_block' => 'grid_empty_filter'),
'OriginalValue' => Array ( 'title'=>'la_col_OriginalValue', 'data_block' => 'grid_original_td', 'filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/files/files_config.php
===================================================================
--- branches/5.0.x/core/units/files/files_config.php (revision 13269)
+++ branches/5.0.x/core/units/files/files_config.php (revision 13270)
@@ -1,96 +1,106 @@
<?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 => 'event',
),
'IDField' => 'FileId',
'StatusField' => Array('Status'),
'TitleField' => 'FileName',
'TableName' => TABLE_PREFIX.'ItemFiles',
'ParentTableKey' => 'ResourceId',
'ForeignKey' => 'ResourceId',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
'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', 'plain/text', 'application/x-gzip'),
+ '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', 'plain/text', '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),
+ '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', 'not_null' => 1, 'default' => -1),
'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' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
'FileName' => Array ('title' => 'la_col_FileName', 'filter_block' => 'grid_like_filter'),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/images/images_config.php
===================================================================
--- branches/5.0.x/core/units/images/images_config.php (revision 13269)
+++ branches/5.0.x/core/units/images/images_config.php (revision 13270)
@@ -1,186 +1,199 @@
<?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 (
'u-img' => Array('ParentPrefix' => 'u'),
'l-img' => Array('ParentPrefix' => 'l'),
'n-img' => Array('ParentPrefix' => 'n'),
'bb-img'=> Array('ParentPrefix' => 'bb'),
'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
/*'p-img' => Array('ParentPrefix' => 'p'),*/
'c-img' => Array('ParentPrefix' => 'c'),
),
'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 => 'event',
),
'RegularEvents' => Array (
'clean_catalog_images' => Array ('EventName' => 'OnCleanImages', 'RunInterval' => 604800, 'Type' => reAFTER, 'Status' => STATUS_DISABLED),
'clean_resized_catalog_images' => Array ('EventName' => 'OnCleanResizedImages', 'RunInterval' => 2592000, 'Type' => reAFTER, '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.'Images',
'ParentTableKey'=> 'ResourceId', // linked field in master table
'ForeignKey' => 'ResourceId', // linked field in subtable
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
)
),
'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', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null'=>1),
- 'DefaultImg' => Array('type'=>'int', 'default' => 0, 'not_null'=>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' => 255, 'default' => null,
- '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', 'default' => 1, 'not_null'=>1),
- ),
- 'VirtualFields' => Array(
- 'Preview' => Array(),
- 'ImageUrl' => Array(),
- ),
+ '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' => 0, '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' => '',
+ '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!',
+ ),
+ ),
+ '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(),
+ 'ImageUrl' => 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(
'ImageId' => Array( 'title'=>'la_col_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.0.x/core/units/reviews/reviews_config.php
===================================================================
--- branches/5.0.x/core/units/reviews/reviews_config.php (revision 13269)
+++ branches/5.0.x/core/units/reviews/reviews_config.php (revision 13270)
@@ -1,222 +1,271 @@
<?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' => 'rev',
'Clones' => Array (
- 'l-rev' => Array(
+ 'l-rev' => Array (
'ParentPrefix' => 'l',
'ConfigMapping' => Array (
'PerPage' => 'Perpage_LinkReviews',
'ShortListPerPage' => 'Perpage_LinkReviews_Short',
'DefaultSorting1Field' => 'Link_ReviewsSort',
'DefaultSorting2Field' => 'Link_ReviewsSort2',
'DefaultSorting1Dir' => 'Link_ReviewsOrder',
'DefaultSorting2Dir' => 'Link_ReviewsOrder2',
'ReviewDelayInterval' => 'link_ReviewDelay_Interval',
'ReviewDelayValue' => 'link_ReviewDelay_Value',
),
),
'n-rev' => Array (
'ParentPrefix' => 'n',
'ConfigMapping' => Array (
'PerPage' => 'Perpage_NewsReviews',
'ShortListPerPage' => 'Perpage_NewsReviews_Short',
'DefaultSorting1Field' => 'News_SortReviews',
'DefaultSorting2Field' => 'News_SortReviews2',
'DefaultSorting1Dir' => 'News_SortReviewsOrder',
'DefaultSorting2Dir' => 'News_SortReviewsOrder2',
'ReviewDelayInterval' => 'News_ReviewDelay_Interval',
'ReviewDelayValue' => 'News_ReviewDelay_Value',
),
),
'bb-rev' => Array (
'ParentPrefix' => 'bb',
'ConfigMapping' => Array (
'PerPage' => 'Perpage_TopicReviews',
'ReviewDelayInterval' => 'topic_ReviewDelay_Interval',
'ReviewDelayValue' => 'topic_ReviewDelay_Value',
),
),
'p-rev' => Array (
'ParentPrefix' => 'p',
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Reviews',
'ReviewDelayInterval' => 'product_ReviewDelay_Value',
'ReviewDelayValue' => 'product_ReviewDelay_Interval',
),
),
),
- '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'),
+ '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 => 'event',
4 => 'mode',
),
'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',
),
'IDField' => 'ReviewId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'TableName' => TABLE_PREFIX.'ItemReview',
'ParentTableKey' => 'ResourceId', // linked field in master table
'ForeignKey' => 'ItemId', // linked field in subtable
'AutoDelete' => true,
'AutoClone' => true,
'TitlePresets' => Array (
- 'reviews_edit' => Array('format' => "!la_title_Editing_Review!"),
+ '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'),
),
),
'FilterMenu' => Array (
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 'Filters' => Array (
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
'CalculatedFields' => Array (
'' => Array (
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
),
'products' => Array (
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
'product' => Array (
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
),
// key - special, value - list select sql
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'PortalUser 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.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
+ LEFT JOIN ' . TABLE_PREFIX . 'PortalUser 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.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
+ FROM %1$s
+ LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
+ LEFT JOIN ' . TABLE_PREFIX . 'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
),
'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
'ListSortings' => Array (
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('CreatedOn' => 'desc'),
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('CreatedOn' => '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', 'required' => 1, 'using_fck' => 1, 'default' => NULL),
- '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, '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', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'), 'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId', 'left_title_field'=>'Login', 'required'=>1, 'not_null'=>1, 'default'=>-1),
- '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(1=>'la_Active', 2=>'la_Pending', 0=>'la_Disabled'), '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'=>''),
+ '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, '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 (-1 => 'root', -2 => 'Guest'),
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE `%s` = \'%s\' ',
+ 'left_key_field' => 'PortalUserId',
+ 'left_title_field' => 'Login',
+ 'required' => 1, 'not_null' => 1, 'default' => -1,
+ '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' => ''),
),
'VirtualFields' => Array (
- 'ReviewedBy' => Array('type' => 'string', 'default' => ''),
+ 'ReviewedBy' => Array ('type' => 'string', 'default' => ''),
'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
'CatalogItemCategory' => 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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'ReviewText' => Array( 'title'=>'la_col_ReviewText', '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( 'title'=>'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Rating' => Array( 'title'=>'la_col_Rating', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'ReviewText' => Array ( 'title' => 'la_col_ReviewText', '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 ( 'title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Rating' => Array ( 'title' => 'la_col_Rating', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
),
),
'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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'ReviewText' => Array( 'title'=>'la_col_ReviewText', '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( 'title'=>'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Rating' => Array( 'title'=>'la_col_Rating', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'ReviewText' => Array ( 'title' => 'la_col_ReviewText', '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 ( 'title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Rating' => Array ( 'title' => 'la_col_Rating', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/config_search/config_search_config.php
===================================================================
--- branches/5.0.x/core/units/config_search/config_search_config.php (revision 13269)
+++ branches/5.0.x/core/units/config_search/config_search_config.php (revision 13270)
@@ -1,127 +1,154 @@
<?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',
- ),
- ),
- ),
- ),
-
- '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 => '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'),
-
- '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', 'not_null' => 1, 'default' => 1),
- 'AdvancedSearch' => Array('type' => 'int', 'not_null' => 1, 'default' => 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'),
- )
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default' => 'icon16_item.png'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
- 'Fields' => Array(
- 'TableName' => Array( 'title'=>'la_col_TableName', 'data_block' => 'grid_data_td'),
- 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_data_td' ),
- 'SimpleSearch' => Array( 'title'=>'la_col_SimpleSearch', 'data_block' => 'grid_data_td'),
- ),
- ),
- ),
+ '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 => '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'),
+
+ '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'),
+ ),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+ 'Fields' => Array (
+ 'TableName' => Array ('title' => 'la_col_TableName', 'data_block' => 'grid_data_td'),
+ 'FieldName' => Array ('title' => 'la_col_FieldName', 'data_block' => 'grid_data_td' ),
+ 'SimpleSearch' => Array ('title' => 'la_col_SimpleSearch', 'data_block' => 'grid_data_td'),
+ ),
+ ),
+ ),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/relationship/relationship_config.php
===================================================================
--- branches/5.0.x/core/units/relationship/relationship_config.php (revision 13269)
+++ branches/5.0.x/core/units/relationship/relationship_config.php (revision 13270)
@@ -1,126 +1,131 @@
<?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',
'Clones' => Array(
'c-rel' => Array('ParentPrefix' => 'c'),
'l-rel' => Array('ParentPrefix' => 'l'),
'n-rel' => Array('ParentPrefix' => 'n'),
'bb-rel'=> Array('ParentPrefix' => 'bb'),
/*'p-rel' => Array('ParentPrefix' => 'p'),*/
/*'cms-rel'=> Array('ParentPrefix' => 'cms'),*/
),
'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 => 'event',
),
'IDField' => 'RelationshipId',
'StatusField' => Array('Enabled','Type'),
'TableName' => TABLE_PREFIX.'Relationship',
'ParentTableKey'=> 'ResourceId',
'ForeignKey' => 'SourceId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_recip','show_oneway'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
's1' => Array(),
'show_recip' => Array('label' => 'la_Reciprocal', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
'show_oneway' => Array('label' => 'la_OneWay', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
)
),
'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'), 'not_null' => 1, 'default'=>1, '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(),
'ItemType' => Array(),
),
'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' => 'la_col_Id', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'ItemName' => Array( 'title'=>'la_col_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'=>'la_col_RelationshipType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
'Enabled' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/phrases/phrases_config.php
===================================================================
--- branches/5.0.x/core/units/phrases/phrases_config.php (revision 13269)
+++ branches/5.0.x/core/units/phrases/phrases_config.php (revision 13270)
@@ -1,214 +1,230 @@
<?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',
'Clones' => Array (
'phrases-single' => Array (
'ForeignKey' => false,
'ParentTableKey' => false,
'ParentPrefix' => false,
'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'),
// 'perm_prefix' => 'lang',
'priority' => 4,
// 'show_mode' => smSUPER_ADMIN,
'type' => stTREE,
),
),
)
),
'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 => 'event',
4 => 'label',
5 => 'mode', // labels can be edited directly
),
'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.st_List'), 'format' => "!la_title_Phrases!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
),
'phrase_edit_single' => Array (
'prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_front', 'show_admin', 'show_both'), 'type' => WHERE_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
'show_front' => Array ('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0'),
'show_admin' => Array ('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1'),
'show_both' => Array ('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2'),
's1' => Array (),
'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation = pri.Translation'),
'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation != pri.Translation'),
)
),
'TableName' => TABLE_PREFIX . 'Phrase',
'CalculatedFields' => Array (
'' => Array (
'PrimaryTranslation' => 'pri.Translation',
),
'st' => Array (
'PackName' => 'lang.PackName',
),
),
'ListSQLs' => Array(
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Phrase pri ON (%1$s.Phrase = pri.Phrase) AND (pri.LanguageId = 1)',
'st' => 'SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Language lang ON (%1$s.LanguageId = lang.LanguageId)',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Phrase' => 'asc'),
)
),
'ForeignKey' => 'LanguageId',
'ParentTableKey' => 'LanguageId',
'ParentPrefix' => 'lang',
'AutoDelete' => true,
'AutoClone' => true,
'Fields' => Array (
'Phrase' => Array (
'type' => 'string',
'required' => 1, 'unique' => Array ('LanguageId'),
- 'not_null' => 1, 'default' => ''
+ 'not_null' => 1, 'default' => '',
),
'PhraseKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'Translation' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'required' => 1, 'using_fck' => 1, 'default' => NULL),
'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' => 0
+ 'not_null' => 1, 'required' => 1, 'default' => 0,
),
'PhraseId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LanguageId' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY LocalName', 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName',
- 'not_null' => 1, 'default' => 0
+ 'not_null' => 1, 'default' => 0,
),
'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'LastChangeIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'Module' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options' => Array ('' => ''), '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, 'default' => 'Core'
+ 'not_null' => 1, 'default' => 'Core',
),
),
'VirtualFields' => Array (
'PrimaryTranslation' => Array ('type' => 'string', 'default' => ''),
'LangFile' => Array (
'type' => 'string',
'formatter' => 'kUploadFormatter',
'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => WRITEBALE_BASE . '/',
'max_len' => 255, 'default' => ''
),
- 'ImportOverwrite' => Array ('type' => 'int', 'default' => 0),
- 'DoNotEncode' => Array (),
+ 'ImportOverwrite' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array(
+ 0 => 'la_No',
+ 1 => 'la_Yes',
+ ),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ 'DoNotEncode' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array(
+ 0 => 'la_No',
+ 1 => 'la_Yes',
+ ),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
'PackName' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'PackName',
),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
),
'Fields' => Array (
'PhraseId' => Array ('title' => 'la_col_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),
'Translation' => Array ('title' => 'la_col_Phrase', 'width' => 200),
'PrimaryTranslation' => Array ('title' => 'la_col_PrimaryValue', 'width' => 200),
'PhraseType' => Array ('title' => 'la_col_PhraseType', 'filter_block' => 'grid_options_filter', 'width' => 60),
'LastChanged' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150),
'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Phrases' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
),
'Fields' => Array (
'PhraseId' => Array ('title' => 'la_col_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),
'Translation' => Array ('title' => 'la_col_Phrase', 'filter_block' => 'grid_like_filter', 'width' => 180),
'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 95),
'PhraseType' => Array ('title' => 'la_col_Location', 'filter_block' => 'grid_options_filter', 'width' => 80),
'LastChanged' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter', 'width' => 100),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/units/languages/languages_config.php
===================================================================
--- branches/5.0.x/core/units/languages/languages_config.php (revision 13269)
+++ branches/5.0.x/core/units/languages/languages_config.php (revision 13270)
@@ -1,276 +1,279 @@
<?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'),
+ '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'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnReflectMultiLingualFields',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lang',
'HookToSpecial' => '',
'HookToEvent' => Array('OnPreSave'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCopyLabels',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lang',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnSave'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUpdatePrimary',
),
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 => 'event',
4 => '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
'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('lang'=>'!la_title_Adding_Language!'),
- 'edit_status_labels' => Array('lang'=>'!la_title_Editing_Language!'),
- 'new_titlefield' => Array('lang'=>''),
+ 'default' => Array( 'new_status_labels' => Array('lang' => '!la_title_Adding_Language!'),
+ 'edit_status_labels' => Array('lang' => '!la_title_Editing_Language!'),
+ 'new_titlefield' => Array('lang' => ''),
),
'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!"),
+ '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!'),
+ 'new_status_labels' => Array('phrases' => '!la_title_Adding_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!"),
- 'events_list' => Array( 'prefixes' => Array('lang','emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!"),
+ 'events_list' => Array( 'prefixes' => Array('lang', 'emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!"),
'event_edit' => Array( 'prefixes' => Array('emailevents'),
'edit_status_labels' => Array('emailevents' => '!la_title_Editing_EmailEvent!'),
'format' => '#emailevents_status# - #emailevents_titlefield#'),
- 'email_messages_edit' => Array( 'prefixes' => Array('lang','emailmessages'),
+ 'email_messages_edit' => Array( 'prefixes' => Array('lang', 'emailmessages'),
'new_titlefield' => Array('emailmessages' => ''),
'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailmessages_titlefield#'"),
// 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,
),*/
),
'TableName' => TABLE_PREFIX.'Language',
- 'SubItems' => Array('phrases','emailmessages'),
+ 'SubItems' => Array('phrases', 'emailmessages'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
)
),
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => 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.'Language ORDER BY PackName',
'option_title_field' => 'PackName',
'option_key_field' => 'PackName',
- 'not_null' => 1, 'required' => 1, 'default' => ''
+ 'not_null' => 1, 'required' => 1, 'default' => '',
),
-
-
'LocalName' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language ORDER BY PackName',
'option_title_field' => 'LocalName',
'option_key_field' => 'LocalName',
- 'not_null' => 1, 'required' => 1, 'default' => ''
+ '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,
),
-
- 'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_Active'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
'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),
- 'DateFormat' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'TimeFormat' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- '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','default' => 'm/d/Y', 'required' => 1),
- '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','default' => 'g:i:s A', 'required' => 1),
- 'DecimalPoint' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''),
- 'ThousandSep' => Array('type' => 'string','not_null' => 1, 'default' => ''),
- 'Charset' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'UnitSystem' => Array('type' => 'int','not_null' => 1, 'default' => 1, 'formatter' => 'kOptionsFormatter','options' => Array(1 => 'la_Metric', 2 => 'la_US_UK'),'use_phrases' => 1),
+ 'DateFormat' => Array('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'TimeFormat' => Array('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1),
+ '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', 'default' => 'm/d/Y', 'required' => 1),
+ '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', 'default' => 'g:i:s A', 'required' => 1),
+ 'DecimalPoint' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'ThousandSep' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Charset' => Array('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'UnitSystem' => Array('type' => 'int', 'not_null' => 1, 'default' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1),
'FilenameReplacements' => Array ('type' => 'string', 'default' => NULL),
- 'Locale' => Array('type' => 'string','not_null' => 1, 'default' => 'en-US', 'formatter' => 'kOptionsFormatter',
+ 'Locale' => Array('type' => 'string', 'not_null' => 1, 'default' => 'en-US', 'formatter' => 'kOptionsFormatter',
'options' => Array('' => ''),
- 'options_sql' => "SELECT CONCAT(LocaleName, ' ' ,'\/',Locale,'\/') AS name, Locale FROM ".TABLE_PREFIX."LocalesList ORDER BY LocaleId", 'option_title_field' => "name", 'option_key_field' => 'Locale',
+ 'options_sql' => "SELECT CONCAT(LocaleName, ' ' , '\/',Locale, '\/') AS name, Locale FROM ".TABLE_PREFIX."LocalesList ORDER BY LocaleId", 'option_title_field' => "name", 'option_key_field' => 'Locale',
),
'UserDocsUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
),
'VirtualFields' => Array(
'CopyLabels' => Array('type' => 'int', 'default' => 0),
'CopyFromLanguage' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId'),
),
'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(
'LanguageId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'PackName' => Array ('title' => 'la_col_PackName', 'filter_block' => 'grid_options_filter', 'width' => 150, ),//
'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
'AdminInterfaceLang' => Array ('title' => 'la_col_AdminInterfaceLang', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
'Charset' => Array ('title' => 'la_col_Charset', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Priority' => Array ('title' => 'la_col_Priority', 'filter_block' => 'grid_like_filter', 'width' => 60, ),
'Enabled' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 60, ),
-
-
),
),
/*'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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 120),
'LocalName' => Array ('title' => 'la_col_Prefix', 'filter_block' => 'grid_options_filter', 'width' => 120),
'IconURL' => Array ('title' => 'la_col_Image', 'filter_block' => 'grid_empty_filter', 'width' => 80),
),
),*/
),
);
\ No newline at end of file

Event Timeline