Index: branches/5.3.x/units/articles/articles_config.php
===================================================================
--- branches/5.3.x/units/articles/articles_config.php	(revision 15900)
+++ branches/5.3.x/units/articles/articles_config.php	(revision 15901)
@@ -1,579 +1,579 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-News
 * @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' => 'n',
 
 	'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
 	'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
 	'EventHandlerClass' => Array ('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'build_event' => 'OnBuild'),
 	'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'build_event' => 'OnBuild'),
 	'AutoLoad' => true,
 
 	'ConfigPriority' => 0,
 
 	'RewritePriority' => 102,
 	'RewriteListener' => 'CategoryItemRewrite:RewriteListener',
 
 	'Hooks' => Array (
 		Array (
 			'Mode' => hAFTER,
 			'Conditional' => false,
 			'HookToPrefix' => 'c',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '',
 			'DoEvent' => 'OnUpdateCategoryCustomFields',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => '',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => 'cdata',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnDefineCustomFields',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => '#file',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => 'rev',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => 'fav',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => 'rel',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => 'img',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 
 		Array (
 			'Mode' => hBEFORE,
 			'Conditional' => false,
 			'HookToPrefix' => 'ci',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array ('OnAfterConfigRead'),
 			'DoPrefix' => '',
 			'DoSpecial' => '*',
 			'DoEvent' => 'OnCloneSubItem',
 		),
 	),
 
 	'CatalogItem' => true,
 	'AdminTemplatePath' => 'articles',
 	'AdminTemplatePrefix' => 'articles_',
 	'SearchConfigPostfix' => 'articles',
 
 	'QueryString' => Array (
 		1 => 'id',
 		2 => 'Page',
 		3 => 'PerPage',
 		4 => 'event',
 		5 => 'mode',
 	),
 
 	'ScheduledTasks' => Array (
 		'update_rss_articles' => Array ('EventName' => 'OnUpdateRSSArticles', 'RunSchedule' => '* * * * *'),
 	),
 
 	'IDField' => 'NewsId',
 	'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
 
 	'TitleField' => 'Title', // field, used in bluebar when editing existing item
 	'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list
 
 	'TitlePresets' => Array (
 		'default' => Array (
 			'new_status_labels' => Array ('n' => '!la_title_AddingArticle!'),
 			'edit_status_labels' => Array ('n' => '!la_title_EditingArticle!'),
 			'new_titlefield' => Array ('n' => '!la_title_NewArticle!'),
 		),
 
 		'articles_edit' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"),
 
 		'articles_categories' =>Array ('prefixes' => Array ('n', 'n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"),
 		'articles_relations' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"),
 		'articles_images' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"),
 		'articles_files' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Files!"),
 		'articles_reviews' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"),
 		'articles_custom' => Array ('prefixes' => Array ('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"),
 
 		'images_edit' => Array (
 			'prefixes' => Array ('n', 'n-img'),
 			'new_status_labels' => Array ('n-img' => '!la_title_Adding_Image!'),
 			'edit_status_labels' => Array ('n-img' => '!la_title_Editing_Image!'),
 			'new_titlefield' => Array ('n-img' => '!la_title_New_Image!'),
 			'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'",
 		),
 
 		'file_edit' => Array (
 			'prefixes' => Array ('n', 'n-file'),
 			'new_status_labels' => Array ('n-file' => "!la_title_AddingFile!"),
 			'edit_status_labels' => Array ('n-file' => '!la_title_EditingFile!'),
 			'new_titlefield' => Array ('n-file' => '!la_title_NewFile!'),
 			'format' => "#n_status# '#n_titlefield#' - #n-file_status# '#n-file_titlefield#'",
 		),
 
 		'reviews_edit' => Array (
 			'prefixes' => Array ('n', 'n-rev'),
 			'new_status_labels' => Array ('n-rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
 			'edit_status_labels' => Array ('n-rev' => '!la_title_Editing_Review!'),
 			'format' => "#n_status# '#n_titlefield#' - #n-rev_status#",
 		),
 
 		'relations_edit' => Array (
 			'prefixes' => Array ('n', 'n-rel'),
 			'new_status_labels' => Array ('n-rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
 			'edit_status_labels' => Array ('n-rel' => '!la_title_Editing_Relationship!'),
 			'format' => "#n_status# '#n_titlefield#' - #n-rel_status#",
 		),
 
 		'tree_in-news' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')),
 		'articles_export' => Array ('format' => '!la_title_ArticlesExport!'),
 		'articles_import' => Array ('format' => '!la_title_ImportArticles!'),
 	),
 
 	'EditTabPresets' => Array (
 		'Default' => Array (
 			Array ('title' => 'la_tab_General', 't' => 'in-news/articles/articles_edit', 'priority' => 1),
 			Array ('title' => 'la_tab_Categories', 't' => 'in-news/articles/articles_categories', 'priority' => 2),
 			Array ('title' => 'la_tab_Relations', 't' => 'in-news/articles/articles_relations', 'priority' => 3),
 			Array ('title' => 'la_tab_Images', 't' => 'in-news/articles/articles_images', 'priority' => 4),
 			Array ('title' => 'la_tab_Files', 't' => 'in-news/articles/articles_files', 'priority' => 5),
 			Array ('title' => 'la_tab_Reviews', 't' => 'in-news/articles/articles_reviews', 'priority' => 6),
 			Array ('title' => 'la_tab_Custom', 't' => 'in-news/articles/articles_custom', 'priority' => 7),
 		),
 	),
 
 	'PermItemPrefix' => 'NEWS',
 
 	'PermTabText' => 'In-News',
 	'PermSection' => Array ('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'custom' => 'in-news:configuration_custom'),
 
 	'Sections' => Array (
 		/*'in-news' => Array (
 			'parent' => 'in-portal:root',
 			'icon' => 'settings_in-newz',
 			'label' => 'la_title_In-News',
 			'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
 			'permissions' => Array ('view'),
 			'priority' => 3.2,
 			'container' => true,
 			'type' => stTREE,
 		),*/
 
 		'in-news:articles' => Array (
 			'parent' => 'in-portal:site',
 			'icon' => 'articles',
 			'label' => 'la_tab_Articles',
 			'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-n.showall', 'pass' => 'm'),
 			'onclick' => 'setCatalogTab(\'n.showall\')',
 			'permissions' => Array ('view'),
 			'priority' => 3.3,
 			'type' => stTREE,
 		),
 
 		// article settings
 		'in-news:setting_folder' => Array (
 			'parent' => 'in-portal:system',
 			'icon' => 'conf_news',
 			'label' => 'la_title_In-News',
 			'use_parent_header' => 1,
 			'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
 			'permissions' => Array ('view'),
 			'priority' => 3.4,
 			'container' => true,
 			'type' => stTREE,
 		),
 
 		/*'in-news:innews_general' => Array (
 			'parent' => 'in-news:setting_folder',
 			'icon' => 'core:settings_general',
 			'label' => 'la_tab_GeneralSettings',
 			'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
 			'permissions' => Array ('view', 'add', 'edit'),
 			'priority' => 0.9,
 			'type' => stTREE,
 		),*/
 
 		'in-news:configuration_output' => Array (
 			'parent' => 'in-news:setting_folder',
 			'icon' => 'core:conf_output',
 			'label' => 'la_tab_ConfigOutput',
 			'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
 			'permissions' => Array ('view', 'add', 'edit'),
 			'priority' => 1,
 			'type' => stTREE,
 		),
 
 		'in-news:configuration_search' => Array (
 			'parent' => 'in-news:setting_folder',
 			'icon' => 'core:conf_search',
 			'label' => 'la_tab_ConfigSearch',
 			'url' => Array ('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'),
 			'permissions' => Array ('view', 'edit'),
 			'priority' => 2,
 			'type' => stTREE,
 		),
 
 		'in-news:configuration_custom' => Array (
 			'parent' => 'in-news:setting_folder',
 			'icon' => 'core:conf_customfields',
 			'label' => 'la_tab_ConfigCustom',
 			'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'),
 			'permissions' => Array ('view', 'add', 'edit', 'delete'),
 			'priority' => 3,
 			'type' => stTREE,
 		),
 	),
 
 	'FilterMenu' => Array (
 		'Groups' => Array (
 			Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
 			Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER),
 			Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER),
 			Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER),
 		),
 		'Filters' => Array (
 			'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1'  ),
 			'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1'  ),
 			'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1'  ),
 			'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1'  ),
 		),
 	),
 
 	'CatalogSelectorName' => 'newslist',
 
 	'ItemPropertyMappings' => Array (
 		'NewDays' => 'News_CatNewDays', // number of days item to be NEW
 		'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP
 		'MinPopRating' => 'News_MinPopRating', // minimum rating for an item to be POP
 		'MaxHotNumber' => 'News_MaxHotNumber', // maximum number of HOT items
 
 		'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table
 		'ClickField' => 'Hits', // item click count is stored here (in item table)
 	),
 
 	'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa
 
 	'ViewMenuPhrase' => 'la_title_Articles',
 	'CatalogTabIcon' => 'in-news:icon16_articles.png',
 	'UsePendingEditing' => true, // item editing is controlled by NEWS.ADD/EDIT, NEWS.ADD/EDIT.PENDING permissions
 
 	'StatisticsInfo' => Array (
 		'pending' => Array (
 			'icon' => 'icon16_article_pending.gif',
 			'label' => 'la_Text_Articles',
 			'js_url' => '#url#',
 			'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
 			'status' => STATUS_PENDING,
 		),
 	),
 
 	'TableName' => TABLE_PREFIX.'News',
 	'CustomDataTableName' => TABLE_PREFIX . 'NewsCustomData',
 
 	'CalculatedFields' => Array (
 		'' => Array (
 			'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), IF(u.Username = "", u.Email, u.Username))',
 			'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
 			'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
 			'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath',
 			'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
 			'ParentPath' => TABLE_PREFIX.'Categories.ParentPath',
 
 			'AltName' => 'img.AltName',
 			'SameImages' => 'img.SameImages',
 			'LocalThumb' => 'img.LocalThumb',
 			'ThumbPath' => 'img.ThumbPath',
 			'ThumbUrl' => 'img.ThumbUrl',
 			'LocalImage' => 'img.LocalImage',
 			'LocalPath' => 'img.LocalPath',
 			'FullUrl' => 'img.Url',
 		),
 	),
 
 	'CacheModRewrite' => true,
 
 	'ListSQLs' => Array (
 		'' => '	SELECT %1$s.* %2$s
 				FROM %1$s
 				LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
 				LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
 				LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
-				LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
+				{PERM_JOIN}
 				LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.CreatedById = u.PortalUserId
 				LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
 	),
 
 	'ListSortings' => Array (
 		'' => Array (
 			'ForcedSorting' => Array ('EditorsPick' => 'desc', 'Priority' => 'desc'),
 			'Sorting' => Array ('Title' => 'asc'),
 		)
 	),
 
 	'ItemSQLs' => Array (
 		'' => '	SELECT %1$s.* %2$s
 				FROM %1$s
 				LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
 				LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
 				LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
 				LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.CreatedById = u.PortalUserId
 				LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'
 	),
 
 	'SubItems' => Array ('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata', 'n-fav', 'n-file'),
 
 	'Fields' => Array (
 		'NewsId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
 		'Title' => Array ('type' => 'string', /*'formatter' => 'kMultiLanguage', */'not_null' => 1, 'required' => 1, 'default' => '', 'max_len' => 255),
 		'AutomaticFilename' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
 			'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
 		),
 		'Excerpt' => Array ('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'default' => null),
 		'Author' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
 		'Body' => Array ('type' => 'string', 'formatter' => 'kFormatter',/*'kMultiLanguage'*/ 'using_fck' => 1, 'required' => 1, 'default' => null),
 		'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
 		'TextFormat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'EndOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
 		'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
 		'CachedRating' => Array ('type' => 'string', 'default' => 0),
 		'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'CreatedById' => Array (
 			'type' => 'int',
 			'formatter' => 'kLEFTFormatter',
 			'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
 			'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s',
 			'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD,
 			'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
 			'sample_value' => 'Guest', 'required' => 1, 'default' => NULL,
 		),
 		'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'Status' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 2,
 		),
 		'EditorsPick' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 0,
 		),
 		'LeadStory' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 0,
 		),
 		'LeadCatStory' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 0,
 		),
 		'ResourceId' => Array ('type' => 'int', 'default' => null),
 		'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'StartDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
 		'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),
 		'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),
 		'Archived' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
 		'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
 		'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'default' => NULL),
 		'OrgId' => Array ('type' => 'int', 'default' => null),
 		'MetaKeywords' => Array ('type' => 'string', 'default' => null),
 		'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
 	),
 
 	'VirtualFields' => Array (
 		'Relevance' => Array ('type' => 'float', 'default' => 0),
 		'MoreCategories' => Array ('type' => 'string', 'default' => ''),
 
 		'UserName' => Array ('type' => 'string', 'default' => ''),
 		'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
 
 		'cust_RssOriginalURL' => Array ('type' => 'string', 'default' => ''),
 		'cust_RssArticleCRC' => Array ('type' => 'int', 'default' => 0),
 		'Filename' => Array ('type' => 'string', 'default' => ''),
 		'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
 		'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
 		'IsHot' => Array ('type' => 'int', 'default' => 0),
 		'IsNew' => Array ('type' => 'int', 'default' => 0),
 		'IsPop' => Array ('type' => 'int', 'default' => 0),
 		'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
 		'ParentPath' => Array ('type' => 'string', 'default' => ''),
 
 		// for primary image
 		'AltName' => Array ('type' => 'string', 'default' => ''),
 		'SameImages' => Array ('type' => 'string', 'default' => ''),
 		'LocalThumb' => Array ('type' => 'string', 'default' => ''),
 		'ThumbPath' => Array ('type' => 'string', 'default' => ''),
 		'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
 		'LocalImage' => Array ('type' => 'string', 'default' => ''),
 		'LocalPath' => Array ('type' => 'string', 'default' => ''),
 		'FullUrl' => Array ('type' => 'string', 'default' => ''),
 
 		// export related fields: begin
 		'CategoryId' => Array ('type' => 'int', 'default' => 0),
 		'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
 		'ExportFilename' => Array ('type' => 'string', 'default' => ''),
 		'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
 		'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
 		'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
 		'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
 		'IncludeFieldTitles' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
 			'use_phrases' => 1, 'default' => 1,
 		),
 		'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
 		'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
 		'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
 		'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
 		'IsBaseCategory' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
 			'use_phrases' => 1, 'default' => 0,
 		),
 		// export related fields: end
 
 		// import related fields: begin
 		'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
 		'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
 		'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
 		'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
 		'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
 		'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
 		'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Title' => 'TITLE'), 'default' => '|Title|'),
 		'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
 		// import related fields: end
 	),
 
 	'Grids' => Array (
 		'Default' => Array (
 			'Icons' => Array (
 				0 => 'icon16_article_disabled.png',
 				1 => 'icon16_article.png',
 				2 => 'icon16_article_pending.png',
 				'NEW' => 'icon16_article_new.png',
 			),
 
 			'Fields' => Array (
 				'NewsId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
 				'Title' => Array ('data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
 				'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65),
 				'UserName' => Array ('title' => 'column:la_fld_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
 				'LeadStory' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
 				'LeadCatStory' => Array ('filter_block' => 'grid_options_filter', 'width' => 85, ),
 				'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ),
 				'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 				'StartDate' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 				'EndOn' => Array ('data_block' => 'article_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 			),
 		),
 
 		'Radio' => Array (
 			'Icons' => Array (
 				0 => 'icon16_article_disabled.png',
 				1 => 'icon16_article.png',
 				2 => 'icon16_article_pending.png',
 				-2 => 'icon16_article_pending.png', // pending DUPLICATE item
 				'NEW' => 'icon16_article_new.gif',
 			),
 
 			'Selector' => 'radio',
 			'Fields' => Array (
 				'NewsId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
 				'Title' => Array ('data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
 				'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65),
 				'UserName' => Array ('title' => 'column:la_fld_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
 				'LeadStory' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
 				'LeadCatStory' => Array ('filter_block' => 'grid_options_filter', 'width' => 85, ),
 				'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ),
 				'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 				'StartDate' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 				'EndOn' => Array ('data_block' => 'article_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
 			),
 		),
 	),
 
 	'ConfigMapping' => Array (
 		'PerPage' => 'Perpage_News',
 		'ShortListPerPage' => 'Perpage_News_Short',
 		'ForceEditorPick' => 'News_ShowPick',
 		'DefaultSorting1Field' => 'News_SortField',
 		'DefaultSorting2Field' => 'News_SortField2',
 		'DefaultSorting1Dir' => 'News_SortOrder',
 		'DefaultSorting2Dir' => 'News_SortOrder2',
 
 		'RatingDelayValue' => 'News_RatingDelay_Value',
 		'RatingDelayInterval' => 'News_RatingDelay_Interval',
 	),
 );
\ No newline at end of file
Index: branches/5.3.x/admin_templates/articles/articles_edit.tpl
===================================================================
--- branches/5.3.x/admin_templates/articles/articles_edit.tpl	(revision 15900)
+++ branches/5.3.x/admin_templates/articles/articles_edit.tpl	(revision 15901)
@@ -1,132 +1,132 @@
 <inp2:adm_SetPopupSize width="880" height="680"/>
 
 <inp2:m_include t="incs/header"/>
 <inp2:m_RenderElement name="combined_header" prefix="n" section="in-portal:browse" title_preset="articles_edit" tab_preset="Default"/>
 
 <!-- ToolBar -->
 <table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
 <tbody>
 	<tr>
   	<td>
   		<script type="text/javascript">
 				a_toolbar = new ToolBar();
 				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
 							submit_event('n','<inp2:n_SaveEvent/>');
 						}
 					) );
 				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
 							submit_event('n','OnCancelEdit');
 						}
 				 ) );
 
 				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
 
 				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
 							go_to_id('n', '<inp2:n_PrevId/>');
 						}
 				 ) );
 				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
 							go_to_id('n', '<inp2:n_NextId/>');
 						}
 				 ) );
 
 				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
 
 				a_toolbar.Render();
 
 				<inp2:m_if check="n_IsSingle" >
 					a_toolbar.HideButton('prev');
 					a_toolbar.HideButton('next');
 					a_toolbar.HideButton('sep1');
 					//a_toolbar.HideButton('sep2');
 				<inp2:m_else/>
 					<inp2:m_if check="n_IsLast" >
 						a_toolbar.DisableButton('next');
 					</inp2:m_if>
 					<inp2:m_if check="n_IsFirst" >
 						a_toolbar.DisableButton('prev');
 					</inp2:m_if>
 				</inp2:m_if>
 			</script>
 		</td>
 	</tr>
 </tbody>
 </table>
 
 
 <inp2:n_SaveWarning name="grid_save_warning"/>
 <inp2:n_ErrorWarning name="form_error_warning"/>
 
 <div id="scroll_container">
 	<table class="edit-form">
 		<inp2:m_RenderElement name="subsection" prefix="n" title="la_section_Article" original_title="la_section_OriginalValues" display_original="1"/>
 
 			<inp2:m_RenderElement name="inp_id_label" prefix="n" field="NewsId" title="la_fld_Id" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="Title" title="la_fld_Title" size="70" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_user" prefix="n" field="CreatedById" title="la_fld_Author" size="25" display_original="1"/>
 
 			<inp2:m_RenderElement name="inp_edit_codemirror" prefix="n" field="Body" title="la_fld_Body" control_options="{min_height: 100}" allow_html="1" language="text/html" display_original="1"/>
 
 			<!-- excerpt: begin -->
 			<inp2:m_RenderElement design="form_row" prefix="n" field="Excerpt" title="la_fld_Excerpt">
 				<td class="control-cell">
-					<textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:n_InputName field="Excerpt"/>" name="<inp2:n_InputName field="Excerpt"/>" style="width: 100%; height: 45px" cols="70" rows="3"><inp2:n_Field field="Excerpt"/></textarea><br />
+					<textarea tabindex="<inp2:m_get param='tab_index'/>" id="<inp2:$prefix_InputName field='$field'/>" name="<inp2:$prefix_InputName field='$field'/>" style="width: 100%; height: 45px" cols="70" rows="3"><inp2:$prefix_Field field="$field"/></textarea><br />
 					<input type="checkbox" name="generate_excerpt" id="generate_excerpt" value="1" /><label for="generate_excerpt"><inp2:m_phrase name="la_prompt_AutoGen_Excerpt"/></label>
 				</td>
 			</inp2:m_RenderElement>
 			<!-- excerpt: end -->
 
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n" field="AutomaticFilename" title="la_fld_AutomaticFilename" onchange="reflect_filename()" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="Filename" title="la_fld_Filename" size="70" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_options" prefix="n" field="CategoryId" title="la_fld_ParentSection" display_original="1"/>
 		<inp2:m_RenderElement name="subsection" prefix="n" title="la_section_Properties" original_title="la_section_OriginalValues" display_original="1"/>
 			<inp2:m_if check="n_DisplayOriginal" display_original="1">
 				<inp2:m_RenderElement design="form_row" prefix="n" field="Status" title="la_fld_Status">
 					<td class="control-cell">
 						<inp2:m_Phrase label="la_UseGridToApproveDecline" />
 					</td>
 				</inp2:m_RenderElement>
 			<inp2:m_else/>
 				<inp2:m_RenderElement name="inp_edit_radio" prefix="n" field="Status" title="la_fld_Status" display_original="1"/>
 			</inp2:m_if>
 
 			<inp2:m_RenderElement name="inp_edit_radio" prefix="n" field="NewItem" title="la_fld_New" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_radio" prefix="n" field="HotItem" title="la_fld_Hot" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_radio" prefix="n" field="PopItem" title="la_fld_Pop" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n" field="EditorsPick" title="la_fld_EditorsPick" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n" field="LeadStory" title="la_fld_LeadStory" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n" field="LeadCatStory" title="la_fld_LeadCatStory" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="Priority" title="la_fld_Priority" size="4" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_date_time" prefix="n" field="CreatedOn" title="la_fld_CreatedOn" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_date_time" prefix="n" field="StartDate" title="la_fld_StartDate" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_date_time" prefix="n" field="EndOn" title="la_fld_EndOn" display_original="1"/>
 
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="MetaKeywords" title="la_fld_MetaKeywords" size="70"/>
 			<inp2:m_RenderElement name="inp_edit_textarea" prefix="n" field="MetaDescription" title="la_fld_MetaDescription" control_options="{min_height: 100}" cols="70" rows="5"/>
 
 		<inp2:m_RenderElement name="subsection" prefix="n" title="la_section_Counters" original_title="la_section_OriginalValues" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="CachedRating" title="la_fld_Rating" hint_label="la_prompt_RatingLimits" size="4" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="CachedVotesQty" title="la_fld_Votes" hint_label="la_prompt_VoteLimits" size="4" display_original="1"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="n" field="Hits" title="la_fld_Hits" hint_label="la_prompt_HitLimits" size="4" display_original="1"/>
 			<input type="hidden" name="Hits_original" id="Hits_original" value="<inp2:n_Field name="Hits" db="db" />" />
 
 		<!-- custom fields: begin -->
 		<inp2:m_include t="incs/custom_blocks"/>
 		<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="n" value_field="Value" per_page="-1" grid="Default" original_title="la_section_OriginalValues" display_original="1"/>
 		<!-- custom fields: end -->
 
 		<inp2:m_RenderElement name="inp_edit_filler"/>
 	</table>
 </div>
 
 <script type="text/javascript">
 	$(document).ready(reflect_filename);
 	disable_categories('<inp2:n_InputName name="CategoryId"/>', <inp2:n_AllowedCategoriesJSON/>);
 
 	function reflect_filename() {
     	var $checked = document.getElementById('_cb_<inp2:n_InputName field="AutomaticFilename"/>').checked;
     	document.getElementById('<inp2:n_InputName field="Filename"/>').readOnly = $checked;
     }
 </script>
 
 <inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/install/upgrades.php
===================================================================
--- branches/5.3.x/install/upgrades.php	(revision 15900)
+++ branches/5.3.x/install/upgrades.php	(revision 15901)
@@ -1,118 +1,120 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-News
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	$upgrade_class = 'InNewsUpgrades';
 
 	/**
 	 * Class, that holds all upgrade scripts for "In-News" module
 	 *
 	 */
 	class InNewsUpgrades extends kUpgradeHelper {
 
 		public function __construct()
 		{
 			parent::__construct();
 
 			$this->dependencies = Array (
 				'4.3.9' => Array ('Core' => '4.3.9'),
 				'5.0.0' => Array ('Core' => '5.0.0'),
 				'5.0.1' => Array ('Core' => '5.0.1'),
 				'5.0.2-B1' => Array ('Core' => '5.0.2-B1'),
 				'5.0.2-B2' => Array ('Core' => '5.0.2-B2'),
 				'5.0.2-RC1' => Array ('Core' => '5.0.2-RC1'),
 				'5.0.2' => Array ('Core' => '5.0.2'),
 				'5.0.3-B1' => Array ('Core' => '5.0.3-B1'),
 				'5.0.3-B2' => Array ('Core' => '5.0.3-B2'),
 				'5.0.3-RC1' => Array ('Core' => '5.0.3-RC1'),
 				'5.0.3' => Array ('Core' => '5.0.3'),
 				'5.0.4-B1' => Array ('Core' => '5.0.4-B1'),
 				'5.0.4-B2' => Array ('Core' => '5.0.4-B2'),
 				'5.0.4' => Array ('Core' => '5.0.4'),
 				'5.1.0-B1' => Array ('Core' => '5.1.0-B1'),
 				'5.1.0-RC1' => Array ('Core' => '5.1.0-RC1'),
 				'5.1.0' => Array ('Core' => '5.1.0'),
 				'5.1.1-B1' => Array ('Core' => '5.1.1-B1'),
 				'5.1.1-RC1' => Array ('Core' => '5.1.1-RC1'),
 				'5.1.1' => Array ('Core' => '5.1.1'),
 				'5.1.2-B1' => Array ('Core' => '5.1.2-B1'),
 				'5.1.2-RC1' => Array ('Core' => '5.1.2-RC1'),
 				'5.1.2' => Array ('Core' => '5.1.2'),
 				'5.1.3-B1' => Array ('Core' => '5.1.3-B2'),
 				'5.1.3-RC1' => Array ('Core' => '5.1.3-RC1'),
 				'5.1.3-RC2' => Array ('Core' => '5.1.3-RC2'),
 				'5.1.3' => Array ('Core' => '5.1.3'),
 				'5.2.0-B1' => Array ('Core' => '5.2.0-B1'),
 				'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
 				'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
 				'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
 				'5.2.0' => Array ('Core' => '5.2.0'),
 				'5.2.1-B1' => Array ('Core' => '5.2.1-B1'),
+				'5.2.1-B2' => Array ('Core' => '5.2.1-B2'),
+				'5.2.1-RC1' => Array ('Core' => '5.2.1-RC1'),
 			);
 		}
 
 		/**
 		 * Changes table structure, where multilingual fields of TEXT type are present
 		 *
 		 * @param string $mode when called mode {before, after)
 		 */
 		function Upgrade_5_0_0($mode)
 		{
 			if ($mode == 'after') {
 				$categories_config = $this->Application->getUnitConfig('c');
 				$root_category = $this->Application->findModule('Name', 'In-News', 'RootCat');
 
 				$sql = 'UPDATE ' . $categories_config->getTableName() . '
 						SET UseMenuIconUrl = 1, MenuIconUrl = "in-news/img/menu_articles.gif"
 						WHERE ' . $categories_config->getIDField() . ' = ' . $root_category;
 				$this->Conn->Query($sql);
 
 				$this->_updateDetailTemplate('n', 'innews/detail', 'in-news/designs/detail');
 			}
 		}
 
 		/**
 		 * Update to 5.0.1
 		 *
 		 * @param string $mode when called mode {before, after)
 		 */
 		function Upgrade_5_0_1($mode)
 		{
 			if ($mode == 'after') {
 				$this->_updateDetailTemplate('n', 'in-news/designs/detail', 'in-news/articles/article_detail');
 
 				// delete old events
 				$events_to_delete = Array ( 'NEWS.OWNER.MODIFY.PENDING', 'NEWS.OWNER.MODIFY' );
 
 				$sql = 'SELECT EventId FROM ' . TABLE_PREFIX . 'Events
 							WHERE Event IN ("' . implode('","', $events_to_delete) . '")';
 				$event_ids = $this->Conn->GetCol($sql);
 
 				if ($event_ids) {
 					$sql = 'DELETE FROM ' . TABLE_PREFIX . 'EmailMessage
 								WHERE EventId IN (' . implode(',', $event_ids) . ')';
 					$this->Conn->Query($sql);
 
 					$sql = 'DELETE FROM ' . TABLE_PREFIX . 'Events
 								WHERE EventId IN (' . implode(',', $event_ids) . ')';
 					$this->Conn->Query($sql);
 
 					$sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
 								WHERE Phrase IN ("la_event_news.owner.modify", "la_event_news.owner.modify.pending")';
 					$this->Conn->Query($sql);
 				}
 			}
 		}
 	}
\ No newline at end of file
Index: branches/5.3.x/install/upgrades.sql
===================================================================
--- branches/5.3.x/install/upgrades.sql	(revision 15900)
+++ branches/5.3.x/install/upgrades.sql	(revision 15901)
@@ -1,142 +1,149 @@
 # ===== v 4.3.9 =====
 
 INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1');
 
 # ===== v 5.0.0 =====
 ALTER TABLE News ADD INDEX (StartDate), ADD INDEX (Archived);
 
 UPDATE Category SET Template = '/in-news/designs/section' WHERE Template = 'innews/index';
 UPDATE Category SET CachedTemplate = '/in-news/designs/section' WHERE CachedTemplate = 'innews/index';
 
 UPDATE ConfigurationValues SET VariableValue = '/in-news/designs/section' WHERE VariableName = 'n_CategoryTemplate';
 UPDATE ConfigurationValues SET VariableValue = 'in-news/designs/detail' WHERE VariableName = 'n_ItemTemplate';
 
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0);
 DELETE FROM Permissions WHERE Permission LIKE 'in-news:innews_general.%';
 
 UPDATE Phrase SET Module = 'In-News' WHERE ((Phrase LIKE '%Article%' OR Phrase LIKE '%News%') AND (Module = 'Core') AND Phrase NOT IN ('la_ToolTip_NewSearchConfig', 'la_tooltip_newstylesheet'));
 
 UPDATE Phrase SET Module = 'In-News' WHERE Phrase = 'la_title_In-News';
 
 # ===== v 5.0.1 =====
 UPDATE ConfigurationValues SET VariableValue = 'in-news/articles/article_detail' WHERE VariableName = 'n_ItemTemplate';
 
 UPDATE ConfigurationAdmin
 SET ValueList = 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn'
 WHERE VariableName IN ('News_SortReviews', 'News_SortReviews2');
 
 UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
 WHERE VariableName IN ('News_SortReviewsOrder', 'News_SortReviewsOrder2');
 
 UPDATE ConfigurationAdmin
 SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year'
 WHERE VariableName IN ('News_ReviewDelay_Interval', 'News_RatingDelay_Interval');
 
 UPDATE CustomField SET FieldLabel = 'la_fld_RssSource', Prompt = 'la_fld_RssSource' WHERE FieldName = 'RssSource';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpiration', Prompt = 'la_fld_RssDefaultExpiration' WHERE FieldName = 'RssDefaultExpiration';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateInterval', Prompt = 'la_fld_RssUpdateInterval' WHERE FieldName = 'RssUpdateInterval';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireInterval', Prompt = 'la_fld_RssExpireInterval' WHERE FieldName = 'RssExpireInterval';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssDeleteExpired', Prompt = 'la_fld_RssDeleteExpired' WHERE FieldName = 'RssDeleteExpired';
 
 UPDATE CustomField SET FieldLabel = 'la_fld_RssLastExpired', Prompt = 'la_fld_RssLastExpired' WHERE FieldName = 'RssLastExpired';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpirationType', Prompt = 'la_fld_RssDefaultExpirationType' WHERE FieldName = 'RssDefaultExpirationType';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireIntervalType', Prompt = 'la_fld_RssExpireIntervalType' WHERE FieldName = 'RssExpireIntervalType';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateIntervalType', Prompt = 'la_fld_RssUpdateIntervalType' WHERE FieldName = 'RssUpdateIntervalType';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssLastUpdated', Prompt = 'la_fld_RssLastUpdated' WHERE FieldName = 'RssLastUpdated';
 UPDATE CustomField SET FieldLabel = 'la_fld_RssArticleCRC', Prompt = 'la_fld_RssArticleCRC' WHERE FieldName = 'RssArticleCRC';
 UPDATE CustomField SET FieldLabel = 'la_fld_cust_n_ItemTemplate', Prompt = 'la_fld_cust_n_ItemTemplate' WHERE FieldName = 'n_ItemTemplate';
 
 INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.add.pending', 1);
 
 UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('News_ReviewDelay_Value', 'News_RatingDelay_Value');
 
 # ===== v 5.0.2-B1 =====
 ALTER TABLE News
 	CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL,
 	CHANGE StartDate StartDate INT(11) NULL DEFAULT NULL,
 	CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
 
 # ===== v 5.0.2-B2 =====
 
 # ===== v 5.0.2-RC1 =====
 
 # ===== v 5.0.2 =====
 
 # ===== v 5.0.3-B1 =====
 
 # ===== v 5.0.3-B2 =====
 
 # ===== v 5.0.3-RC1 =====
 
 # ===== v 5.0.3 =====
 
 # ===== v 5.0.4-B1 =====
 
 # ===== v 5.0.4-B2 =====
 
 # ===== v 5.0.4 =====
 
 # ===== v 5.1.0-B1 =====
 UPDATE Modules SET Path = 'modules/in-news/' WHERE `Name` = 'In-News';
 DELETE FROM ConfigurationValues WHERE VariableName IN (
 	'Article_Root', 'News_PopCount', 'News_ArticleSort', 'News_CatSort', 'News_ShowMulti',
 	'News_Admin_Notice_New', 'News_Admin_Notice_Modify', 'News_Admin_Notice_Suggest',
 	'News_User_Notice_New', 'News_User_Notice_Approve', 'News_User_Notice_Deny',
 	'News_User_Notice_Modify', 'News_User_Notice_Modify_Approve', 'News_User_Notice_Modify_Deny'
 );
 
 DELETE FROM Permissions WHERE Permission LIKE 'in-news:configuration_email%';
 
 # ===== v 5.1.0-RC1 =====
 
 # ===== v 5.1.0 =====
 
 # ===== v 5.1.1-B1 =====
 ALTER TABLE News
 	CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
 	CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
 
 # ===== v 5.1.1-RC1 =====
 
 # ===== v 5.1.1 =====
 
 # ===== v 5.1.2-B1 =====
 
 # ===== v 5.1.2-RC1 =====
 
 # ===== v 5.1.2 =====
 
 # ===== v 5.1.3-B1 =====
 
 # ===== v 5.1.3-RC1 =====
 UPDATE ConfigurationValues
 SET VariableValue = 'in-news/articles/article_detail'
 WHERE VariableName = 'n_ItemTemplate' AND VariableValue = 'in-news/designs/detail';
 
 # ===== v 5.1.3-RC2 =====
 
 # ===== v 5.1.3 =====
 UPDATE Phrase
 SET `Module` = 'Core'
 WHERE PhraseKey = 'LA_FLD_STARTDATE';
 
 # ===== v 5.2.0-B1 =====
 DELETE FROM SystemSettings
 WHERE VariableName IN ('News_Highlight_OpenTag', 'News_Highlight_CloseTag');
 
 # ===== v 5.2.0-B2 =====
 UPDATE News main_table
 SET main_table.CachedReviewsQty = (SELECT COUNT(*) FROM <%TABLE_PREFIX%>CatalogReviews review_table WHERE review_table.ItemId = main_table.ResourceId);
 
 # ===== v 5.2.0-B3 =====
 
 # ===== v 5.2.0-RC1 =====
 
 # ===== v 5.2.0 =====
 INSERT INTO Permissions VALUES(DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
 
 # ===== v 5.2.1-B1 =====
 UPDATE SystemSettings
 SET DisplayOrder = 20.04
 WHERE VariableName = 'Perpage_NewsReviews';
+
+# ===== v 5.2.1-B2 =====
+UPDATE Modules
+SET ClassNamespace = 'Intechnic\\InPortal\\Modules\\InNews'
+WHERE `Name` = 'In-News';
+
+# ===== v 5.2.1-RC1 =====
Index: branches/5.3.x/install/english.lang
===================================================================
--- branches/5.3.x/install/english.lang	(revision 15900)
+++ branches/5.3.x/install/english.lang	(revision 15901)
@@ -1,164 +1,168 @@
-<LANGUAGES Version="5">
-	<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
+<?xml version="1.0" encoding="utf-8"?>
+<LANGUAGES Version="6">
+	<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
+		<EMAILDESIGNS>
+			<HTML>JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg==</HTML>
+		</EMAILDESIGNS>
 		<PHRASES>
 			<PHRASE Label="la_Article_Author" Module="In-News" Type="1">QXV0aG9y</PHRASE>
 			<PHRASE Label="la_Article_Date" Module="In-News" Type="1">RGF0ZQ==</PHRASE>
 			<PHRASE Label="la_Article_Excerpt" Module="In-News" Type="1">QXJ0aWNsZSBFeGNlcnB0</PHRASE>
 			<PHRASE Label="la_Article_Hits" Module="In-News" Type="1">SGl0cw==</PHRASE>
 			<PHRASE Label="la_Article_Rating" Module="In-News" Type="1">UmF0aW5n</PHRASE>
 			<PHRASE Label="la_Article_Title" Module="In-News" Type="1">QXJ0aWNsZSBUaXRsZQ==</PHRASE>
 			<PHRASE Label="la_fld_Author" Module="In-News" Type="1" Column="QXV0aG9y">QXV0aG9y</PHRASE>
 			<PHRASE Label="la_fld_Body" Module="In-News" Type="1">QXJ0aWNsZSBCb2R5</PHRASE>
 			<PHRASE Label="la_fld_cust_n_ItemTemplate" Module="In-News" Type="1">TmV3cyBJdGVtIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_fld_EndOn" Module="In-News" Type="1" Column="QXJjaGl2YXRpb24gRGF0ZQ==">QXJjaGl2YXRpb24gRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_Excerpt" Module="In-News" Type="1">QXJ0aWNsZSBFeGNlcnB0</PHRASE>
 			<PHRASE Label="la_fld_LeadCatStory" Module="In-News" Type="1" Column="U2VjdGlvbiBMZWFk">U2VjdGlvbiBMZWFkIFN0b3J5</PHRASE>
 			<PHRASE Label="la_fld_LeadStory" Module="In-News" Type="1" Column="U2l0ZSBMZWFk">U2l0ZSBMZWFkIFN0b3J5</PHRASE>
 			<PHRASE Label="la_fld_News_MaxHotNumber" Module="In-News" Type="1">TWF4aW11bSBudW1iZXIgb2YgSE9UIGFydGljbGVz</PHRASE>
 			<PHRASE Label="la_fld_News_MinPopRating" Module="In-News" Type="1">TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A=</PHRASE>
 			<PHRASE Label="la_fld_News_MinPopVotes" Module="In-News" Type="1">TWluaW11bSBudW1iZXIgb2Ygdm90ZXMgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A=</PHRASE>
 			<PHRASE Label="la_fld_RssArticleCRC" Module="In-News" Type="1">UlNTIEFydGljbGUgQ1JDMzI=</PHRASE>
 			<PHRASE Label="la_fld_RssDefaultExpiration" Module="In-News" Type="1">RGVmYXVsdCBFeHBpcmF0aW9u</PHRASE>
 			<PHRASE Label="la_fld_RssDefaultExpirationType" Module="In-News" Type="1">RGVmYXVsdCBFeHBpcmF0aW9uIFR5cGU=</PHRASE>
 			<PHRASE Label="la_fld_RssDeleteExpired" Module="In-News" Type="1">RGVsZXRlIEV4cGlyZWQ=</PHRASE>
 			<PHRASE Label="la_fld_RssExpireInterval" Module="In-News" Type="1">RXhwaXJhdGlvbiBDaGVjayBJbnRlcnZhbA==</PHRASE>
 			<PHRASE Label="la_fld_RssExpireIntervalType" Module="In-News" Type="1">RXhwaXJhdGlvbiBJbnRlcnZhbCBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_RssLastExpired" Module="In-News" Type="1">TGFzdCBFeHBpcmVkIE9u</PHRASE>
 			<PHRASE Label="la_fld_RssLastUpdated" Module="In-News" Type="1">TGFzdCBVcGRhdGVk</PHRASE>
 			<PHRASE Label="la_fld_RssOriginalURL" Module="In-News" Type="1">RmVlZCBPcmlnaW5hbCBVUkw=</PHRASE>
 			<PHRASE Label="la_fld_RssSource" Module="In-News" Type="1">U291cmNlIFVSTA==</PHRASE>
 			<PHRASE Label="la_fld_RssUpdateInterval" Module="In-News" Type="1">VXBkYXRlIEludGVydmFs</PHRASE>
 			<PHRASE Label="la_fld_RssUpdateIntervalType" Module="In-News" Type="1">VXBkYXRlIEludGVydmFsIFR5cGU=</PHRASE>
 			<PHRASE Label="la_In-news" Module="In-News" Type="1">SW4tTmV3cw==</PHRASE>
 			<PHRASE Label="la_ItemTab_News" Module="In-News" Type="1">QXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_news_daysarchive_prompt" Module="In-News" Type="1">TnVtYmVyIG9mIGRheXMgdG8gYXJjaGl2ZSBhcnRpY2xlcyBhdXRvbWF0aWNhbGx5</PHRASE>
 			<PHRASE Label="la_news_editorpicksabove_prompt" Module="In-News" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBhcnRpY2xlcw==</PHRASE>
 			<PHRASE Label="la_news_newdays_prompt" Module="In-News" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgYXJ0aWNsZSB0byBiZSBORVc=</PHRASE>
 			<PHRASE Label="la_news_perpage_prompt" Module="In-News" Type="1">TnVtYmVyIG9mIGFydGljbGVzIHBlciBwYWdl</PHRASE>
 			<PHRASE Label="la_news_perpage_short_prompt" Module="In-News" Type="1">QXJ0aWNsZXMgUGVyIFBhZ2UgKFNob3J0bGlzdCk=</PHRASE>
 			<PHRASE Label="la_news_sortfield2_pompt" Module="In-News" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
 			<PHRASE Label="la_news_sortfield_pompt" Module="In-News" Type="1">T3JkZXIgYXJ0aWNsZXMgYnk=</PHRASE>
 			<PHRASE Label="la_news_sortreviews2_prompt" Module="In-News" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
 			<PHRASE Label="la_news_sortreviews_prompt" Module="In-News" Type="1">U29ydCBDb21tZW50cyBieQ==</PHRASE>
 			<PHRASE Label="la_PermName_News.Add.Pending_desc" Module="In-News" Type="1">QWRkIFBlbmRpbmcgTmV3cw==</PHRASE>
 			<PHRASE Label="la_PermName_News.Add_desc" Module="In-News" Type="1">QWRkIE5ld3M=</PHRASE>
 			<PHRASE Label="la_PermName_News.Delete_desc" Module="In-News" Type="1">RGVsZXRlIE5ld3M=</PHRASE>
 			<PHRASE Label="la_PermName_News.Modify.Pending_desc" Module="In-News" Type="1">TW9kaWZ5IEFydGljbGUgUGVuZGluZw==</PHRASE>
 			<PHRASE Label="la_PermName_News.Modify_desc" Module="In-News" Type="1">TW9kaWZ5IE5ld3M=</PHRASE>
 			<PHRASE Label="la_PermName_News.Owner.Delete_desc" Module="In-News" Type="1">QXJ0aWNsZSBEZWxldGUgYnkgT3duZXI=</PHRASE>
 			<PHRASE Label="la_PermName_News.Owner.Modify.Pending_desc" Module="In-News" Type="1">QXJ0aWNsZSBNb2RpZnkgUGVuZGluZyBieSBPd25lcg==</PHRASE>
 			<PHRASE Label="la_PermName_News.Owner.Modify_desc" Module="In-News" Type="1">QXJ0aWNsZSBNb2RpZnkgYnkgT3duZXI=</PHRASE>
 			<PHRASE Label="la_PermName_News.Rate_desc" Module="In-News" Type="1">UmF0ZSBOZXdz</PHRASE>
 			<PHRASE Label="la_PermName_News.Review.Pending_desc" Module="In-News" Type="1">UmV2aWV3IE5ld3MgUGVuZGluZw==</PHRASE>
 			<PHRASE Label="la_PermName_News.Review_desc" Module="In-News" Type="1">Q29tbWVudCBBcnRpY2xl</PHRASE>
 			<PHRASE Label="la_PermName_News.View_desc" Module="In-News" Type="1">VmlldyBOZXdz</PHRASE>
 			<PHRASE Label="la_prompt_ActiveArticles" Module="In-News" Type="1">QWN0aXZlIEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_prompt_ArticleAverageRating" Module="In-News" Type="1">QXZlcmFnZSBSYXRpbmcgb2YgQXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_prompt_ArticleReviews" Module="In-News" Type="1">VG90YWwgQXJ0aWNsZSBDb21tZW50cw==</PHRASE>
 			<PHRASE Label="la_prompt_ArticlesActive" Module="In-News" Type="1">QWN0aXZlIEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_prompt_ArticlesArchived" Module="In-News" Type="1">QXJjaGl2ZWQgQXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_prompt_ArticlesPending" Module="In-News" Type="1">UGVuZGluZyBBcnRpY2xlcw==</PHRASE>
 			<PHRASE Label="la_prompt_ArticlesTotal" Module="In-News" Type="1">VG90YWwgQXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_prompt_CategoryLeadStoryArticles" Module="In-News" Type="1">U2VjdGlvbiBMZWFkIFN0b3J5IEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_prompt_DisabledArticles" Module="In-News" Type="1">RGlzYWJsZWQgQXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_prompt_EditorsPickArticles" Module="In-News" Type="1">RWRpdG9yJ3MgUGljayBBcnRpY2xlcw==</PHRASE>
 			<PHRASE Label="la_prompt_HotArticles" Module="In-News" Type="1">SG90IEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_prompt_LastArticleUpdate" Module="In-News" Type="1">TGFzdCBVcGRhdGVkIEFydGljbGU=</PHRASE>
 			<PHRASE Label="la_prompt_LeadStoryArticles" Module="In-News" Type="1">TGVhZCBTdG9yeSBBcnRpY2xlcw==</PHRASE>
 			<PHRASE Label="la_prompt_MaxHitsArticles" Module="In-News" Type="1">TWF4aW11bSBIaXRzIG9mIGFuIEFydGljbGU=</PHRASE>
 			<PHRASE Label="la_prompt_MaxVotesArticles" Module="In-News" Type="1">TWF4aW11bSBWb3RlcyBvZiBhbiBBcnRpY2xl</PHRASE>
 			<PHRASE Label="la_prompt_NewArticles" Module="In-News" Type="1">TmV3IEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_prompt_NewestArticleDate" Module="In-News" Type="1">TmV3ZXN0IEFydGljbGUgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_PopularArticles" Module="In-News" Type="1">UG9wdWxhciBBcnRpY2xlcw==</PHRASE>
 			<PHRASE Label="la_section_Article" Module="In-News" Type="1">QXJ0aWNsZQ==</PHRASE>
 			<PHRASE Label="la_section_RssExpiration" Module="In-News" Type="1">UlNTIEZlZWQgQXJ0aWNsZSBFeHBpcmF0aW9u</PHRASE>
 			<PHRASE Label="la_section_RssProperties" Module="In-News" Type="1">UlNTIEZlZWQgUHJvcGVydGllcw==</PHRASE>
 			<PHRASE Label="la_tab_Articles" Module="In-News" Type="1">QXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_Text_Article" Module="In-News" Type="1">QXJ0aWNsZQ==</PHRASE>
 			<PHRASE Label="la_Text_Articles" Module="In-News" Type="1">QXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_title_AddingArticle" Module="In-News" Type="1">QWRkaW5nIEFydGljbGU=</PHRASE>
 			<PHRASE Label="la_title_Articles" Module="In-News" Type="1">QXJ0aWNsZXM=</PHRASE>
 			<PHRASE Label="la_title_ArticlesExport" Module="In-News" Type="1">QXJ0aWNsZXMgRXhwb3J0</PHRASE>
 			<PHRASE Label="la_title_EditingArticle" Module="In-News" Type="1">RWRpdGluZyBBcnRpY2xl</PHRASE>
 			<PHRASE Label="la_title_ImportArticles" Module="In-News" Type="1">SW1wb3J0IEFydGljbGVz</PHRASE>
 			<PHRASE Label="la_title_In-News" Module="In-News" Type="1">TmV3cw==</PHRASE>
 			<PHRASE Label="la_title_NewArticle" Module="In-News" Type="1">TmV3IEFydGljbGU=</PHRASE>
 			<PHRASE Label="la_ToolTip_NewArticle" Module="In-News" Type="1">TmV3IEFydGljbGU=</PHRASE>
 		</PHRASES>
 		<EVENTS>
 			<EVENT Event="NEWS.ADD" Type="0">
 				<SUBJECT>WW91ciBOZXcgQXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBBZGRlZA==</SUBJECT>
 				<HTMLBODY>VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgQXJ0aWNsZSB0byBvdXIgd2Vic2l0ZSE8YnIvPjxici8+DQ1BcnRpY2xlIGRldGFpbHMgYXJlIGxpc3RlZCBiZWxvdzo8YnIvPjxici8+DQ1BcnRpY2xlIFRpdGxlOiA8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PGJyLz4NPGlucDI6bV9pZiBjaGVjaz0ibl9GaWVsZCIgbmFtZT0iQm9keSI+DUJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DTwvaW5wMjptX2lmPg08YnIvPjxici8+DQ1Zb3UgY2FuIHZpZXcgeW91ciBhcnRpY2xlIGhlcmUgPGEgaHJlZj0iPGlucDI6bl9BcnRpY2xlTGluayB0ZW1wbGF0ZT0iX19kZWZhdWx0X18iLz4iPjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz48L2E+</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.ADD" Type="1">
 				<SUBJECT>TmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGhhcyBiZWVuIEFkZGVk</SUBJECT>
 				<HTMLBODY>TmV3IEFydGljbGUgaGFzIGJlZW4gc3VibWl0dGVkIHRvIG91ciB3ZWJzaXRlITxici8+PGJyLz4NDUFydGljbGUgZGV0YWlscyBhcmUgbGlzdGVkIGJlbG93Ojxici8+PGJyLz4NDUFydGljbGUgVGl0bGU6IDxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz48YnIvPg08aW5wMjptX2lmIGNoZWNrPSJuX0ZpZWxkIiBuYW1lPSJCb2R5Ij4NQm9keTogPGlucDI6bl9GaWVsZCBuYW1lPSJCb2R5Ii8+PGJyLz4NPC9pbnAyOm1faWY+DTxici8+PGJyLz4NDVlvdSBjYW4gdmlldyB5b3VyIGFydGljbGUgaGVyZSA8YSBocmVmPSI8aW5wMjpuX0FydGljbGVMaW5rIHRlbXBsYXRlPSJfX2RlZmF1bHRfXyIvPiI+PGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjwvYT4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.ADD.PENDING" Type="0">
 				<SUBJECT>TmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZw==</SUBJECT>
 				<HTMLBODY>TmV3IEFydGljbGUgaGFzIGJlZW4gc3VibWl0dGVkIHRvIG91ciB3ZWJzaXRlIGFuZCBwZW5kaW5nIGZvciBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbCE8YnIvPjxici8+DQoNCkFydGljbGUgZGV0YWlscyBhcmUgbGlzdGVkIGJlbG93Ojxici8+PGJyLz4NCg0KQXJ0aWNsZSBUaXRsZTogPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjxici8+DQo8aW5wMjptX2lmIGNoZWNrPSJuX0ZpZWxkIiBuYW1lPSJCb2R5Ij4NCkJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DQo8L2lucDI6bV9pZj4NCjxici8+PGJyLz4NCg0KWW91IGNhbiB2aWV3IHlvdXIgYXJ0aWNsZSBoZXJlIDxhIGhyZWY9IjxpbnAyOm5fQXJ0aWNsZUxpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PC9hPg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.ADD.PENDING" Type="1">
 				<SUBJECT>TmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZw==</SUBJECT>
 				<HTMLBODY>TmV3IEFydGljbGUgaGFzIGJlZW4gc3VibWl0dGVkIHRvIG91ciB3ZWJzaXRlIGFuZCBwZW5kaW5nIGZvciBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbCE8YnIvPjxici8+DQoNCkFydGljbGUgZGV0YWlscyBhcmUgbGlzdGVkIGJlbG93Ojxici8+PGJyLz4NCg0KQXJ0aWNsZSBUaXRsZTogPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjxici8+DQo8aW5wMjptX2lmIGNoZWNrPSJuX0ZpZWxkIiBuYW1lPSJCb2R5Ij4NCkJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DQo8L2lucDI6bV9pZj4NCjxici8+PGJyLz4NCg0KWW91IGNhbiB2aWV3IHlvdXIgYXJ0aWNsZSBoZXJlIDxhIGhyZWY9IjxpbnAyOm5fQXJ0aWNsZUxpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PC9hPg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.APPROVE" Type="0">
 				<SUBJECT>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIEFwcHJvdmVk</SUBJECT>
 				<HTMLBODY>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBoYXMgYmVlbiBhcHByb3ZlZA==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.DENY" Type="0">
 				<SUBJECT>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIERlY2xpbmVk</SUBJECT>
 				<HTMLBODY>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBoYXMgYmVlbiBkZWNsaW5lZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY" Type="0">
 				<SUBJECT>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIFVwZGF0ZWQ=</SUBJECT>
 				<HTMLBODY>WW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBoYXMgYmVlbiB1cGRhdGVkLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY" Type="1">
 				<SUBJECT>QXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBVcGRhdGVk</SUBJECT>
 				<HTMLBODY>QXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgaGFzIGJlZW4gdXBkYXRlZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY.APPROVE" Type="0">
 				<SUBJECT>WW91ciBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIgLz4iIC0gQXBwcm92ZWQh</SUBJECT>
 				<HTMLBODY>WW91ciBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIgLz4iIGxpbmsgd2VyZSBhcHByb3ZlZCBieSB0aGUgd2Vic2l0ZS4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY.DENY" Type="0">
 				<SUBJECT>WW91ciBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBEZWNsaW5lZA==</SUBJECT>
 				<HTMLBODY>WW91ciBtb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSB3ZXJlIGRlY2xpbmVkLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY.PENDING" Type="0">
 				<SUBJECT>TW9kaWZpY2F0aW9ucyBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZw==</SUBJECT>
 				<HTMLBODY>TW9kaWZpY2F0aW9ucyBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGFydGljbGUgYXJlIHBlbmRpbmcgZm9yIGFkbWluaXN0cmF0aXZlIGFwcHJvdmFsLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.MODIFY.PENDING" Type="1">
 				<SUBJECT>QXJ0aWNsZSBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQZW5kaW5n</SUBJECT>
 				<HTMLBODY>TW9kaWZpY2F0aW9ucyBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGFydGljbGUgYXJlIHBlbmRpbmcgZm9yIGFkbWluaXN0cmF0aXZlIGFwcHJvdmFsLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.ADD" Type="0">
 				<SUBJECT>WW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSAtIFB1Ymxpc2hlZA==</SUBJECT>
 				<HTMLBODY>WW91ciBjb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSBoYXMgYmVlbiBwdWJsaXNoZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.ADD" Type="1">
 				<SUBJECT>TmV3IENvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBBcnRpY2xlIFN1Ym1pdHRlZA==</SUBJECT>
 				<HTMLBODY>TmV3IGNvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBhcnRpY2xlIGhhcyBiZWVuIHN1Ym1pdHRlZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.ADD.PENDING" Type="0">
 				<SUBJECT>WW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQZW5kaW5n</SUBJECT>
 				<HTMLBODY>VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgY29tbWVudCBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iLjxici8+PGJyLz4NCg0KQ3VycmVudGx5IGl0J3MgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwgYW5kIHdpbGwgYmUgcHVibGlzaGVkIHNob3J0bHku</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.ADD.PENDING" Type="1">
 				<HEADERS>WC1NYWlsZXI6IEluLVBvcnRhbA==</HEADERS>
 				<SUBJECT>WW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQZW5kaW5nIFthZG1pbl0=</SUBJECT>
 				<HTMLBODY>VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgY29tbWVudCBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iLjxici8+PGJyLz4NCg0KQ3VycmVudGx5IGl0J3MgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwgYW5kIHdpbGwgYmUgcHVibGlzaGVkIHNob3J0bHku</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.APPROVE" Type="0">
 				<SUBJECT>WW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQdWJsaXNoZWQ=</SUBJECT>
 				<HTMLBODY>VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgY29tbWVudCBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iLjxici8+PGJyLz4NCg0KSXQncyBhbHJlYWR5IHB1Ymxpc2hlZCBvbiB0aGUgd2Vic2l0ZSE=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="NEWS.REVIEW.DENY" Type="0">
 				<SUBJECT>WW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBEZWNsaW5lZA==</SUBJECT>
 				<HTMLBODY>U29ycnksIGJ1dCB5b3VyIGNvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBhcnRpY2xlIGhhcyBiZWVuIGRlY2xpbmVkLg==</HTMLBODY>
 			</EVENT>
 		</EVENTS>
 	</LANGUAGE>
 </LANGUAGES>
\ No newline at end of file
Index: branches/5.3.x/install/install_data.sql
===================================================================
--- branches/5.3.x/install/install_data.sql	(revision 15900)
+++ branches/5.3.x/install/install_data.sql	(revision 15901)
@@ -1,185 +1,185 @@
 # Section "in-news:configuration_output":
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title||Excerpt=la_Article_Excerpt||Author=la_Article_Author||CreatedOn=la_Article_Date||Hits=la_Article_Hits||CachedRating=la_Article_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomFields WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.01, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title||Excerpt=la_Article_Excerpt||Author=la_Article_Author||CreatedOn=la_Article_Date||Hits=la_Article_Hits||CachedRating=la_Article_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomFields WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.02, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_Archive', '0', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.11, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.11, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.12, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.12, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_MaxCategories', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_MaxCategories', 'text', NULL, NULL, 10.13, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.01, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.01, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.02, 1, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.02, 2, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.04, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_CategoryTemplate', '/in-news/designs/section', 'In-News', 'in-news:configuration_output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_ItemTemplate', 'in-news/articles/article_detail', 'In-News', 'in-news:configuration_output', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_MaxImageCount', '5', 'In-News', 'in-news:configuration_output', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 40.01, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_ThumbnailImageWidth', '120', 'In-News', 'in-news:configuration_output', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 40.02, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_ThumbnailImageHeight', '120', 'In-News', 'in-news:configuration_output', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 40.03, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_FullImageWidth', '450', 'In-News', 'in-news:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 40.04, 0, 0, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'n_FullImageHeight', '450', 'In-News', 'in-news:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 40.05, 0, 0, NULL);
 
 # Section "in-news:configuration_search":
 INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
 INSERT INTO SystemSettings VALUES(DEFAULT, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1, NULL);
 
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 1, 'In-News', 'Add Article', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 0, 'In-News', 'Add Article', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 1, 'In-News', 'Article Add Pending', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Add Pending', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 1, 'In-News', 'Modify Article', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 0, 'In-News', 'Modify Article', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 1, 'In-News', 'Article Modify Pending', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 0, 'In-News', 'Article Modify Pending', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.APPROVE', NULL, 1, 0, 'In-News', 'Approve Article Modification', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.DENY', NULL, 1, 0, 'In-News', 'Decline Article Modification', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.APPROVE', NULL, 1, 0, 'In-News', 'Approve Article', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.DENY', NULL, 1, 0, 'In-News', 'Decline Article', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 1, 'In-News', 'Article Comment Added', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 0, 'In-News', 'Article Comment Added', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.APPROVE', NULL, 1, 0, 'In-News', 'Article Comment Approved', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.DENY', NULL, 1, 0, 'In-News', 'Article Comment Declined', 0, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Comment Pending', 1, 1, 1);
 INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Comment Pending', 0, 1, 1);
 
 INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article');
 
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.ADD', 'la_PermName_News.Add_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.VIEW', 'la_PermName_News.View_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.ADD.PENDING', 'la_PermName_News.Add.Pending_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.MODIFY', 'la_PermName_News.Modify_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.DELETE', 'la_PermName_News.Delete_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.RATE', 'la_PermName_News.Rate_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.REVIEW', 'la_PermName_News.Review_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 'la_PermName_News.Review.Pending_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 'la_PermName_News.Modify.Pending_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 'la_PermName_News.Owner.Modify_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 'la_PermName_News.Owner.Modify.Pending_desc', 'In-News', 1);
 INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 'la_PermName_News.Owner.Delete_desc', 'In-News', 1);
 
 INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lc_field_createdon', 'In-News', 'la_text_article', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lc_field_hits', 'In-News', 'la_text_article', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lc_field_cachedrating', 'In-News', 'la_text_article', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lc_field_cachedvotesqty', 'In-News', 'la_text_article', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lc_field_createdbyid', 'In-News', 'la_text_article', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lc_field_priority', 'In-News', 'la_text_article', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lc_field_status', 'In-News', 'la_text_article', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lc_field_EditorsPick', 'In-News', 'la_text_article', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lc_field_resourceid', 'In-News', 'la_text_article', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lc_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lc_field_newitem', 'In-News', 'la_text_article', 20, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lc_field_popitem', 'In-News', 'la_text_article', 21, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lc_field_hotitem', 'In-News', 'la_text_article', 22, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lc_field_modified', 'In-News', 'la_text_article', 24, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lc_field_modifiedbyid', 'In-News', 'la_text_article', 25, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lc_field_orgid', 'In-News', 'la_text_article', 26, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 INSERT INTO SearchConfig VALUES ('CustomFields', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssExpireInterval', 'la_fld_RssExpireInterval', 0, 'la_title_SystemCF', 'la_fld_RssExpireInterval', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssUpdateInterval', 'la_fld_RssUpdateInterval', 0, 'la_title_SystemCF', 'la_fld_RssUpdateInterval', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssLastUpdated', 'la_fld_RssLastUpdated', 0, 'la_title_SystemCF', 'la_fld_RssLastUpdated', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssDeleteExpired', 'la_fld_RssDeleteExpired', 0, 'la_title_SystemCF', 'la_fld_RssDeleteExpired', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 0, 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', '', 0, 1, 0, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssUpdateIntervalType', 'la_fld_RssUpdateIntervalType', 0, 'la_title_SystemCF', 'la_fld_RssUpdateIntervalType', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssSource', 'la_fld_RssSource', 0, 'la_title_SystemCF', 'la_fld_RssSource', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssExpireIntervalType', 'la_fld_RssExpireIntervalType', 0, 'la_title_SystemCF', 'la_fld_RssExpireIntervalType', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssDefaultExpiration', 'la_fld_RssDefaultExpiration', 0, 'la_title_SystemCF', 'la_fld_RssDefaultExpiration', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssDefaultExpirationType', 'la_fld_RssDefaultExpirationType', 0, 'la_title_SystemCF', 'la_fld_RssDefaultExpirationType', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'RssLastExpired', 'la_fld_RssLastExpired', 0, 'la_title_SystemCF', 'la_fld_RssLastExpired', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 2, 'RssArticleCRC', 'la_fld_RssArticleCRC', 0, 'la_section_SystemCF', 'la_fld_RssArticleCRC', 'text', NULL, '', 0, 0, 1, 0);
 INSERT INTO CustomFields VALUES (DEFAULT, 1, 'n_ItemTemplate', 'la_fld_cust_n_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_n_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0);
 
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory  = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2);
 INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>CatalogReviews WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2);
 
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 14, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 13, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 11, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 12, 1, 0, {NewsCatId});
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 15, 0, 0, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0);
 INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.delete', 11, 1, 1, 0);
 
 INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1');
 
-INSERT INTO Modules VALUES ('In-News', 'modules/in-news/', 'n', DEFAULT, 1, 2, 'in-news/', {NewsCatId}, NULL, NULL);
\ No newline at end of file
+INSERT INTO Modules VALUES ('In-News', 'modules/in-news/', 'Intechnic\\InPortal\\Modules\\InNews', 'n', DEFAULT, 1, 2, 'in-news/', {NewsCatId}, NULL, NULL);
\ No newline at end of file
Index: branches/5.3.x/install.php
===================================================================
--- branches/5.3.x/install.php	(revision 15900)
+++ branches/5.3.x/install.php	(revision 15901)
@@ -1,52 +1,58 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-News
 * @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.
 */
-	$module_folder = 'modules/in-news';
+$module_folder = 'modules/in-news';
 
-	if (!defined('IS_INSTALL')) {
-		// separate module install
-		define('IS_INSTALL', 1);
-		define('ADMIN', 1);
-		define('FULL_PATH', realpath(dirname(__FILE__) . '/../..') );
+if ( !defined('IS_INSTALL') ) {
+	// separate module install
+	define('IS_INSTALL', 1);
+	define('ADMIN', 1);
+	define('FULL_PATH', realpath(dirname(__FILE__) . '/../..'));
 
-		include_once(FULL_PATH . '/core/kernel/startup.php');
-		require_once FULL_PATH . '/core/install/install_toolkit.php';
+	include_once(FULL_PATH . '/core/kernel/startup.php');
+	require_once FULL_PATH . '/core/install/install_toolkit.php';
 
-		$toolkit = new kInstallToolkit();
-	}
-	else {
-		// install, using installation wizard
-		$toolkit =& $this->toolkit;
-		/* @var $toolkit kInstallToolkit */
-	}
-
-	$application =& kApplication::Instance();
-	$application->Init();
+	$constants_file = FULL_PATH . '/' . $module_folder . '/constants.php';
 
-	if ($application->RecallVar('user_id') != USER_ROOT) {
-		die('restricted access!');
+	if ( file_exists($constants_file) ) {
+		require_once $constants_file;
 	}
 
-	$category =& $toolkit->createModuleCategory('News', 'News Articles', '#in-news/section_design#', 'in-news/img/menu_articles.gif');
-
-	$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql');
-	$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{NewsCatId}', $category->GetID());
-	$toolkit->ImportLanguage('/' . $module_folder . '/install/english');
-
-	$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID());
-
-	$toolkit->linkCustomFields(basename($module_folder), 'n', 2); // to create Custom Fields for News
-	$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field
-	$toolkit->setModuleItemTemplate($category, 'n', '#in-news/item_design#');
+	$toolkit = new kInstallToolkit();
+}
+else {
+	// install, using installation wizard
+	$toolkit =& $this->toolkit;
+	/* @var $toolkit kInstallToolkit */
+}
+
+$application =& kApplication::Instance();
+$application->Init();
+
+if ( $application->RecallVar('user_id') != USER_ROOT ) {
+	die('restricted access!');
+}
+
+$category =& $toolkit->createModuleCategory('News', 'News Articles', '#in-news/section_design#', 'in-news/img/menu_articles.gif');
+
+$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql');
+$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{NewsCatId}', $category->GetID());
+$toolkit->ImportLanguage('/' . $module_folder . '/install/english');
+
+$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID());
+
+$toolkit->linkCustomFields(basename($module_folder), 'n', 2); // to create Custom Fields for News
+$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field
+$toolkit->setModuleItemTemplate($category, 'n', '#in-news/item_design#');
 
-	$toolkit->finalizeModuleInstall($module_folder, true);
\ No newline at end of file
+$toolkit->finalizeModuleInstall($module_folder, true);
Index: branches/5.3.x
===================================================================
--- branches/5.3.x	(revision 15900)
+++ branches/5.3.x	(revision 15901)

Property changes on: branches/5.3.x
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /modules/in-news/branches/5.2.x:r15629-15900