'In-Portal;la_prompt_TotalCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2)",
'In-Portal;la_prompt_ActiveCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2)",
'In-Portal;la_prompt_PendingCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2)",
'In-Portal;la_prompt_DisabledCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2)",
'In-Portal;la_prompt_NewCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name=\"Category_DaysNew\"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewCategories', 0, 2)",
'In-Portal;la_prompt_CategoryEditorsPick' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) FROM <%prefix%>Category WHERE EditorsPick = 1', NULL, 'la_prompt_CategoryEditorsPick', 0, 2)",
'In-Portal;la_prompt_TopicsUsers' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2)",
'In-Portal;la_prompt_UsersActive' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2)",
'In-Portal;la_prompt_UsersPending' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2)",
'In-Portal;la_prompt_UsersDisabled' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser WHERE Status = 0', NULL, 'la_prompt_UsersDisabled', 0, 2)",
'In-Portal;la_prompt_UsersUniqueCountries' => "(DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2)",
'In-Portal;la_prompt_UsersUniqueStates' => "(DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2)",
'In-Portal;la_prompt_TotalUserGroups' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2)",
'In-Portal;la_prompt_BannedUsers' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2)",
'In-Portal;la_prompt_NonExpiredSessions' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2)",
'In-Portal;la_prompt_ThemeCount' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2)",
'In-Portal;la_prompt_RegionsCount' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2)",
'83' => "(83, 8, 'Product title link in list (shopping cart)', 'a.link-product-cart', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\ntext-decoration: none;\\r\\n\\r\\n', 0)",
'70' => "(70, 8, 'Product title link in list (category)', 'a.link-product-category', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\ntext-decoration: none;\\r\\n\\r\\n', 0)",
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 10.111, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users');
ALTER TABLE Category ADD SymLinkCategoryId INT UNSIGNED NULL DEFAULT NULL AFTER `Type`, ADD INDEX (SymLinkCategoryId);
ALTER TABLE ConfigurationValues CHANGE VariableValue VariableValue TEXT NULL DEFAULT NULL;
ALTER TABLE Language
ADD AdminInterfaceLang TINYINT UNSIGNED NOT NULL AFTER PrimaryLang,
ADD Priority INT NOT NULL AFTER AdminInterfaceLang;
UPDATE Language SET AdminInterfaceLang = 1 WHERE PrimaryLang = 1;
DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.';
ALTER TABLE SessionData CHANGE VariableValue VariableValue longtext NOT NULL;
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories');
ALTER TABLE Language ADD UserDocsUrl VARCHAR(255) NOT NULL;
UPDATE Category SET Template = CategoryTemplate WHERE CategoryTemplate <> '';
ALTER TABLE Category
ADD ThemeId INT UNSIGNED NOT NULL,
ADD INDEX (ThemeId),
ADD COLUMN UseExternalUrl tinyint(3) unsigned NOT NULL default '0' AFTER Template,
ADD COLUMN ExternalUrl varchar(255) NOT NULL default '' AFTER UseExternalUrl,
ADD COLUMN UseMenuIconUrl tinyint(3) unsigned NOT NULL default '0' AFTER ExternalUrl,
ADD COLUMN MenuIconUrl varchar(255) NOT NULL default '' AFTER UseMenuIconUrl,
CHANGE MetaKeywords MetaKeywords TEXT,
CHANGE MetaDescription MetaDescription TEXT,
CHANGE CachedCategoryTemplate CachedTemplate VARCHAR(255) NOT NULL,
DROP CategoryTemplate;
UPDATE Category SET l1_MenuTitle = l1_Name WHERE l1_MenuTitle = '' OR l1_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l2_MenuTitle = l2_Name WHERE l2_MenuTitle = '' OR l2_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l3_MenuTitle = l3_Name WHERE l3_MenuTitle = '' OR l3_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l4_MenuTitle = l4_Name WHERE l4_MenuTitle = '' OR l4_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l5_MenuTitle = l5_Name WHERE l5_MenuTitle = '' OR l5_MenuTitle LIKE '_Auto: %';
UPDATE Category SET Template = '/platform/designs/general' WHERE Template = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = '/platform/designs/general' WHERE CachedTemplate = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = Template WHERE Template <> '';
CREATE TABLE PageContent (
PageContentId int(11) NOT NULL auto_increment,
ContentNum int(11) NOT NULL default '0',
PageId int(11) NOT NULL default '0',
l1_Content text,
l2_Content text,
l3_Content text,
l4_Content text,
l5_Content text,
l1_Translated tinyint(4) NOT NULL default '0',
l2_Translated tinyint(4) NOT NULL default '0',
l3_Translated tinyint(4) NOT NULL default '0',
l4_Translated tinyint(4) NOT NULL default '0',
l5_Translated tinyint(4) NOT NULL default '0',
PRIMARY KEY (PageContentId),
KEY ContentNum (ContentNum,PageId)
);
CREATE TABLE FormFields (
FormFieldId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
Type int(11) NOT NULL default '0',
FieldName varchar(255) NOT NULL default '',
FieldLabel varchar(255) default NULL,
Heading varchar(255) default NULL,
Prompt varchar(255) default NULL,
ElementType varchar(50) NOT NULL default '',
ValueList varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
IsSystem tinyint(3) unsigned NOT NULL default '0',
Required tinyint(1) NOT NULL default '0',
DisplayInGrid tinyint(1) NOT NULL default '1',
DefaultValue text NOT NULL,
Validation TINYINT NOT NULL DEFAULT '0',
PRIMARY KEY (FormFieldId),
KEY `Type` (`Type`),
KEY FormId (FormId),
KEY Priority (Priority),
KEY IsSystem (IsSystem),
KEY DisplayInGrid (DisplayInGrid)
);
CREATE TABLE FormSubmissions (
FormSubmissionId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
SubmissionTime int(11) NOT NULL default '0',
PRIMARY KEY (FormSubmissionId),
KEY FormId (FormId),
KEY SubmissionTime (SubmissionTime)
);
CREATE TABLE Forms (
FormId int(11) NOT NULL auto_increment,
Title VARCHAR(255) NOT NULL DEFAULT '',
Description text,
PRIMARY KEY (FormId)
);
UPDATE Events SET Module = 'Core:Category', Description = 'la_event_FormSubmitted' WHERE Event = 'FORM.SUBMITTED';
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%img%';
UPDATE Modules SET TemplatePath = Path WHERE TemplatePath <> '';
UPDATE ConfigurationValues SET VariableValue = '/platform/designs/general' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_categories' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'cms_DefaultDesign';
UPDATE Phrase SET Phrase = 'la_Regular' WHERE Phrase = 'la_regular';
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_Hide', 'la_Show', 'la_fld_Requied', 'la_col_Modified', 'la_col_Referer', 'la_Regular');
UPDATE Phrase SET Phrase = 'la_title_Editing_E-mail' WHERE Phrase = 'la_title_editing_e-mail';
ALTER TABLE Phrase ADD UNIQUE (LanguageId, Phrase);
ALTER TABLE CustomField ADD IsRequired tinyint(3) unsigned NOT NULL default '0';
DELETE FROM Permissions
WHERE
(Permission LIKE 'proj-cms:structure%') OR
(Permission LIKE 'proj-cms:submissions%') OR
(Permission LIKE 'proj-base:users%') OR
(Permission LIKE 'proj-base:system_variables%') OR
(Permission LIKE 'proj-base:email_settings%') OR
(Permission LIKE 'proj-base:other_settings%') OR
(Permission LIKE 'proj-base:sysconfig%');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:browse', 'in-portal:browse_site');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:', 'in-portal:');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-base:', 'in-portal:');
ALTER TABLE CategoryItems ADD INDEX (ItemResourceId);
ALTER TABLE CategoryItems
DROP INDEX Filename,
ADD INDEX Filename(Filename);
DROP TABLE Pages;
DELETE FROM PermissionConfig WHERE PermissionName LIKE 'PAGE.%';
DELETE FROM Permissions WHERE Permission LIKE 'PAGE.%';
DELETE FROM SearchConfig WHERE TableName = 'Pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationValues WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE 'PerPage_Pages%';
DELETE FROM ConfigurationValues WHERE VariableName LIKE 'PerPage_Pages%';
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:website_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.delete', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.add', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.view', 11, 1, 1, 0);
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_general'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:system_variables', 'proj-base:email_settings');
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:other_settings', 'proj-base:sysconfig');
UPDATE ConfigurationAdmin SET heading = 'la_Text_General' WHERE VariableName IN ('AdvancedUserManagement', 'RememberLastAdminTemplate', 'DefaultSettingsUserId');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.011 WHERE VariableName = 'AdvancedUserManagement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'DefaultSettingsUserId';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.13 WHERE VariableName = 'FilenameSpecialCharReplacement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'YahooApplicationId';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling', prompt = 'la_prompt_AdminMailFrom', ValueList = 'size="40"', DisplayOrder = 30.07 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite' WHERE VariableName IN ('Site_Path','SiteNameSubTitle','UseModRewrite','Config_Server_Time','Config_Site_Time','ErrorTemplate','NoPermissionTemplate','UsePageHitCounter','ForceImageMagickResize','CheckStopWords','Site_Name');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSession' WHERE VariableName IN ('CookieSessions','SessionCookieName','SessionTimeout','KeepSessionOnBrowserClose','SessionReferrerCheck','UseJSRedirect');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSSL' WHERE VariableName IN ('SSL_URL','AdminSSL_URL','Require_SSL','Require_AdminSSL','Force_HTTP_When_SSL_Not_Required','UseModRewriteWithSSL');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin' WHERE VariableName IN ('UseToolbarLabels','UseSmallHeader','UseColumnFreezer','UsePopups','UseDoubleSorting','MenuFrameWidth','ResizableFrames','AutoRefreshIntervals');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling' WHERE VariableName IN ('Smtp_Server','Smtp_Port','Smtp_Authenticate','Smtp_User','Smtp_Pass','Smtp_DefaultHeaders','MailFunctionHeaderSeparator','MailingListQueuePerStep','MailingListSendPerStep');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSystem' WHERE VariableName IN ('UseOutputCompression','OutputCompressionLevel','TrimRequiredFields','UseCronForRegularEvent','UseChangeLog','Backup_Path','SystemTagCache','SocketBlockingMode');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsCSVExport' WHERE VariableName IN ('CSVExportDelimiter','CSVExportEnclosure','CSVExportSeparator','CSVExportEncoding');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.02 WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.03 WHERE VariableName = 'UseModRewrite';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Config_Site_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'ErrorTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'NoPermissionTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.08 WHERE VariableName = 'UsePageHitCounter';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.09 WHERE VariableName = 'ForceImageMagickResize';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.10 WHERE VariableName = 'CheckStopWords';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.02 WHERE VariableName = 'SessionCookieName';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.03 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.04 WHERE VariableName = 'KeepSessionOnBrowserClose';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.05 WHERE VariableName = 'SessionReferrerCheck';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.06 WHERE VariableName = 'UseJSRedirect';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'SSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.02 WHERE VariableName = 'AdminSSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.03 WHERE VariableName = 'Require_SSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.04 WHERE VariableName = 'Require_AdminSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.05 WHERE VariableName = 'Force_HTTP_When_SSL_Not_Required';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.06 WHERE VariableName = 'UseModRewriteWithSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'UseToolbarLabels';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.02 WHERE VariableName = 'UseSmallHeader';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.03 WHERE VariableName = 'UseColumnFreezer';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.04 WHERE VariableName = 'UsePopups';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.05 WHERE VariableName = 'UseDoubleSorting';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.06 WHERE VariableName = 'MenuFrameWidth';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.07 WHERE VariableName = 'ResizableFrames';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.08 WHERE VariableName = 'AutoRefreshIntervals';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.01 WHERE VariableName = 'Smtp_Server';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.02 WHERE VariableName = 'Smtp_Port';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.03 WHERE VariableName = 'Smtp_Authenticate';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.04 WHERE VariableName = 'Smtp_User';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.05 WHERE VariableName = 'Smtp_Pass';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.06 WHERE VariableName = 'Smtp_DefaultHeaders';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.07 WHERE VariableName = 'MailFunctionHeaderSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.08 WHERE VariableName = 'MailingListQueuePerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.09 WHERE VariableName = 'MailingListSendPerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.01 WHERE VariableName = 'UseOutputCompression';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.02 WHERE VariableName = 'OutputCompressionLevel';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.03 WHERE VariableName = 'TrimRequiredFields';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.04 WHERE VariableName = 'UseCronForRegularEvent';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.05 WHERE VariableName = 'UseChangeLog';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.06 WHERE VariableName = 'Backup_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.07 WHERE VariableName = 'SystemTagCache';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.08 WHERE VariableName = 'SocketBlockingMode';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.01 WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.02 WHERE VariableName = 'CSVExportEnclosure';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.03 WHERE VariableName = 'CSVExportSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.04 WHERE VariableName = 'CSVExportEncoding';
UPDATE Phrase SET Phrase = 'la_section_SettingsWebsite' WHERE Phrase = 'la_Text_Website';
UPDATE Phrase SET Phrase = 'la_section_SettingsMailling' WHERE Phrase = 'la_Text_smtp_server';
UPDATE Phrase SET Phrase = 'la_section_SettingsCSVExport' WHERE Phrase = 'la_Text_CSV_Export';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_categories' WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin
SET ValueList = '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>'
WHERE VariableName = 'User_Default_Registration_Country';
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
UPDATE Modules SET Version = '5.0.0', Loaded = 1 WHERE Name = 'In-Portal';
# ===== v 5.0.1 =====
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation'
WHERE VariableName = 'User_Allow_New';
UPDATE ConfigurationValues SET VariableValue = '1' WHERE VariableName = 'ResizableFrames';
UPDATE Phrase
SET Translation = REPLACE(Translation, 'Page', 'Section')
WHERE (Phrase IN ('la_col_PageTitle', 'la_col_System', 'la_fld_IsIndex', 'la_fld_PageTitle', 'la_section_Page')) AND (PhraseType = 1);
DELETE FROM Phrase WHERE Phrase IN ('la_Tab', 'la_Colon', 'la_Semicolon', 'la_Space', 'la_Colon', 'la_User_Instant', 'la_User_Not_Allowed', 'la_User_Upon_Approval');
UPDATE ConfigurationAdmin SET ValueList = '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon'
WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET ValueList = '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect'
WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield2';
UPDATE Category SET Template = '#inherit#' WHERE COALESCE(Template, '') = '';
ALTER TABLE Category CHANGE Template Template VARCHAR(255) NOT NULL DEFAULT '#inherit#';
UPDATE Phrase SET Phrase = 'la_config_DefaultDesignTemplate' WHERE Phrase = 'la_prompt_DefaultDesignTemplate';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite', prompt = 'la_config_DefaultDesignTemplate', DisplayOrder = 10.06 WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_advanced' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('ErrorTemplate', 'NoPermissionTemplate');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Name';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'FirstDayOfWeek';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_Text_Date_Time_Settings', DisplayOrder = DisplayOrder + 9.98 WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.02 WHERE VariableName IN ('cms_DefaultDesign', 'ErrorTemplate', 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('KeepSessionOnBrowserClose', 'SessionReferrerCheck', 'UseJSRedirect');
ALTER TABLE Events
ADD FrontEndOnly TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER Enabled,
ADD INDEX (FrontEndOnly);
UPDATE Events SET FrontEndOnly = 1 WHERE Enabled = 2;
UPDATE Events SET Enabled = 1 WHERE Enabled = 2;
ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NULL DEFAULT NULL;
UPDATE Events SET FromUserId = NULL WHERE FromUserId = 0;
DELETE FROM ConfigurationAdmin WHERE VariableName = 'SiteNameSubTitle';
DELETE FROM ConfigurationValues WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('UseModRewrite', 'cms_DefaultDesign', 'ErrorTemplate' 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
ALTER TABLE ConfigurationAdmin CHANGE validation Validation TEXT NULL DEFAULT NULL;
UPDATE ConfigurationAdmin SET Validation = 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}' WHERE VariableName = 'SessionTimeout';
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortfield', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortfield2', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('User_NewGroup', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('User_LoggedInGroup', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('User_GuestGroup', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.10, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('User_SubscriberGroup', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>', 10.111, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Category WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>PortalUser WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSession', NULL, 'la_prompt_CurrentSessions', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="Category_DaysNew"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) FROM <%prefix%>Category WHERE EditorsPick = 1', NULL, 'la_prompt_CategoryEditorsPick', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_NewestCategoryDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_LastCategoryUpdate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser WHERE Status = 0', NULL, 'la_prompt_UsersDisabled', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>PortalUser', NULL, 'la_prompt_NewestUserDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2);
INSERT INTO StylesheetSelectors VALUES (83, 8, 'Product title link in list (shopping cart)', 'a.link-product-cart', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0);
INSERT INTO StylesheetSelectors VALUES (61, 8, 'Block: header of data table', 'td.block-data-grid-header', 'a:6:{s:4:"font";s:28:"Arial, Helvetica, sans-serif";s:5:"color";s:7:"#009DF6";s:9:"font-size";s:4:"12px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#E6EEFF";s:7:"padding";s:3:"6px";}', '', 1, 'white-space: nowrap;\r\npadding-left: 10px;\r\n/*\r\nbackground-image: url(/in-commerce4/themes/default/img/bullet1.gif);\r\nbackground-position: 10px 12px;\r\nbackground-repeat: no-repeat;\r\n*/', 0);
INSERT INTO StylesheetSelectors VALUES (65, 8, 'Link in product list additional row', 'td.product-list-additional a', 'a:1:{s:5:"color";s:7:"#8B898B";}', '', 2, '', 64);
INSERT INTO StylesheetSelectors VALUES (55, 8, 'Main table, left column', 'td.main-column-left', 'a:0:{}', '', 1, 'width:180px;\r\nborder: 1px solid #62A1DE;\r\nborder-top: 0px;', 0);
INSERT INTO StylesheetSelectors VALUES (70, 8, 'Product title link in list (category)', 'a.link-product-category', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0);
INSERT INTO StylesheetSelectors VALUES (66, 8, 'Pagination bar block', 'table.block-pagination', 'a:0:{}', '', 1, '', 0);
INSERT INTO StylesheetSelectors VALUES (49, 8, 'Bulleted list inside block', 'td.block-data ul li', 'a:0:{}', '', 1, ' list-style-image: url(/in-commerce4/themes/default/img/bullet2.gif);\r\n margin-bottom: 10px;\r\n font-size: 11px;', 0);
INSERT INTO StylesheetSelectors VALUES (50, 8, 'Product title link in list', 'a.link-product2', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0);
#INSERT INTO PageContent VALUES (DEFAULT, 1, 1, '<span style="font-weight: bold;">In-portal</span> is a revolutionary Web Site management system that allows you to automate and facilitate management of large portal and community web sites. Regardless of whether you are running a directory site or a content news portal, a community site or an online mall, In-portal will enhance your web site management experience with innovative.</span><br><br>We are proud to present our newly developed <b>"default"</b> theme that introduces a fresh look as well totally new approach in the template system.</span><br>', NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0);