Beispiel #1
0
        private void Save_Click(object sender, System.EventArgs e)
        {
            string sUserName = ForumSmtpUserName.Text.Trim();
            string sUserPass = ForumSmtpUserPass.Text.Trim();

            if (sUserName.Length == 0)
            {
                sUserName = null;
            }
            if (sUserPass.Length == 0)
            {
                sUserPass = null;
            }

            // write all the settings back to the settings class
            BoardSettings.TimeZoneRaw            = Convert.ToInt32(TimeZones.SelectedItem.Value);
            BoardSettings.ForumEditor            = Convert.ToInt32(ForumEditorList.SelectedItem.Value);
            BoardSettings.SmtpServer             = ForumSmtpServer.Text;
            BoardSettings.SmtpUserName           = sUserName;
            BoardSettings.SmtpUserPass           = sUserPass;
            BoardSettings.ForumEmail             = ForumEmailEdit.Text;
            BoardSettings.EmailVerification      = EmailVerification.Checked;
            BoardSettings.ShowMoved              = ShowMoved.Checked;
            BoardSettings.BlankLinks             = BlankLinks.Checked;
            BoardSettings.ShowGroups             = ShowGroupsX.Checked;
            BoardSettings.AvatarWidth            = Convert.ToInt32(AvatarWidth.Text);
            BoardSettings.AvatarHeight           = Convert.ToInt32(AvatarHeight.Text);
            BoardSettings.AvatarUpload           = AvatarUpload.Checked;
            BoardSettings.AvatarRemote           = AvatarRemote.Checked;
            BoardSettings.AvatarSize             = (AvatarSize.Text.Trim().Length > 0) ? Convert.ToInt32(AvatarSize.Text) : 0;
            BoardSettings.AllowUserTheme         = AllowUserThemeX.Checked;
            BoardSettings.AllowUserLanguage      = AllowUserLanguageX.Checked;
            BoardSettings.UseFileTable           = UseFileTableX.Checked;
            BoardSettings.ShowRSSLink            = ShowRSSLinkX.Checked;
            BoardSettings.ShowForumJump          = ShowForumJumpX.Checked;
            BoardSettings.AllowPrivateMessages   = AllowPrivateMessagesX.Checked;
            BoardSettings.AllowEmailSending      = AllowEmailSendingX.Checked;
            BoardSettings.AllowSignatures        = AllowSignaturesX.Checked;
            BoardSettings.RemoveNestedQuotes     = RemoveNestedQuotesX.Checked;
            BoardSettings.MaxFileSize            = (MaxFileSize.Text.Trim().Length > 0) ? Convert.ToInt32(MaxFileSize.Text.Trim()) : 0;
            BoardSettings.SmiliesColumns         = Convert.ToInt32(SmiliesColumns.Text.Trim());
            BoardSettings.SmiliesPerRow          = Convert.ToInt32(SmiliesPerRow.Text.Trim());
            BoardSettings.LockPosts              = LockPosts.Text.Trim() == string.Empty ? 0 : Convert.ToInt32(LockPosts.Text.Trim());
            BoardSettings.PostsPerPage           = Convert.ToInt32(PostsPerPage.Text.Trim());
            BoardSettings.TopicsPerPage          = Convert.ToInt32(TopicsPerPage.Text.Trim());
            BoardSettings.PostFloodDelay         = Convert.ToInt32(PostFloodDelay.Text.Trim());
            BoardSettings.DateFormatFromLanguage = DateFormatFromLanguage.Checked;
            BoardSettings.AcceptedHTML           = AcceptedHTML.Text.Trim();
            BoardSettings.DisableRegistrations   = DisableRegistrations.Checked;
            BoardSettings.CreateNntpUsers        = CreateNntpUsers.Checked;
            BoardSettings.ShowGroupsProfile      = ShowGroupsProfile.Checked;

            // save the settings to the database
            BoardSettings.SaveRegistry();

            // reload all settings from the DB
            BoardSettings = null;

            Forum.Redirect(Pages.admin_admin);
        }
Beispiel #2
0
        private void Save_Click(object sender, System.EventArgs e)
        {
            DB.board_save(PageBoardID, Name.Text, AllowThreaded.Checked);

            BoardSettings.Language          = Language.SelectedValue;
            BoardSettings.ShowTopicsDefault = Convert.ToInt32(ShowTopic.SelectedValue);

            /// save the settings to the database
            BoardSettings.SaveRegistry();

            /// Reload forum settings
            BoardSettings = null;

            Forum.Redirect(Pages.admin_admin);
        }