Exemplo n.º 1
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SiteName", txtSiteName.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("RegistrationType", rblRegistrationType.SelectedValue));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("CreateWikiUserAccount", chkCreateWikiAccount.Checked.ToString()));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("GroupsFolderName", txtGroupsFolderName.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("DefaultLanguage", txtDefaultLanguage.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SitePageTitleLead", txtSitePageTitleLead.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("DefaultTimeZone", ddTimeZones.SelectedValue));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("RecordAnalytics", chkRecordAnalytics.Checked.ToString()));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("HandleWwwSubdomain", rblWwwSubdomain.SelectedValue));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("IpGeoLookupUrl", txtIpGeoLookupUrl.Text));
            SueetieCommon.ClearSiteSettingsCache();

            lblResults.Visible = true;
            lblResults.Text    = "Site settings have been updated!";
        }
Exemplo n.º 2
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            SiteSetting setting = new SiteSetting
            {
                SettingName  = "HtmlHeader",
                SettingValue = txtHtmlHeader.Text
            };

            SueetieCommon.UpdateSiteSetting(setting);

            setting.SettingName  = "TrackingScript";
            setting.SettingValue = txtTrackingScript.Text ?? string.Empty;
            SueetieCommon.UpdateSiteSetting(setting);

            lblResults.Visible = true;
            lblResults.Text    = "Site Header and Tracking Script updated!";
        }
Exemplo n.º 3
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            string _theme       = txtTheme.Text.ToLower().Trim();
            string _mobileTheme = txtMobileTheme.Text.ToLower().Trim();

            // Update Application and Group Themes
            // Each theme has to have an associated blog theme

            foreach (SueetieApplication _sueetieApplication in SueetieApplications.Get().All)
            {
                if (_sueetieApplication.ApplicationTypeID == (int)SueetieApplicationType.Blog && _sueetieApplication.GroupID == 0)
                {
                    try
                    {
                        SueetieBlogUtils.UpdateBlogTheme(_sueetieApplication.ApplicationKey, _theme);
                    }
                    catch (Exception ex)
                    {
                        SueetieLogs.LogException("Blog Theme Update Error: " + ex.Message + " Stacktrace: " + ex.StackTrace);
                    }
                }
            }
            SueetieForums.UpdateForumTheme(_theme);
            WikiThemes.UpdateWikiTheme(SueetieApplications.Get().Wiki.ApplicationKey, _theme);

            //// Update BlogEngine Group Themes - Will add to SueetieApplications logic
            // SueetieBlogUtils.UpdateBlogTheme("groups/demo/blog", _theme);
            // WikiThemes.UpdateWikiTheme("groups/demo/wiki", _theme);

            SueetieCommon.UpdateSiteSetting(new SiteSetting("Theme", _theme));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("MobileTheme", _mobileTheme));

            if (SueetieUIHelper.GetCurrentTrustLevel() >= AspNetHostingPermissionLevel.High)
            {
                HttpRuntime.UnloadAppDomain();
            }
            else
            {
                SueetieLogs.LogException("Unable to restart Sueetie. Must have High/Unrestricted Trust to Unload Application.");
            }

            lblResults.Visible        = true;
            lblResults.Text           = "Current Themes updated!";
            lblResultsDetails.Visible = true;
            lblResultsDetails.Text    = "New application themes may not appear right away. Touch web.configs to restart the app if this is the case.";
        }
Exemplo n.º 4
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            SueetieCommon.UpdateSiteSetting(new SiteSetting("ContactEmail", txtContactEmail.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("FromEmail", txtFromEmail.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("FromName", txtFromName.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SmtpServer", txtSmtpServer.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SmtpServerPort", txtSmtpServerPort.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SmtpUserName", txtSmtpUserName.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("SmtpPassword", txtSmtpPassword.Text));
            SueetieCommon.UpdateSiteSetting(new SiteSetting("ErrorEmails", txtErrorEmails.Text));

            SueetieCommon.UpdateSiteSetting(new SiteSetting("EnableSSL", chkEnableSSL.Checked.ToString()));

            SueetieCommon.ClearSiteSettingsCache();

            lblResults.Visible = true;
            lblResults.Text    = "Email settings have been updated!";
        }