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_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 StatItem VALUES (DEFAULT, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2);
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 14, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 13, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 11, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 12, 1, 0, {NewsCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 15, 0, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-news:innews_general.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-news:innews_general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.delete', 11, 1, 1, 0);
INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1');