Fri, Feb 17 2006
Downloads: 199
File size: 2.4kB
Views: 1,181
 |
Signature & PostBody Image removal modules for CS 1.1 |
These two modules may be added to CS 1.1 to remove image tags within
the postbody and/or the signature. These modules are only used
when a post is created and/or updated or when a member's profile is
updated. All posts and signatures created prior to implementing
these modules will still include images.
Please Note: With CS 2.0, with the new events, modules
like this may be executed whenever a post or signature is
displayed. This is probably the preferred method as this feature
can then be enabled/disabled without regard for the post or signature
information. This also means that enabling/disabling images could
be an option that's left up to the member to use.
PostBodyImageRemovalModule.cs
This will remove image tags whenever a post is created or updated. Replaces the image tag with a link to the image.
SignatureImageRemovalModule.cs
This will remove image tags whenever a user profile is updated. Replaces the image tag with a link to the image.
1. Add the code to your project.
2. Take note of the namespace you create the module under. The
namespace is important for the type value within the
communityserver.config file.
3. Update the CSModules section of the communityserver.config
file. Please note the order below in which the modules are listed.
CSModules (Order of...)
- CSMembershipRulesModule
- CSCatastrophicExceptionModule
- CSExceptionModule
- SignatureImageRemovalModule (#1)
- IrcCommands
- ForumCensorship
- PostBodyImageRemovalModule (#2)
- ForumEmoticon
- ForumSourceCode
- BBcodeToHtml
- ForumPlainText
- ForumHtmlScrubbing
- WeblogCensorModule
- WeblogPostandArticleHtmlScrubbing
- WeblogFeedbackHtmlFormatting
- TrackbackModule
- XmlRpcPingModule
- WeblogFormattingModule
- PictureCensor
- PictureHtmlScrubber
- PictureComments
#1 (Syntax)
<add name = "SignatureImageRemovalModule" type =
"CommunityServer.KPC.Components.SignatureImageRemovalModule,
CommunityServer.KPC" />
#2 (Syntax)
<add name = "PostBodyImageRemovalModule" type =
"CommunityServer.KPC.Components.PostBodyImageRemovalModule,
CommunityServer.KPC" />