INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0);

INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1);

INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '0', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '')
INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '<span class="match">', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '</span>', 'In-News', 'in-news:configuration_output')
INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output');
INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output');

INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search');
INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search');
INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search');
INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search');
INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search');

INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1)
INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1)
INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1)
INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0)
INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0)
INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0)
INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0)
INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0)
INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0)
INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0)
INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0)
INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0)
INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0)

INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article');

INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News');
INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News');

INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0);

INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1);
INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1);

INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory  = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2);
INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2);

INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0);

INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.3.0', 1, 2, 'innews/', {NewsCatId}, '1054738405');