|
|
 |
 |
 |
manilaSuite.hosting.createSiteForm
Enhance the site creation process in a number of ways
- sites get their own root
- from the controlpanel - always;
- user form entry - if boolean config.manila.prefs.flOneSitePerRoot exists use that value
- A site preference can be set In #prefs flCannotChangeEmail
- true - email address is taken from member record (non controlpanel calls)
- false - sets as before from the form>/li>
- name restricted to max of 18 chars - otherwise backups fail on Macintosh for folder name too long
- demo mode; controlled by 1 (optional) preference at config.manila.prefs.demoDuration - days before demo expires; 0/undefined means no demo mode
- controlpanel - can set/reset demo mode; and set duration of demo
- user call to hosting form - gets n-day demo if n > 0 (n = config.manila.prefs.demoDuration)
| on createSiteForm (pta=nil) |
| |
«05/05/04, 13:58:03 by DAB |
| |
«DAB Changes from 03/01/05, 16:09:10 |
| |
«all sites get their own root |
| |
«from the controlpanel - always |
| |
«user form entry - if boolean config.manila.prefs.flOneSitePerRoot exists use that value |
| |
«A site preference can be set In #prefs flCannotChangeEmail |
| |
«true - email address is taken from member record (non controlapnel calls) |
| |
«false - sets as before from the form |
| |
«name restricted to max of 18 chars - otherwise backups fail on Macintosh for folder name too long |
| |
«5/3/04; 6:15:26 PM by JES |
| |
«4/9/04; 5:34:36 PM by JES |
| |
«7/9/03; 3:24:36 PM by JES |
| |
«3/31/03; 3:04:43 PM by JES |
| |
«8/16/02; 4:42:24 PM by JES |
| |
«07/12/00; 3:18:55 PM by PBS |
| |
«07/03/00; 12:12:57 PM by JES |
| |
«06/28/00; 12:27:43 PM by PBS |
| |
«06/27/00; 12:30:27 PM by JES |
| |
«06/26/00; 7:49:48 PM by JES |
| |
«06/25/00; 12:51:16 AM by JES |
| |
«06/23/00; 10:05:39 PM by PBS |
| |
«06/22/00; 4:14:12 PM by PBS |
| |
«06/22/00; 1:13:38 AM by JES |
| |
«06/17/00; 11:20:02 PM by PBS |
| |
«05/26/00; 11:50:27 AM by PBS |
| |
if pta == nil {pta = html.getPageTableAddress ()} |
| |
local (flControlPanel = false) |
| |
bundle //figure out which site's prefs to use |
| |
local (flSubSites = adrPrefs^.flSubSites) |
| |
local (baseDomain = adrPrefs^.baseDomain) |
| |
local (flEditorsOnly = adrPrefs^.flEditorsOnlyCreateSites) |
| |
local (flConvertToSiteTree = false) //PBS 06/28/00 |
| |
local (flSiteTreeExists = false) |
| |
local (flCannotChangeEmail = false) «03/01/02, 18:34:33 by DAB |
| |
try {flCannotChangeEmail = adrPrefs^.flCannotChangeEmail} «03/01/02, 18:34:37 by DAB |
| |
bundle //PBS 06/28/00: find out if we need to convert to a siteTree |
| |
if flEditorsOnly and not flControlPanel |
| |
bundle //check baseDomain, make sure it's good |
| |
local (htmlText = "", indentLevel = 0) |
| |
on buildForm (path, name, email, password, theme) |
| |
local (action = pta^.uri) |
| |
if pta^.pathArgs != "" // 06/26/00 JES: fixed form on storyReader and msgReader pages |
| |
add ("<form method=\"post\" action=\"" + action + "\">") |
| |
if flCannotChangeEmail «01/10/17, 14:01:05 by DAB |
| |
add ("<input type='hidden' name='email' value='" + manilaSuite.translateToEntities (email) + "'>") |
| |
«local (host = pta^.host) |
| |
add ("<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\">") |
| |
add ("<td valign=\"top\" align=\"right\"><nobr>") |
| |
add ("http:\//" + baseDomain + "/") |
| |
add ("<td valign=\"top\" align=\"left\">") |
| |
«add ("<input size=\"25\" name=\"path\" value=\"" + manilaSuite.translateToEntities (path) + "\">/") |
| |
«(31- string.length("ManilaWebsite")) |
| |
add ("<input size=\"18\" maxlength = '18' name=\"path\" value=\"" + manilaSuite.translateToEntities (path) + "\">/") «04/05/03, 15:26:33 by DAB |
| |
if not flCannotChangeEmail «01/10/17, 14:01:05 by DAB email conditional |
| |
add ("<td valign=\"top\" align=\"right\">") |
| |
add (manilaSuite.getString ("hosting.emailPrompt", pta: pta)) |
| |
add ("<td valign=\"top\" align=\"left\">") |
| |
add ("<input size=\"25\" name=\"email\" value=\"" + manilaSuite.translateToEntities (email) + "\">") |
| |
bundle //Create Site button |
| |
local (flPost = (string.lower (pta^.method) == "post")) |
| |
if defined (pta^.searchArgTable.code) //fake up the post |
| |
if defined (pta^.postArgs.createSiteButton) or defined (pta^.postArgs.["createSiteButton.x"]) //button may be an image |
| |
local (errorMessage = "") |
| |
local (path, name, email, password, theme) |
| |
path = string.trimWhiteSpace (pta^.postArgs.path) |
| |
name = string.trimWhiteSpace (pta^.postArgs.name) |
| |
email = string.trimWhiteSpace (pta^.postArgs.email) |
| |
theme = string.trimWhiteSpace (pta^.postArgs.theme) |
| |
password = string.trimWhiteSpace (pta^.postArgs.password) |
| |
if defined(maniladata.newSiteTemplate.[name]) or ({"home", "faq", "feedback"} contains string.lower(name) ) «02/01/18, 12:01:07 by DAB |
| |
errormessage = name + " is reserved, please choose another name" |
| |
local (flRequireEmailConfirmation = false) |
| |
if defined (adrPrefs^.flRequireEmailConfirmation) |
| |
if flRequireEmailConfirmation and (not flControlPanel) //special handling for queuing the request, and sending confirmation email |
| |
bundle //make this person a member of the ISP site if they're not already |
| |
local (canonicalSiteName, siteTableName) |
| |
bundle //create canonical site name |
| |
local (membershipGroupName = canonicalSiteName + "Members") |
| |
local (discussionGroupName = canonicalSiteName + "Discuss") |
| |
local (flShareMembershipGroup = false) |
| |
bundle //PBS 07/12/00: figure out if the new site shares a membership group |
| |
local (adrHostingSite, hostingSiteGroupName) |
| |
if adrPrefs^.canonicalSiteName != "" |
| |
bundle //check for existing site |
| |
local (flAddToDomains = false) |
| |
local (flAddToUserDatabases = false) |
| |
local (flUseExistingGdb = true) |
| |
«local (flUseExistingGdb = not flControlpanel) «05/06/15, 14:52:22 by DAB |
| |
if defined(config.manila.prefs.flOneSitePerRoot) «03/01/05, 16:42:03 by DAB |
| |
flUseExistingGdb = not config.manila.prefs.flOneSitePerRoot «03/05/19, 12:59:20 by DAB |
| |
flAddToUserDatabases = true «03/11/11, 08:48:54 by DAB |
| |
if defined(maniladata.newSiteTemplate.[name]) or ({"home", "faq", "feedback"} contains string.lower(name) ) «02/01/18, 12:01:07 by DAB |
| |
errormessage = name + " is reserved, please choose another name" |
| |
if not defined (config.manila.prefs.hostingGdbName) |
| |
existingGdbName = config.manila.prefs.hostingGdbName |
| |
if defined (adrPrefs^.hostingGdbName) |
| |
local (gdbPath = Frontier.getSubFolder ("www") + existingGdbName) |
| |
if not (defined ([gdbPath])) //is it already open? |
| |
local (siteName = siteTableName) |
| |
siteInfo = manilaSuite.clone (siteName, membershipGroupName, discussionGroupName, email, password, name, siteUrl, flAddToDomains, flAddToUserDatabases, flUseExistingGdb, existingGdbName, canonicalSiteName, theme) |
| |
siteInfo.adrSite^.["#newsSite"].siteName = path |
| |
if flShareMembershipGroup //PBS 07/12/00: use membership-related URLs from the top-level site, make sure shared membership group has good cookie domain value |
| |
bundle //support for new per-site hosting prefs |
| |
mainResponder.redirect (siteInfo.adrSite^.["#ftpSite"].url) |
| |
else //(try to) create a top-level site |
| |
if not flPost //display the form |
| |
return (manilaSuite.unTaint (htmlText)) //no further macros should be processed in this text |
| |
«html.setpagetableaddress (@workspace.pt) |
Relative to Frontier version 9.7b10
|