⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 weblogformattingmodule.cs

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System.Xml;
using CommunityServer.Components;

namespace CommunityServer.Blogs.Components
{
	/// <summary>
	/// Summary description for WeblogFormattingModule.
	/// </summary>
	public class WeblogFormattingModule : ICSModule
	{
		public WeblogFormattingModule()
		{
			//
			// TODO: Add constructor logic here
			//
		}

	    public void Init(CSApplication csa, XmlNode node)
	    {
	        csa.PreSectionUpdate +=new CSSectionEventHandler(csa_PreSectionUpdate);
        }

        private void csa_PreSectionUpdate(Section section, CSEventArgs e)
        {
            if(e.ApplicationType == ApplicationType.Weblog && (e.State == ObjectState.Create || e.State == ObjectState.Update))
            {
                Weblog w = section as Weblog;
                w.Description = HtmlScrubber.Clean(w.Description,true,true);
                w.Name = HtmlScrubber.Clean(w.Name,true,true);
                w.News = HtmlScrubber.Clean(w.News,true,true);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -