Page MenuHomeIn-Portal Phabricator

in-news
No OneTemporary

File Metadata

Created
Sat, Apr 19, 9:12 PM
Index: branches/5.2.x/units/articles/articles_config.php
===================================================================
--- branches/5.2.x/units/articles/articles_config.php (revision 14090)
+++ branches/5.2.x/units/articles/articles_config.php (revision 14091)
@@ -1,560 +1,557 @@
<?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', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'ConfigPriority' => 0,
'RewritePriority' => 102,
'RewriteListener' => 'ModRewriteHelper:CategoryItemRewriteListener',
'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',
),
'RegularEvents' => Array (
'rss_category_update' => Array ('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE),
),
'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', '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', '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_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
- Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
- Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
- Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
- Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
- ),
- 'Filters' => Array (
- 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 's1' => 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' ),
- )
- ),
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => 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',
'CalculatedFields' => Array (
'' => Array (
'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'ParentPath' => TABLE_PREFIX.'Category.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.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
), // key - special, value - list select sql
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('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.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PortalUser 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', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', '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.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
+ '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.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', '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 (
'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', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => 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, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ '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, 'not_null' => 1, 'default' => 0,
+ '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 . '/'),
+ '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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Title' => Array ('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'UserName' => Array ('title' => 'la_col_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'LeadStory' => Array ('title' => 'la_col_LeadStory', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
'LeadCatStory' => Array ('title' => 'la_col_LeadCatStory', 'filter_block' => 'grid_options_filter', 'width' => 85, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'StartDate' => Array ('title' => 'la_col_StartDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'EndOn' => Array ('title' => 'la_col_EndOn', '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' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Title' => Array ('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'UserName' => Array ('title' => 'la_col_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'LeadStory' => Array ('title' => 'la_col_LeadStory', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
'LeadCatStory' => Array ('title' => 'la_col_LeadCatStory', 'filter_block' => 'grid_options_filter', 'width' => 85, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'StartDate' => Array ('title' => 'la_col_StartDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'EndOn' => Array ('title' => 'la_col_EndOn', '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.2.x/units/articles/articles_event_handler.php
===================================================================
--- branches/5.2.x/units/articles/articles_event_handler.php (revision 14090)
+++ branches/5.2.x/units/articles/articles_event_handler.php (revision 14091)
@@ -1,544 +1,544 @@
<?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!');
class ArticlesEventHandler extends kCatDBEventHandler {
/**
* Filters out archived articles
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
$object =& $event->getObject();
if (!$this->Application->isAdminUser) {
$where_clause = '(Archived = 0) AND (StartDate < '.adodb_mktime().' OR StartDate = 0) AND (EndOn > '.adodb_mktime().' OR EndOn IS NULL)';
$object->addFilter('archived_filter', $where_clause);
}
}
/**
* Return type clauses for list bulding on front
*
* @param kEvent $event
* @return Array
*/
function getTypeClauses(&$event)
{
$type_clauses = parent::getTypeClauses($event);
$type_clauses['site_lead']['include']='%1$s.LeadStory = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['site_lead']['except']='%1$s.LeadStory <> 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['site_lead']['having_filter'] = false;
$type_clauses['cat_lead']['include']='%1$s.LeadCatStory = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['cat_lead']['except']='%1$s.LeadCatStory <> 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['cat_lead']['having_filter'] = false;
return $type_clauses;
}
/**
* [REGULAR EVENT] Deletes expired articles + update existing articles from rss feed with new data (key - article url)
*
* @param kEvent $event
*/
function OnUpdateRSSAtricles(&$event)
{
$category_table = $this->Application->getUnitOption('c', 'TableName');
$custom_table = $this->Application->getUnitOption('c-cdata', 'TableName');
$category_custom_fields = $this->getCustomColumns('c');
$article_custom_fields = $this->getCustomColumns($event->Prefix);
// update categories which sould be updated
$sql = 'SELECT cd.*, c.CategoryId
FROM '.$category_table.' c
LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId
WHERE (IF(cd.'.$category_custom_fields['RssLastUpdated'].' IS NULL, 0, cd.'.$category_custom_fields['RssLastUpdated'].') +
cd.'.$category_custom_fields['RssUpdateInterval'].' * cd.'.$category_custom_fields['RssUpdateIntervalType'].' <=
'.adodb_mktime().') AND (LENGTH('.$category_custom_fields['RssSource'].') > 0)';
$categories = $this->Conn->Query($sql, 'CategoryId');
if ($categories) {
$resource_ids = Array();
foreach ($categories as $category_id => $category_data) {
$resource_ids[] = $category_data['ResourceId'];
$event->setEventParam('source_url', $category_data[ $category_custom_fields['RssSource'] ]);
$event->setEventParam('category_id', $category_id);
$event->setEventParam('custom_fields', $article_custom_fields);
$event->setEventParam('life_time', $category_data[ $category_custom_fields['RssDefaultExpiration'] ] * $category_data[ $category_custom_fields['RssDefaultExpirationType'] ]);
$this->parseFeed($event);
}
$sql = 'UPDATE '.$custom_table.'
SET '.$category_custom_fields['RssLastUpdated'].' = '.adodb_mktime().'
WHERE ResourceId IN ('.implode(',', $resource_ids).')';
$this->Conn->Query($sql);
}
// delete expired articles from feed categories
$sql = 'SELECT c.CategoryId, c.ResourceId
FROM '.$category_table.' c
LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId
WHERE ( IF(cd.'.$category_custom_fields['RssLastExpired'].' IS NULL, 0, cd.'.$category_custom_fields['RssLastExpired'].') +
cd.'.$category_custom_fields['RssExpireInterval'].' * cd.'.$category_custom_fields['RssExpireIntervalType'].' <=
'.adodb_mktime().') AND (cd.'.$category_custom_fields['RssDeleteExpired'].' = 1)';
$categories = $this->Conn->GetCol($sql, 'ResourceId');
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$ci_table = $this->Application->getUnitOption($event->Prefix.'-ci', 'TableName');
if ($categories) {
$article_custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName');
$sql = 'SELECT main_table.'.$id_field.'
FROM '.$table.' main_table
LEFT JOIN '.$ci_table.' ci ON main_table.ResourceId = ci.ItemResourceId
LEFT JOIN '.$article_custom_table.' cd ON main_table.ResourceId = cd.ResourceId
WHERE (ci.PrimaryCat = 1) AND
(ci.CategoryId IN ('.implode(',', $categories).')) AND
(main_table.EndOn < '.adodb_mktime().' AND main_table.EndOn IS NOT NULL) AND
(LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)';
$article_ids = $this->Conn->GetCol($sql);
if ($article_ids) {
$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
$temp->DeleteItems($event->Prefix, $event->Special, $article_ids);
}
$sql = 'UPDATE '.$custom_table.'
SET '.$category_custom_fields['RssLastExpired'].' = '.adodb_mktime().'
WHERE ResourceId IN ('.implode(',', array_keys($categories)).')';
$this->Conn->Query($sql);
}
}
/**
* Returns article ids & crc, that are created during feed import
*
* @param kEvent $event
* @return Array
*/
function getFeedArticles(&$event)
{
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName');
$crc_field = $event->getEventParam('custom_fields', 'RssArticleCRC');
$sql = 'SELECT main_table.'.$id_field.', cd.'.$crc_field.'
FROM '.$table.' main_table
LEFT JOIN '.$custom_table.' cd ON cd.ResourceId = main_table.ResourceId
WHERE LENGTH(cd.'.$crc_field.') > 0';
return $this->Conn->GetCol($sql, $crc_field);
}
/**
* Creates new, updates existing articles from feed url specified
*
* @param kEvent $event
*/
function parseFeed(&$event)
{
$source_urls = explode(',', $event->getEventParam('source_url'));
if (count($source_urls) > 1) {
foreach ($source_urls as $source_url) {
$event->setEventParam('source_url', $source_url);
$this->parseFeed($event);
}
return true;
}
$curl_helper =& $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->followLocation = true;
$curl_helper->setOptions( Array (CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.2; ru; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)') ); // otherwise FeedBurner will return HTML
$xml_data = $curl_helper->Send($event->getEventParam('source_url'));
if (!$xml_data) {
return false;
}
$xml_helper =& $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$root_node =& $xml_helper->Parse($xml_data, XML_WITH_TEXT_NODES);
$feed_types = Array (
'rss_2.0' => 'channel', 'atom' => 'feed',
);
foreach ($feed_types as $feed_type => $node_name) {
$article_node =& $root_node->FindChild($node_name);
if (is_object($article_node)) {
break;
}
}
if (!$article_node) {
return false;
}
$category_id = $event->getEventParam('category_id');
$backup_category_id = $this->Application->GetVar('m_cat_id');
$this->Application->SetVar('m_cat_id', $category_id);
switch ($feed_type) {
case 'rss_2.0':
$this->parseRssFeed($article_node, $event);
break;
case 'atom':
$this->parseAtomFeed($article_node, $event);
break;
}
$this->Application->SetVar('m_cat_id', $backup_category_id);
}
/**
* Returns ML field names for article record
*
* @return Array
*/
function _getMLFields()
{
$title_field = 'Title';
$body_field = 'Body';
$fields = $this->Application->getUnitOption($this->Prefix, 'Fields');
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$title_formatter = array_key_exists('formatter', $fields[$title_field]) ? $fields[$title_field]['formatter'] : false;
if ($title_formatter == 'kMultiLanguage') {
$title_field = $ml_formatter->LangFieldName($title_field);
}
$body_formatter = array_key_exists('formatter', $fields[$body_field]) ? $fields[$body_field]['formatter'] : false;
if ($body_formatter == 'kMultiLanguage') {
$body_field = $ml_formatter->LangFieldName($body_field);
}
return Array ($title_field, $body_field);
}
/**
* Parses RSS 2.0 feed
*
* @param kXMLNode $root_node
* @param kEvent $event
*/
function parseRssFeed(&$root_node, &$event)
{
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
$object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
list ($title_field, $body_field) = $this->_getMLFields();
do {
// IMAGE is information about channel and is not useful here
if ($current_node->Name != 'ITEM') continue;
// collect item data
$data = Array();
$sub_node =& $current_node->firstChild;
/* @var $sub_node kXMLNode */
do {
if ($sub_node->Name == 'ATOM:SUMMARY') {
$data[$sub_node->Name] = $this->getNodeContent($sub_node);
} else {
$data[$sub_node->Name] = $this->getNodeContent($sub_node, 'xhtml'); // $sub_node->firstChild->Data; // was $sub_node->Data;
}
} while ( ($sub_node =& $sub_node->NextSibling()) );
// create/update article
$article_crc = crc32($data['LINK'].$data['TITLE']);
$article_id = getArrayValue($feed_articles, $article_crc);
if ($article_id) {
$object->Load($article_id);
}
else {
$object->Clear();
}
$object->SetDBField($title_field, $data['TITLE']);
$object->SetDBField('cust_RssOriginalURL', $data['LINK']);
$object->SetDBField('cust_RssArticleCRC', $article_crc);
$object->SetDBField($body_field, !array_key_exists('DESCRIPTION', $data) ? $data['ATOM:SUMMARY'] : $data['DESCRIPTION']);
$expiration_time = adodb_mktime() + $event->getEventParam('life_time');
$object->SetDBField('EndOn_date', $expiration_time);
$object->SetDBField('EndOn_time', $expiration_time);
$object->SetDBField('Status', STATUS_ACTIVE);
$object->SetDBField('Author', 'root');
$object->SetDBField('CreatedById', USER_ROOT);
$status = $object->isLoaded() ? $object->Update() : $object->Create();
} while (($current_node =& $current_node->NextSibling()));
}
/**
* Returns parsed node content
*
* @param kXMLNode $node
* @param string $content_type
* @return string
*/
function getNodeContent(&$node, $content_type = null)
{
- if (!isset($content_type)) {
- $content_type = array_key_exists('TYPE', $node->Attributes) ? $node->Attributes['TYPE'] : false;
+ if ( !isset($content_type) ) {
+ $content_type = $node->GetAttribute('TYPE');
}
switch ($content_type) {
case 'xhtml':
$data = $node->GetXML(true);
break;
case 'html':
- $data = unhtmlentities($node->firstChild->Data); // $node->Data
+ $data = unhtmlentities( $node->GetXML(true) ); // $node->firstChild->Data // $node->Data
break;
default:
- $data = $node->firstChild->Data; // $node->Data; also for 'text'
+ $data = $node->GetXML(true); // $node->firstChild->Data; // $node->Data; also for 'text'
break;
}
return trim($data);
}
/**
* Parses ATOM feed
*
* @param kXMLNode $root_node
* @param kEvent $event
*/
function parseAtomFeed(&$root_node, &$event)
{
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
$object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
list ($title_field, $body_field) = $this->_getMLFields();
do {
if ($current_node->Name != 'ENTRY') continue;
// collect item data
$data = Array();
$sub_node =& $current_node->firstChild;
/* @var $sub_node kXMLNode */
do {
if ($sub_node->Name == 'LINK') {
- if ($sub_node->Attributes['REL'] == 'alternate') {
- $data[$sub_node->Name] = $sub_node->Attributes['HREF'];
+ if ($sub_node->GetAttribute('REL') === false || $sub_node->GetAttribute('REL') == 'alternate') {
+ $data[$sub_node->Name] = $sub_node->GetAttribute('HREF');
}
}
elseif ($sub_node->Name == 'CONTENT' || $sub_node->Name == 'SUMMARY' || $sub_node->Name == 'TITLE') {
$data[$sub_node->Name] = $this->getNodeContent($sub_node);
}
else {
- $data[$sub_node->Name] = $sub_node->firstChild->Data; // $sub_node->Data
+ $data[$sub_node->Name] = $sub_node->GetXML(true); // firstChild->Data; // $sub_node->Data
}
} while ( ($sub_node =& $sub_node->NextSibling()) );
// create/update article
$article_crc = crc32($data['LINK'].$data['TITLE']);
$article_id = getArrayValue($feed_articles, $article_crc);
if ($article_id) {
$object->Load($article_id);
}
else {
$object->Clear();
}
$object->SetDBField($title_field, $data['TITLE']);
$object->SetDBField('cust_RssOriginalURL', $data['LINK']);
$object->SetDBField('cust_RssArticleCRC', $article_crc);
$object->SetDBField($body_field, !array_key_exists('CONTENT', $data) ? $data['SUMMARY'] : $data['CONTENT']);
$expiration_time = adodb_mktime() + $event->getEventParam('life_time');
$object->SetDBField('EndOn_date', $expiration_time);
$object->SetDBField('EndOn_time', $expiration_time);
$object->SetDBField('Status', STATUS_ACTIVE);
$object->SetDBField('Author', 'root');
$object->SetDBField('CreatedById', USER_ROOT);
$status = $object->isLoaded() ? $object->Update() : $object->Create();
} while (($current_node =& $current_node->NextSibling()));
}
function getCustomColumns($prefix)
{
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
$custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields'));
foreach ($custom_fields as $custom_name => $custom_id) {
$custom_fields[$custom_name] = $ml_formatter->LangFieldName('cust_'.$custom_id);
}
return $custom_fields;
}
/**
* Create missing excerpt
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$this->createExcerpt($event);
$this->cacheItemOwner($event, 'CreatedById', 'Author');
}
/**
* Create missing excerpt
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$this->createExcerpt($event);
$this->cacheItemOwner($event, 'CreatedById', 'Author');
}
/**
* Create excerpt if missing
*
* @param kEvent $event
*/
function createExcerpt(&$event)
{
$object =& $event->getObject();
if (!$object->GetField('Excerpt') || $this->Application->GetVar('generate_excerpt')) {
$excerpt = strip_tags( $object->GetField('Body') );
$length = mb_strlen($excerpt);
if ($length > 100) {
$excerpt = mb_substr(strip_tags($excerpt), 0, 100);
if (mb_substr($excerpt,-1) != ' ') {
$pos = mb_strrpos($excerpt, ' ');
if ($pos) {
$excerpt = mb_substr($excerpt, 0, $pos);
}
}
$excerpt .= '...';
}
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$object->SetDBField($ml_formatter->LangFieldName('Excerpt'), $excerpt);
}
}
/**
* [HOOK] Updates category custom fields options in config
*
* @param kEvent $event
*/
function OnUpdateCategoryCustomFields(&$event)
{
$new_virtual_fields = Array(
'cust_RssSource' => Array('type' => 'string', 'default' => ''),
- 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssDefaultExpiration' => Array('type' => 'int', 'default' => ''),
'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60),
- 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssExpireInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0),
- 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssUpdateInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
);
$virtual_fields = $this->Application->getUnitOption('c', 'VirtualFields');
$virtual_fields = array_merge_recursive2($virtual_fields, $new_virtual_fields);
$this->Application->setUnitOption('c', 'VirtualFields', $virtual_fields);
}
/**
* Sets default expiration based on module setting
*
* @param kEvent $event
*/
function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
if ($event->status == erSUCCESS) {
$object =& $event->getObject();
$archive_days = $this->Application->ConfigValue('News_Archive');
if ($archive_days) {
$expire_date = adodb_mktime() + $archive_days * 3600 * 24;
$object->SetDBField('EndOn_date', $expire_date);
$object->SetDBField('EndOn_time', $expire_date);
}
}
}
/**
* [HOOK] Allows to add cloned subitem to given prefix
*
* @param kEvent $event
*/
function OnCloneSubItem(&$event)
{
parent::OnCloneSubItem($event);
if ($event->MasterEvent->Prefix == 'rev') {
$clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones');
$subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix;
$clones[$subitem_prefix]['ConfigMapping'] = Array (
'PerPage' => 'Perpage_NewsReviews',
'ShortListPerPage' => 'Perpage_NewsReviews_Short',
'DefaultSorting1Field' => 'News_SortReviews',
'DefaultSorting2Field' => 'News_SortReviews2',
'DefaultSorting1Dir' => 'News_SortReviewsOrder',
'DefaultSorting2Dir' => 'News_SortReviewsOrder2',
'ReviewDelayInterval' => 'News_ReviewDelay_Interval',
'ReviewDelayValue' => 'News_ReviewDelay_Value',
);
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
}
}
}
\ No newline at end of file
Index: branches/5.2.x/admin_templates/export.tpl
===================================================================
--- branches/5.2.x/admin_templates/export.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/export.tpl (revision 14091)
@@ -1,127 +1,123 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n.export" section="in-portal:browse" perm_section="NEWS" permission_type="VIEW" system_permission="0" title_preset="articles_export"/>
<!-- 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() {
document.getElementById('hidden_export_columns').value = select_to_string('<inp2:n.export_InputName field="ExportColumns"/>');
submit_event('n.export','OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n.export','OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:n.export_SaveWarning name="grid_save_warning"/>
<inp2:n.export_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="n.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="n.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="n.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="n.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="n.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.export" field="ExportColumns" title="la_fld_ExportColumns"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.export" field="ExportColumns" title="la_fld_ExportColumns">
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:n.export_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:n.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:n.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:n.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="hidden_export_columns" name="<inp2:n.export_InputName field="ExportColumns"/>" value="<inp2:n.export_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:n.export_InputName field="AvailableColumns"/>', '<inp2:n.export_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/spacer.gif" width="1" height="4" alt=""><br>
<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:n.export_InputName field="ExportColumns"/>', '<inp2:n.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.export_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:n.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:n.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.export" field="ExportColumns"/>
- </tr>
+ </inp2:m_RenderElement>
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.export" field="CategoryFormat" title="la_fld_CategoryFormat"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.export" field="CategoryFormat" title="la_fld_CategoryFormat">
<td class="control-cell">
<table cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" valign="top">
<input type="radio"<inp2:m_if check="n.export_FieldEquals" field="CategoryFormat" value="1"> checked</inp2:m_if> name="<inp2:n.export_InputName field="CategoryFormat"/>" id="<inp2:n.export_InputName field="CategoryFormat"/>_1" value="1" />
</td>
<td>
<label for="<inp2:n.export_InputName field="CategoryFormat"/>_1"><inp2:m_phrase label="la_MixedCategoryPath"/></label>
</td>
</tr>
<tr>
<td>
<span class="<inp2:m_if check="n.export_HasError" field="CategorySeparator">error</inp2:m_if>"><inp2:m_phrase name="la_fld_CategorySeparator"/></span><inp2:m_if check="n.export_IsRequired" field="CategorySeparator"><span class="error"> *</span></inp2:m_if>:
<input type="text" name="<inp2:n.export_InputName field="CategorySeparator"/>" id="<inp2:n.export_InputName field="CategorySeparator"/>" value="<inp2:n.export_Field field="CategorySeparator"/>" size="2" maxlength="1" /><br />
(will look like "Category:Sub-category:Sub-sub-category")
</td>
</tr>
<tr>
<td rowspan="2" valign="top">
<input type="radio"<inp2:m_if check="n.export_FieldEquals" field="CategoryFormat" value="2"> checked</inp2:m_if> name="<inp2:n.export_InputName field="CategoryFormat"/>" id="<inp2:n.export_InputName field="CategoryFormat"/>_2" value="2" />
</td>
<td>
<label for="<inp2:n.export_InputName field="CategoryFormat"/>_2"><inp2:m_phrase label="la_SeparatedCategoryPath"/></label><br />
(the fields will be titled Category1..CategoryN accordingly)
</td>
</tr>
</table>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.export" field="CategoryFormat"/>
- </tr>
+ </inp2:m_RenderElement>
<inp2:m_if check="m_GetEquals" name="m_cat_id" value="0" inverse="inverse">
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_box" prefix="n.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/export_finish.tpl
===================================================================
--- branches/5.2.x/admin_templates/export_finish.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/export_finish.tpl (revision 14091)
@@ -1,43 +1,43 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n.export" section="in-portal:browse" perm_section="NEWS" permission_type="VIEW" system_permission="0" title_preset="articles_export"/>
<!-- 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('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
submit_event('n.export', 'OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_phrase label="la_DownloadExportFile"/>
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<a href="<inp2:n.export_ExportPath as_url="1"/>"><inp2:n.export_ExportPath /></a>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/file_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/file_edit.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/file_edit.tpl (revision 14091)
@@ -1,41 +1,41 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n" section="in-portal:browse" title_preset="file_edit"/>
<!-- 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-file','<inp2:n-file_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n-file','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:n-file_SaveWarning name="grid_save_warning"/>
<inp2:n-file_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_File!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_File"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-file" field="ResourceId"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="n-file" field="FileName" title="la_fld_Name" size="50" />
<inp2:m_RenderElement name="inp_edit_upload" prefix="n-file" field="FilePath" title="la_fld_FilePath" />
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-file" field="Status" title="la_fld_Enabled" onchange="check_primary()" />
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/relations_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/relations_edit.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/relations_edit.tpl (revision 14091)
@@ -1,49 +1,49 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n" section="in-portal:browse" title_preset="relations_edit"/>
<!-- 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-rel','<inp2:n-rel_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n-rel','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:n-rel_SaveWarning name="grid_save_warning"/>
<inp2:n-rel_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_Relation!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_Relation"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-rel" field="SourceId"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-rel" field="SourceType"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-rel" field="TargetId"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-rel" field="TargetType"/>
- <inp2:m_RenderElement name="inp_id_label" prefix="n-rel" field="RelationshipId" title="!la_fld_Id!"/>
- <inp2:m_RenderElement name="inp_edit_relation" prefix="n-rel" field="TargetId" title="!la_fld_TargetId!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n-rel" field="Type" title="!la_fld_RelationshipType!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-rel" field="Enabled" title="!la_fld_Enabled!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n-rel" field="Priority" title="!la_fld_Priority!" size="4"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="n-rel" field="RelationshipId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_relation" prefix="n-rel" field="TargetId" title="la_fld_TargetId"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n-rel" field="Type" title="la_fld_RelationshipType"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-rel" field="Enabled" title="la_fld_Enabled"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n-rel" field="Priority" title="la_fld_Priority" size="4"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/articles_relations.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_relations.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_relations.tpl (revision 14091)
@@ -1,105 +1,105 @@
<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_relations" pagination="1" pagination_prefix="n-rel" 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') );
//Relations related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('n-rel', '<inp2:adm_SelectorLink prefix="n-rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600');
} ) );
function edit()
{
std_edit_temp_item('n-rel', 'in-news/articles/relations_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('n-rel')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('n-rel','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('n-rel','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
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>
<inp2:m_RenderElement name="search_main_toolbar" prefix="n-rel" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="n-rel" IdField="RelationshipId" grid="Default" menu_filters="yes"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="n-rel" IdField="RelationshipId" grid="Default"/>
<script type="text/javascript">
Grids['n-rel'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
</script>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/review_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/review_edit.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/review_edit.tpl (revision 14091)
@@ -1,59 +1,59 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n" section="in-portal:browse" title_preset="reviews_edit"/>
<!-- 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-rev','<inp2:n-rev_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n-rev','OnCancel');
}
) );
a_toolbar.Render();
<inp2:m_if check="n-rev_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="n-rev_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="n-rev_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:n-rev_SaveWarning name="grid_save_warning"/>
<inp2:n-rev_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Review!"/>
+ <inp2:m_RenderElement name="subsection" title="la_Text_Review"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-rev" field="ItemId"/>
<inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="n-rev" field="TextFormat"/>
- <inp2:m_RenderElement name="inp_label" prefix="n-rev" field="ReviewId" title="!la_fld_Id!"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="n-rev" field="CreatedById" title="!la_fld_CreatedById!" class="text"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="n-rev" field="ReviewText" title="!la_fld_ReviewText!" cols="70" rows="8"/>
- <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n-rev" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n-rev" field="Priority" title="!la_fld_Priority!" size="3" class="text"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="n-rev" field="CreatedOn" title="!la_fld_CreatedOn!" size="20" class="text"/>
+ <inp2:m_RenderElement name="inp_label" prefix="n-rev" field="ReviewId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_user" prefix="n-rev" field="CreatedById" title="la_fld_CreatedById" class="text"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="n-rev" field="ReviewText" title="la_fld_ReviewText" cols="70" rows="8"/>
+ <inp2:m_RenderElement name="subsection" title="la_Text_General"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n-rev" field="Status" title="la_fld_Status"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n-rev" field="Priority" title="la_fld_Priority" size="3" class="text"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="n-rev" field="CreatedOn" title="la_fld_CreatedOn" size="20" class="text"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/articles_files.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_files.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_files.tpl (revision 14091)
@@ -1,86 +1,86 @@
<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_files" pagination="1" pagination_prefix="n-file" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('n-file', 'in-news/articles/file_edit');
}
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.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewFile" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('n-file', 'in-news/articles/file_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('n-file')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="n_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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>
<inp2:m_RenderElement name="search_main_toolbar" prefix="n-file" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="n-file" IdField="FileId" grid="Default" menu_filters="yes"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="n-file" IdField="FileId" grid="Default"/>
<script type="text/javascript">
Grids['n-file'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/articles_reviews.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_reviews.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_reviews.tpl (revision 14091)
@@ -1,114 +1,114 @@
<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_reviews" pagination="1" pagination_prefix="n-rev" 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') );
//Pricing related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewReview" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('n-rev', 'in-news/articles/review_edit')
} ) );
function edit()
{
std_edit_temp_item('n-rev', 'in-news/articles/review_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('n-rev')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('n-rev','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('n-rev','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('n-rev','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('n-rev','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="n_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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>
<inp2:m_RenderElement name="search_main_toolbar" prefix="n-rev" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="reviewtext_checkbox_td">
<inp2:Field field="$field" no_special="no_special" cut_first="100"/>
</inp2:m_DefineElement>
-<inp2:m_RenderElement name="grid" PrefixSpecial="n-rev" IdField="ReviewId" grid="Default" menu_filters="yes"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="n-rev" IdField="ReviewId" grid="Default"/>
<script type="text/javascript">
Grids['n-rev'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/images_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/images_edit.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/images_edit.tpl (revision 14091)
@@ -1,60 +1,60 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="n" section="in-portal:browse" title_preset="images_edit"/>
<inp2:m_include t="incs/image_blocks"/>
<!-- 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-img','<inp2:n-img_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n-img','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:n-img_SaveWarning name="grid_save_warning"/>
<inp2:n-img_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_Image!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_Image"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="n-img" field="ResourceId"/>
- <inp2:m_RenderElement name="inp_label" prefix="n-img" field="ImageId" title="!la_fld_Id!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="n-img" field="ImageId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="Name" title="!la_fld_Name!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="AltName" title="!la_fld_AltValue!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="Name" title="la_fld_Name" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="AltName" title="la_fld_AltValue" size="40"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()" />
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="DefaultImg" title="!la_fld_Primary!" onchange="check_status()" />
- <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="Priority" title="!la_fld_Priority!" size="5"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="Enabled" title="la_fld_Enabled" onchange="check_primary()" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="DefaultImg" title="la_fld_Primary" onchange="check_status()" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n-img" field="Priority" title="la_fld_Priority" size="5"/>
- <inp2:m_RenderElement name="subsection" title="!la_section_ThumbnailImage!"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_ThumbnailImage"/>
<inp2:m_RenderElement name="thumbnail_section" prefix="n-img"/>
- <inp2:m_RenderElement name="subsection" title="!la_section_FullSizeImage!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="SameImages" title="!la_fld_SameAsThumb!" onchange="toggle_fullsize()"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_FullSizeImage"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n-img" field="SameImages" title="la_fld_SameAsThumb" onchange="toggle_fullsize()"/>
<inp2:m_RenderElement name="fullsize_section" prefix="n-img"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript">
<inp2:m_RenderElement name="images_edit_js" prefix="n-img"/>
toggle_fullsize();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/articles_categories.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_categories.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_categories.tpl (revision 14091)
@@ -1,84 +1,84 @@
<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_categories" pagination="1" pagination_prefix="n-ci" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit(){ }
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') );
//Category related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('n', '<inp2:adm_SelectorLink prefix="n" selection_mode="multi" tab_prefixes="none"/>', 'ItemCategory');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('n-ci')
} ) );
a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('n-ci','OnSetPrimary');
}
) );
a_toolbar.Render();
<inp2:m_if check="n_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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>
<inp2:m_RenderElement name="search_main_toolbar" prefix="n-ci" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_checkbox_category_td">
- <inp2:CategoryName field="$field" primary_title="!la_PrimaryCategory!" no_special="1"/>
+ <inp2:CategoryName field="$field" primary_title="la_PrimaryCategory" no_special="1"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="n-ci" IdField="CategoryId" grid="Default"/>
<script type="text/javascript">
Grids['n-ci'].SetDependantToolbarButtons( new Array('delete','setprimary') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/articles/articles_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_edit.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_edit.tpl (revision 14091)
@@ -1,146 +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_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_textarea" prefix="n" field="Body" title="!la_fld_Body!" control_options="{min_height: 100}" cols="70" rows="8" display_original="1"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="n" field="Body" title="la_fld_Body" control_options="{min_height: 100}" cols="70" rows="8" display_original="1"/>
<!-- excerpt: begin -->
- <inp2:m_if check="n_FieldVisible" field="Excerpt">
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" 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 />
- <script type="text/javascript">
- Form.addControl('<inp2:n_InputName field="Excerpt"/>', {min_height: 100});
- </script>
- <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 name="inp_edit_error" prefix="n" field="Excerpt"/>
-
- <inp2:m_if check="n_DisplayOriginal" pass_params="1">
- <inp2:m_RenderElement prefix="n" field="Excerpt" name="inp_original_label"/>
- </inp2:m_if>
- </tr>
- </inp2:m_if>
+ <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 />
+ <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_if check="n_FieldVisible" field="Status">
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n" field="Status" title="!la_fld_Status!"/>
- <td class="control-cell">
- <inp2:m_Phrase label="la_UseGridToApproveDecline" />
- </td>
- </tr>
- </inp2:m_if>
+ <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_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_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="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"/>
+ <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.2.x/admin_templates/articles/articles_images.tpl
===================================================================
--- branches/5.2.x/admin_templates/articles/articles_images.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/articles/articles_images.tpl (revision 14091)
@@ -1,107 +1,107 @@
<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_images" pagination="1" pagination_prefix="n-img" tab_preset="Default"/>
<inp2:m_include t="incs/image_blocks"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('n-img', 'in-news/articles/images_edit');
}
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.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('n-img', 'in-news/articles/images_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('n-img')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('n-img','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('n-img','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('n-img','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="n_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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>
<inp2:m_RenderElement name="search_main_toolbar" prefix="n-img" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="n-img" IdField="ImageId" grid="Default" menu_filters="yes"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="n-img" IdField="ImageId" grid="Default"/>
<script type="text/javascript">
Grids['n-img'].SetDependantToolbarButtons( new Array('edit','delete','move_up','move_down','setprimary') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/category_properties.tpl
===================================================================
--- branches/5.2.x/admin_templates/category_properties.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/category_properties.tpl (revision 14091)
@@ -1,32 +1,28 @@
<inp2:m_RenderElement name="subsection" title="la_In-news"/>
<inp2:m_DefineElement name="inp_edit_type" class="" is_last="" maxlength="" onblur="" size="" is_last="" has_empty="0" empty_value="" onchange="" hint_label="" type_field="">
- <inp2:m_if check="{$prefix}_FieldVisible" field="$field">
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" hint_label="$hint_label" is_last="$is_last"/>
- <td class="control-cell">
- <input type="text" name="<inp2:{$prefix}_InputName field="$field" />" id="<inp2:{$prefix}_InputName field="$field" />" value="<inp2:{$prefix}_Field field="$field" />" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+ <inp2:m_RenderElement design="form_row" pass_params="1">
+ <td class="control-cell">
+ <input type="text" name="<inp2:{$prefix}_InputName field="$field" />" id="<inp2:{$prefix}_InputName field="$field" />" value="<inp2:{$prefix}_Field field="$field" />" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
- <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="$type_field"/>" id="<inp2:{$prefix}_InputName field="$type_field"/>" onchange="<inp2:m_Param name="onchange"/>">
- <inp2:m_if check="{$prefix}_FieldOption" field="$type_field" option="use_phrases">
- <inp2:{$prefix}_PredefinedOptions field="$type_field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
- <inp2:m_else/>
- <inp2:{$prefix}_PredefinedOptions field="$type_field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
- </inp2:m_if>
- </select>
- </td>
- <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
- </tr>
- </inp2:m_if>
+ <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="$type_field"/>" id="<inp2:{$prefix}_InputName field="$type_field"/>" onchange="<inp2:m_Param name="onchange"/>">
+ <inp2:m_if check="{$prefix}_FieldOption" field="$type_field" option="use_phrases">
+ <inp2:{$prefix}_PredefinedOptions field="$type_field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
+ <inp2:m_else/>
+ <inp2:{$prefix}_PredefinedOptions field="$type_field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
+ </inp2:m_if>
+ </select>
+ </td>
+ </inp2:m_RenderElement>
</inp2:m_DefineElement>
-<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_n_ItemTemplate" type_field="cust_n_ItemTemplate" title="!la_fld_cust_n_ItemTemplate!" size="50"/>
+<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_n_ItemTemplate" type_field="cust_n_ItemTemplate" title="la_fld_cust_n_ItemTemplate" size="50"/>
-<inp2:m_RenderElement name="subsection" title="!la_section_RssProperties!"/>
-<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_RssSource" type_field="cust_RssSource" title="!la_fld_RssSource!" size="50"/>
-<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssUpdateInterval" type_field="cust_RssUpdateIntervalType" title="!la_fld_RssUpdateInterval!" has_empty="1"/>
+<inp2:m_RenderElement name="subsection" title="la_section_RssProperties"/>
+<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_RssSource" type_field="cust_RssSource" title="la_fld_RssSource" size="50"/>
+<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssUpdateInterval" type_field="cust_RssUpdateIntervalType" title="la_fld_RssUpdateInterval" has_empty="1"/>
-<inp2:m_RenderElement name="subsection" title="!la_section_RssExpiration!"/>
-<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssDefaultExpiration" type_field="cust_RssDefaultExpirationType" title="!la_fld_RssDefaultExpiration!" has_empty="1"/>
-<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssExpireInterval" type_field="cust_RssExpireIntervalType" title="!la_fld_RssExpireInterval!" has_empty="1"/>
-<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="cust_RssDeleteExpired" title="!la_fld_RssDeleteExpired!"/>
+<inp2:m_RenderElement name="subsection" title="la_section_RssExpiration"/>
+<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssDefaultExpiration" type_field="cust_RssDefaultExpirationType" title="la_fld_RssDefaultExpiration" has_empty="1"/>
+<inp2:m_RenderElement name="inp_edit_type" prefix="c" field="cust_RssExpireInterval" type_field="cust_RssExpireIntervalType" title="la_fld_RssExpireInterval" has_empty="1"/>
+<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="cust_RssDeleteExpired" title="la_fld_RssDeleteExpired"/>
Index: branches/5.2.x/admin_templates/import.tpl
===================================================================
--- branches/5.2.x/admin_templates/import.tpl (revision 14090)
+++ branches/5.2.x/admin_templates/import.tpl (revision 14091)
@@ -1,232 +1,223 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:n.import_PresetFormFields/>
<inp2:m_RenderElement name="combined_header" prefix="adm" section="in-portal:main_import" title_preset="import"/>
<!-- 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('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:n.import_InputName field="ExportColumns"/>');
submit_event('n.import','OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('n.import','OnGoBack');
}
) );
a_toolbar.Render();
function check_radio($id)
{
document.getElementById($id).checked = true;
}
// gets value of checked radio button
function get_checked($field_name) {
var $ret = false;
var $fields = document.getElementsByName($field_name);
for(var $i = 0; $i < $fields.length; $i++) {
if ($fields[$i].checked) {
$ret = $fields[$i].value;
break;
}
}
return $ret;
}
// enable/disable form fields based on other field values
function reflectFormFields()
{
var $auto_fields = get_checked('<inp2:n.import_InputName field="FieldTitles"/>') == 1 ? true : false;
if ($auto_fields) {
document.getElementById('_cb_<inp2:n.import_InputName field="SkipFirstRow"/>').checked = true;
}
document.getElementById('_cb_<inp2:n.import_InputName field="SkipFirstRow"/>').onchange();
document.getElementById('<inp2:n.import_InputName field="ExportColumns"/>').disabled = $auto_fields;
document.getElementById('<inp2:n.import_InputName field="AvailableColumns"/>').disabled = $auto_fields;
var $btn = null;
var $btns = Array('up', 'down', 'left', 'right');
var $i = 0;
while ($i < $btns.length) {
$btn = document.getElementById('btn_move_'+$btns[$i]);
$btn.disabled = $auto_fields;
$btn.className = $auto_fields ? 'button-disabled' : 'button';
$i++;
}
}
Application.setHook('n.import:OnBeforeOpenSelector',
function() {
document.getElementById('export_columns').value = select_to_string('<inp2:n.import_InputName field="ExportColumns"/>');
}
);
$(document).ready(
function() {
$('#step_number').text(3);
}
);
</script>
</td>
</tr>
</tbody>
</table>
<inp2:n.import_SaveWarning name="grid_save_warning"/>
<inp2:n.import_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename"/>
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename">
<td class="control-cell">
<table border="0">
<tr>
<td>
<input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_1"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
</td>
<td>
<label for="<inp2:n.import_InputName field="ImportSource"/>_1">upload</label>
</td>
<td>
<input type="file" name="<inp2:n.import_InputName field="ImportFilename"/>" id="<inp2:n.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_1');">
</td>
</tr>
<tr>
<td>
<input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_2"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
</td>
<td>
<label for="<inp2:n.import_InputName field="ImportSource"/>_2">select</label>
</td>
<td>
<select name="<inp2:n.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_2');">
<inp2:n.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.import" field="ImportSource"/>
- </tr>
+ </inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:n.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:n.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="export_columns" name="<inp2:n.import_InputName field="ExportColumns"/>" value="<inp2:n.import_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" id="btn_move_left" onclick="move_selected('<inp2:n.import_InputName field="AvailableColumns"/>', '<inp2:n.import_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/spacer.gif" width="1" height="4" alt=""><br>
<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" id="btn_move_right" onclick="move_selected('<inp2:n.import_InputName field="ExportColumns"/>', '<inp2:n.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.import_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:n.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:n.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.import" field="ExportColumns"/>
- </tr>
+ </inp2:m_RenderElement>
<!-- CATEGORY SELECTOR: BEGIN -->
<inp2:m_DefineElement name="root_cat_caption">
<inp2:m_Phrase name="la_rootcategory_name"/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="category_caption">
<inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory">
<td class="control-cell">
<b><inp2:n.import_CategoryPath separator=" &gt; " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
<input type="hidden" name="<inp2:n.import_InputName field='CategoryId'/>" value="<inp2:n.import_Field field='CategoryId' db='db'/>" />
<a href="javascript:openSelector('n.import', '<inp2:adm_SelectorLink prefix="n.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.import" field="CategoryId"/>
- </tr>
+ </inp2:m_RenderElement>
<!-- CATEGORY SELECTOR: END -->
<inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
- <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
<td class="control-cell">
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
</td>
<td>
<label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: ARTICLEID</label>
</td>
</tr>
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
</td>
<td>
<label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
<inp2:n.import_PredefinedOptions prefix="n.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
<inp2:m_RenderElement prefix="n.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
</td>
</tr>
</table>
</td>
- <inp2:m_RenderElement name="inp_edit_error" prefix="n.import" field="CheckDuplicatesMethod"/>
- </tr>
+ </inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/install/upgrades.php
===================================================================
--- branches/5.2.x/install/upgrades.php (revision 14090)
+++ branches/5.2.x/install/upgrades.php (revision 14091)
@@ -1,126 +1,129 @@
<?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 {
function InNewsUpgrades()
{
parent::kHelper();
$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'),
);
}
/**
* 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') {
$root_category = $this->Application->findModule('Name', 'In-News', 'RootCat');
$sql = 'UPDATE ' . $this->Application->getUnitOption('c', 'TableName') . '
SET UseMenuIconUrl = 1, MenuIconUrl = "in-news/img/menu_articles.gif"
WHERE ' . $this->Application->getUnitOption('c', 'IDField') . ' = ' . $root_category;
$this->Conn->Query($sql);
$this->_updateDetailTemplate('n', 'innews/detail', 'in-news/designs/detail');
}
}
/**
* Replaces deprecated detail template design with new one
*
* @param string $prefix
* @param string $from_template
* @param string $to_template
*/
function _updateDetailTemplate($prefix, $from_template, $to_template)
{
$sql = 'SELECT CustomFieldId
FROM ' . TABLE_PREFIX . 'CustomField
WHERE FieldName = "' . $prefix . '_ItemTemplate"';
$custom_field_id = $this->Conn->GetOne($sql);
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$field = $ml_formatter->LangFieldName('cust_' . $custom_field_id, true);
$sql = 'UPDATE ' . TABLE_PREFIX . 'CategoryCustomData
SET ' . $field . ' = "' . $to_template . '"
WHERE ' . $field . ' = "' . $from_template . '"';
$this->Conn->Query($sql);
}
/**
* 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.2.x/install/install_schema.sql
===================================================================
--- branches/5.2.x/install/install_schema.sql (revision 14090)
+++ branches/5.2.x/install/install_schema.sql (revision 14091)
@@ -1,86 +1,86 @@
CREATE TABLE News (
NewsId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(255) NOT NULL DEFAULT '',
l1_Title varchar(255) NOT NULL DEFAULT '',
l2_Title varchar(255) NOT NULL DEFAULT '',
l3_Title varchar(255) NOT NULL DEFAULT '',
l4_Title varchar(255) NOT NULL DEFAULT '',
l5_Title varchar(255) NOT NULL DEFAULT '',
AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Excerpt text,
l1_Excerpt text,
l2_Excerpt text,
l3_Excerpt text,
l4_Excerpt text,
l5_Excerpt text,
Author varchar(255) NOT NULL DEFAULT '',
Body text,
l1_Body text,
l2_Body text,
l3_Body text,
l4_Body text,
l5_Body text,
MetaKeywords varchar(255) DEFAULT NULL,
MetaDescription text,
CreatedOn int(11) DEFAULT NULL,
TextFormat int(11) NOT NULL DEFAULT '0',
EndOn int(11) DEFAULT NULL,
Hits double(20,6) NOT NULL DEFAULT '0.000000',
CachedRating varchar(10) DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
LeadStory tinyint(4) NOT NULL DEFAULT '0',
LeadCatStory tinyint(4) NOT NULL DEFAULT '0',
ResourceId int(11) DEFAULT NULL,
CachedReviewsQty int(11) NOT NULL DEFAULT '0',
StartDate int(11) DEFAULT NULL,
NewItem tinyint(4) NOT NULL DEFAULT '2',
PopItem tinyint(4) NOT NULL DEFAULT '2',
HotItem tinyint(4) NOT NULL DEFAULT '2',
Archived int(11) NOT NULL DEFAULT '0',
Modified int(11) DEFAULT NULL,
- ModifiedById int(11) NOT NULL DEFAULT '-1',
+ ModifiedById int(11) DEFAULT NULL,
OrgId int(11) DEFAULT NULL,
PRIMARY KEY (NewsId),
UNIQUE KEY ResourceId (ResourceId),
KEY Title (Title),
KEY l1_Title (l1_Title),
KEY l2_Title (l2_Title),
KEY l3_Title (l3_Title),
KEY l4_Title (l4_Title),
KEY l5_Title (l5_Title),
KEY Excerpt (Excerpt(5)),
KEY l1_Excerpt (l1_Excerpt(5)),
KEY l2_Excerpt (l2_Excerpt(5)),
KEY l3_Excerpt (l3_Excerpt(5)),
KEY l4_Excerpt (l4_Excerpt(5)),
KEY l5_Excerpt (l5_Excerpt(5)),
KEY Body (Body(5)),
KEY l1_Body (l1_Body(5)),
KEY l2_Body (l2_Body(5)),
KEY l3_Body (l3_Body(5)),
KEY l4_Body (l4_Body(5)),
KEY l5_Body (l5_Body(5)),
KEY CreatedOn (CreatedOn),
KEY EndOn (EndOn),
KEY Priority (Priority),
KEY `Status` (`Status`),
KEY EditorsPick (EditorsPick),
KEY Hits (Hits),
KEY Modified (Modified),
KEY NewItem (NewItem),
KEY PopItem (PopItem),
KEY HotItem (HotItem),
KEY StartDate (StartDate),
KEY Archived (Archived)
);
CREATE TABLE NewsCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
\ No newline at end of file
Index: branches/5.2.x/install/upgrades.sql
===================================================================
--- branches/5.2.x/install/upgrades.sql (revision 14090)
+++ branches/5.2.x/install/upgrades.sql (revision 14091)
@@ -1,93 +1,102 @@
# ===== 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 =====
\ No newline at end of file
+# ===== 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 =====
\ No newline at end of file
Index: branches/5.2.x
===================================================================
--- branches/5.2.x (revision 14090)
+++ branches/5.2.x (revision 14091)
Property changes on: branches/5.2.x
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,2 ##
Merged /modules/in-news/releases/5.1.1:r14074-14090
Merged /modules/in-news/branches/5.1.x:r13843-14073

Event Timeline