From de181baa3ad2652801edfbbaead1427203d781e3 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 9 Nov 2023 21:11:10 +0100 Subject: [PATCH] added the domain expression and domain base url on the installer. --- .../includes/i18n/installer_en_US.properties | 2 + .../models/InstallerService.cfc | 4 +- modules/contentbox-installer/models/Setup.cfc | 3 + .../views/home/steps/step2.cfm | 72 +++++++++++++++++-- 4 files changed, 72 insertions(+), 9 deletions(-) diff --git a/modules/contentbox-installer/includes/i18n/installer_en_US.properties b/modules/contentbox-installer/includes/i18n/installer_en_US.properties index 5fc99fbb7a..8616177ccc 100644 --- a/modules/contentbox-installer/includes/i18n/installer_en_US.properties +++ b/modules/contentbox-installer/includes/i18n/installer_en_US.properties @@ -66,6 +66,8 @@ tab.site.outgoing.title = The email that sends all notifications out of Conte tab.site.sampledata = Populate Site with Sample Data: tab.site.sitename = Site Name: tab.site.sitename.title = The global name of this ContentBox installation +tab.site.slug = Unique Slug: +tab.site.slug.title = A unique slug for this site tab.site.tagline = Site Tag Line: tab.site.tagline.title = A cool tag line that can appear anywhere in your site tab.start = Start Installation! diff --git a/modules/contentbox-installer/models/InstallerService.cfc b/modules/contentbox-installer/models/InstallerService.cfc index 89c7c38ae4..cca4d06378 100755 --- a/modules/contentbox-installer/models/InstallerService.cfc +++ b/modules/contentbox-installer/models/InstallerService.cfc @@ -87,8 +87,8 @@ component accessors="true" { "slug" : "default", "description" : arguments.setup.getSiteDescription(), "keywords" : arguments.setup.getSiteKeywords(), - "domain" : "127.0.0.1", - "domainRegex" : "127\.0\.0\.1", + "domain" : arguments.setup.getSiteDomain(), + "domainRegex" : arguments.setup.getSiteDomainExpression(), "domainAliases" : "[]", "tagline" : arguments.setup.getSiteTagLine(), "homepage" : "cbBlog", diff --git a/modules/contentbox-installer/models/Setup.cfc b/modules/contentbox-installer/models/Setup.cfc index 6a3fb4a4b8..76f6d3039e 100644 --- a/modules/contentbox-installer/models/Setup.cfc +++ b/modules/contentbox-installer/models/Setup.cfc @@ -16,9 +16,12 @@ component accessors="true" { // Site Settings property name="siteName"; + property name="siteSlug"; property name="siteTagLine"; property name="siteDescription"; property name="siteKeywords"; + property name="siteDomainExpression"; + property name="siteDomain"; property name="populateData"; property name="createDevSite"; diff --git a/modules/contentbox-installer/views/home/steps/step2.cfm b/modules/contentbox-installer/views/home/steps/step2.cfm index b7cfc9826a..665ef7557a 100644 --- a/modules/contentbox-installer/views/home/steps/step2.cfm +++ b/modules/contentbox-installer/views/home/steps/step2.cfm @@ -17,7 +17,21 @@ required = "required", wrapper = "div class=controls", labelClass = "control-label", - groupWrapper = "div class=form-group" + groupWrapper = "div class=form-group", + value = "Default Site" +)# + + +#html.textField( + name = "siteSlug", + label = "*#cb.r( "tab.site.slug@installer" )#", + class = "form-control", + size = "100", + title = cb.r( "tab.site.slug.title@installer" ), + wrapper = "div class=controls", + labelClass = "control-label", + groupWrapper = "div class=form-group", + value = "default" )# @@ -56,13 +70,57 @@ groupWrapper = "div class=form-group" )# - -#html.label( - field = "populatedata", - content = "Site Options:", - class = "control-label" +
+ Site Detection +
+ +

+ Site detection is done against the incoming domain name found in the cgi scope. Below you can register the primary domain regular expression with the domain base url it represents alongside any domain aliases you might have. +

+ + +#html.textField( + name = "siteDomainExpression", + label = "*Domain Expression(s): ", + class = "form-control", + size = "100", + title = "A domain name or regular expression that will be used to match the incoming domain with.", + wrapper = "div class=controls", + labelClass = "control-label", + groupWrapper = "div class=form-group", + required = "required", + value = "127\.0\.0\.1" )# +
+ #html.label( + class = "control-label", + field = "domain", + content = "*Domain Base URL:" + )# +

+ The domain base URL so we can construct URLs to this site. +

+ +
+ https:// + +
+
+ + + +
+ Site Options: +
+

Below you can choose to populate your default site with sample blog entries, content store items, pages and more. @@ -123,4 +181,4 @@ #cb.r( "tab.next@installer" )# - \ No newline at end of file +