📄 sitesettingsadmin.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Drawing;
using System.Web.UI.WebControls;
using CommunityServer.Components;
namespace CommunityServer.Controls {
public class SiteSettingsAdmin : TemplatedWebControl {
private bool enabledAppChanged = false;
#region Child Controls
protected TextBox homePageContent;
protected YesNoRadioButtonList forumsDisabled;
protected YesNoRadioButtonList blogsDisabled;
protected YesNoRadioButtonList galleriesDisabled;
protected YesNoRadioButtonList guestbookDisabled;
protected TextBox siteName;
protected TextBox siteDescription;
protected TimezoneDropDownList timezone;
protected TextBox searchPostsPerPage;
protected TextBox threadsPerPage;
protected TextBox postsPerPage;
protected YesNoRadioButtonList enablePostPreviewPopup;
protected YesNoRadioButtonList stripDomainName;
protected TextBox adminEmailAddress;
protected RegularExpressionValidator adminEmailAddressValidator;
protected TextBox companyName;
protected TextBox searchMetaDescription;
protected TextBox searchMetaKeywords;
protected TextBox copyright;
protected TextBox companyEmailAddress;
protected RegularExpressionValidator companyEmailAddressValidator;
protected TextBox companyFaxNumber;
protected TextBox companyAddress;
protected YesNoRadioButtonList displayForumDescription;
protected YesNoRadioButtonList displayCurrentTime;
protected YesNoRadioButtonList displayWhoIsOnline;
protected YesNoRadioButtonList displayStatistics;
protected YesNoRadioButtonList enableForumRSS;
protected TextBox rssDefaultThreadsPerFeed;
protected TextBox rssMaxThreadsPerFeed;
protected TextBox rssCacheWindowInMinutes;
protected YesNoRadioButtonList publicMemberList;
protected YesNoRadioButtonList memberListAdvancedSearch;
protected TextBox memberListPageSize;
protected TextBox memberListTopPostersToDisplay;
protected YesNoRadioButtonList allowDuplicatePosts;
protected TextBox duplicatePostIntervalInMinutes;
protected YesNoRadioButtonList enableEmoticons;
protected TextBox popularPostThresholdPosts;
protected YesNoRadioButtonList requireEditNotes;
protected UserActivityDisplayRadioButtonList postingActivityDisplay;
protected YesNoRadioButtonList displayUserRankAsPicture;
protected YesNoRadioButtonList userPostingAsAnonymous;
protected YesNoRadioButtonList enableThreadStatus;
protected TextBox popularPostThresholdViews;
protected TextBox popularPostThresholdDays;
protected YesNoRadioButtonList autoPostDelete;
protected YesNoRadioButtonList autoUserDelete;
protected YesNoRadioButtonList enableAttachments;
protected TextBox allowedAttachmentTypes;
protected TextBox maxAttachmentSize;
protected YesNoRadioButtonList displayEditNotes;
protected TextBox postEditBodyAgeInMinutes;
protected YesNoRadioButtonList enableFloodInterval;
protected TextBox postInterval;
protected YesNoRadioButtonList enableTrackPostsByIP;
protected YesNoRadioButtonList displayPostIP;
protected YesNoRadioButtonList displayPostIPAdminsModeratorsOnly;
protected DateFormatDropDownList dateFormat;
protected TimeFormatDropDownList timeFormat;
protected YesNoRadioButtonList enableRolesCookie;
protected YesNoRadioButtonList enableAnonymousTracking;
protected TextBox rolesCookieName;
protected TextBox rolesCookieExpiration;
protected TextBox anonymousCookieName;
protected TextBox anonymousCookieExpiration;
protected TextBox cookieDomain;
protected YesNoRadioButtonList anonymousPosting;
protected TextBox anonymousUserOnlineTimeWindow;
protected YesNoRadioButtonList enableEmail;
protected TextBox emailThrottle;
protected TextBox smtpServer;
protected YesNoRadioButtonList smtpServerRequiredLogin;
protected TextBox smtpServerUserName;
protected TextBox smtpServerPassword;
protected TextBox emailDomain;
protected TextBox supportedInlinedImageTypes;
protected TextBox inlinedImageWidth;
protected TextBox inlinedImageHeight;
protected YesNoRadioButtonList enableInlinedImages;
protected YesNoRadioButtonList enableCensorship;
protected YesNoRadioButtonList enableAds;
protected YesNoRadioButtonList enableCollapsingPanels;
protected RequiredFieldValidator smtpServerUserNameValidator;
protected RequiredFieldValidator smtpServerPasswordValidator;
protected Button save;
protected Button reset;
#endregion
#region Skin
protected override void AttachChildControls() {
forumsDisabled = (YesNoRadioButtonList)FindControl( "ForumsDisabled" );
blogsDisabled = (YesNoRadioButtonList)FindControl("BlogsDisabled");
galleriesDisabled = (YesNoRadioButtonList)FindControl("GalleriesDisabled");
guestbookDisabled = (YesNoRadioButtonList)FindControl("GuestBookDisabled");
homePageContent = (TextBox)FindControl("HomePageContent");
siteName = (TextBox)FindControl( "siteName" );
siteDescription = (TextBox)FindControl( "siteDescription" );
timezone = (TimezoneDropDownList)FindControl( "timezone" );
threadsPerPage = (TextBox)FindControl( "threadsPerPage" );
postsPerPage = (TextBox)FindControl( "postsPerPage" );
searchPostsPerPage = FindControl("SearchPerPage") as TextBox;
enablePostPreviewPopup = (YesNoRadioButtonList)FindControl( "enablePostPreviewPopup" );
stripDomainName = (YesNoRadioButtonList)FindControl( "stripDomainName" );
adminEmailAddress = (TextBox)FindControl( "adminEmailAddress" );
adminEmailAddressValidator = (RegularExpressionValidator)FindControl( "adminEmailAddressValidator" );
companyName = (TextBox)FindControl( "companyName" );
companyEmailAddress = (TextBox)FindControl( "companyEmailAddress" );
companyEmailAddressValidator = (RegularExpressionValidator)FindControl( "companyEmailAddressValidator" );
companyFaxNumber = (TextBox)FindControl( "companyFaxNumber" );
companyAddress = (TextBox)FindControl( "companyAddress" );
displayForumDescription = (YesNoRadioButtonList)FindControl( "displayForumDescription" );
displayCurrentTime = (YesNoRadioButtonList)FindControl( "displayCurrentTime" );
displayWhoIsOnline = (YesNoRadioButtonList)FindControl( "displayWhoIsOnline" );
displayStatistics = (YesNoRadioButtonList)FindControl( "displayStatistics" );
enableForumRSS = (YesNoRadioButtonList)FindControl( "enableForumRSS" );
rssDefaultThreadsPerFeed = (TextBox)FindControl( "rssDefaultThreadsPerFeed" );
rssMaxThreadsPerFeed = (TextBox)FindControl( "rssMaxThreadsPerFeed" );
rssCacheWindowInMinutes = (TextBox)FindControl( "rssCacheWindowInMinutes" );
publicMemberList = (YesNoRadioButtonList)FindControl( "publicMemberList" );
memberListAdvancedSearch = (YesNoRadioButtonList)FindControl( "memberListAdvancedSearch" );
memberListPageSize = (TextBox)FindControl( "memberListPageSize" );
memberListTopPostersToDisplay = (TextBox)FindControl( "memberListTopPostersToDisplay" );
allowDuplicatePosts = (YesNoRadioButtonList)FindControl( "allowDuplicatePosts" );
requireEditNotes = (YesNoRadioButtonList)FindControl("requireEditNotes");
postingActivityDisplay = (UserActivityDisplayRadioButtonList) FindControl("postingActivityDisplay");
displayUserRankAsPicture = (YesNoRadioButtonList) FindControl( "displayUserRankAsPicture" );
userPostingAsAnonymous = (YesNoRadioButtonList) FindControl( "userPostingAsAnonymous" );
enableThreadStatus = (YesNoRadioButtonList) FindControl( "enableThreadStatus" );
duplicatePostIntervalInMinutes = (TextBox)FindControl( "duplicatePostIntervalInMinutes" );
enableEmoticons = (YesNoRadioButtonList)FindControl( "enableEmoticons" );
popularPostThresholdPosts = (TextBox)FindControl( "popularPostThresholdPosts" );
popularPostThresholdViews = (TextBox)FindControl( "popularPostThresholdViews" );
popularPostThresholdDays = (TextBox)FindControl( "popularPostThresholdDays" );
autoPostDelete = (YesNoRadioButtonList)FindControl( "autoPostDelete" );
autoUserDelete = (YesNoRadioButtonList)FindControl( "autoUserDelete" );
enableAttachments = (YesNoRadioButtonList)FindControl( "enableAttachments" );
allowedAttachmentTypes = (TextBox)FindControl( "allowedAttachmentTypes" );
maxAttachmentSize = (TextBox)FindControl( "maxAttachmentSize" );
displayEditNotes = (YesNoRadioButtonList)FindControl( "displayEditNotes" );
postEditBodyAgeInMinutes = (TextBox)FindControl( "postEditBodyAgeInMinutes" );
enableFloodInterval = (YesNoRadioButtonList)FindControl( "enableFloodInterval" );
postInterval = (TextBox)FindControl( "postInterval" );
enableTrackPostsByIP = (YesNoRadioButtonList)FindControl( "enableTrackPostsByIP" );
displayPostIP = (YesNoRadioButtonList)FindControl( "displayPostIP" );
displayPostIPAdminsModeratorsOnly = (YesNoRadioButtonList)FindControl( "displayPostIPAdminsModeratorsOnly" );
dateFormat = (DateFormatDropDownList)FindControl( "dateFormat" );
timeFormat = (TimeFormatDropDownList)FindControl( "timeFormat" );
enableRolesCookie = (YesNoRadioButtonList)FindControl( "enableRolesCookie" );
enableAnonymousTracking = (YesNoRadioButtonList)FindControl( "enableAnonymousTracking" );
rolesCookieName = (TextBox)FindControl( "rolesCookieName" );
rolesCookieExpiration = (TextBox)FindControl( "rolesCookieExpiration" );
anonymousCookieName = (TextBox)FindControl( "anonymousCookieName" );
anonymousCookieExpiration = (TextBox)FindControl( "anonymousCookieExpiration" );
cookieDomain = (TextBox)FindControl( "cookieDomain" );
anonymousPosting = (YesNoRadioButtonList)FindControl( "anonymousPosting" );
anonymousUserOnlineTimeWindow = (TextBox)FindControl( "anonymousUserOnlineTimeWindow" );
enableEmail = (YesNoRadioButtonList)FindControl( "enableEmail" );
emailThrottle = (TextBox)FindControl("emailThrottle");
enableAds = (YesNoRadioButtonList)FindControl("enableAds");
smtpServer = (TextBox)FindControl( "smtpServer" );
smtpServerRequiredLogin = (YesNoRadioButtonList)FindControl( "smtpServerRequiredLogin" );
smtpServerUserName = (TextBox)FindControl( "smtpServerUserName" );
smtpServerPassword = (TextBox)FindControl( "smtpServerPassword" );
emailDomain = (TextBox)FindControl("EmailDomain");
supportedInlinedImageTypes = (TextBox)FindControl("SupportedInlinedImageTypes");
inlinedImageWidth = (TextBox)FindControl("InlinedImageWidth");
inlinedImageHeight = (TextBox)FindControl("InlinedImageHeight");
enableInlinedImages = (YesNoRadioButtonList)FindControl("enableInlinedImages");
enableCensorship = (YesNoRadioButtonList)FindControl("EnableCensorship");
enableCollapsingPanels = (YesNoRadioButtonList)FindControl("EnableCollapsingPanels");
searchMetaDescription = (TextBox)FindControl("SearchMetaDescription");
searchMetaKeywords = (TextBox)FindControl("SearchMetaKeywords");
copyright = (TextBox)FindControl("Copyright");
smtpServerUserNameValidator = (RequiredFieldValidator)FindControl( "SmtpServerUserNameValidator" );
smtpServerPasswordValidator = (RequiredFieldValidator)FindControl( "SmtpServerPasswordValidator" );
reset = (Button)FindControl( "Reset" );
save = (Button)FindControl( "Save" );
InitializeChildControls();
}
private void InitializeChildControls() {
smtpServerUserNameValidator.EnableClientScript = false;
smtpServerPasswordValidator.EnableClientScript = false;
this.reset.Click += new EventHandler(Reset_Click);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -