📄 weblogemoticonsmodule.cs
字号:
using System;
using System.Xml;
using CommunityServer.Components;
namespace CommunityServer.Blogs.Components
{
/// <summary>
/// Smilies for Weblogs
/// </summary>
public class WeblogEmoticonsModule : ICSModule
{
public WeblogEmoticonsModule(){}
public void Init(CSApplication csa, XmlNode node)
{
csa.PrePostUpdate +=new CSPostEventHandler(csa_PrePostUpdate);
}
private void csa_PrePostUpdate(IContent content, CSPostEventArgs e)
{
if(e.ApplicationType == ApplicationType.Weblog)
{
WeblogPost wp = content as WeblogPost;
if(wp != null && e.State != ObjectState.Delete)
{
if(CSContext.Current.SiteSettings.EnableEmoticons)
{
wp.FormattedBody = Transforms.EmoticonTransforms(wp.FormattedBody);
}
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -