原文地址:http://www.cnblogs.com/zihui69/archive/2005/02/16/104893.html
并在最上部添加:
编译之后,如果没有意外即可升级到FreeTextBox 3.0。
1、修改web.config ,增加下面的,
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
要加在
<!-- Can not see to load asmx like .aspx, since we will grap all requests later, make sure these are processed by their default factory -->
<add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
<add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
的上面。
2、移除admin和dottextweb引用中的freetextbox。
3、下载freetextbox,并覆盖freetextbox目录。
4、在DottextWeb\Emoticons目录建立一个msn目录,把msn表情放到此目录下面。
5、把FreeTextBox.dll拷贝到bin目录下。在admin和dottextweb添加freetextbox引用。
修改EntryEditor.ascx.cs和LoginPostComment.ascx.cs文件。
在namespace Dottext.Web.Admin.UserControls添加两行:
using FreeTextBoxControls;
using System.Text;
并用下面的代码替换SetFreeTextBox部分。
SetFreeTextBox
6、修改EntryEditor.ascx
<ftb:FreeTextBox....>部分。
<ftb:FreeTextBox language="zh-cn" id="ftbComment" runat="server" Visible="true" ToolbarStyleConfiguration="Office2003"
Height="400" Width="98%" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,Cut,Copy,Paste,Undo,Redo,Print;Bold,Italic,Underline,fontforecolorpicker,fontbackcolorpicker,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,insertdate,inserttime,WordClean,preview,InsertRule"></ftb:FreeTextBox>
Height="400" Width="98%" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,Cut,Copy,Paste,Undo,Redo,Print;Bold,Italic,Underline,fontforecolorpicker,fontbackcolorpicker,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,insertdate,inserttime,WordClean,preview,InsertRule"></ftb:FreeTextBox>
7、替换LoginPostComment.ascx里面:
<ftb:FreeTextBox language="zh-cn" id="ftbComment" runat="server" Visible="true" ToolbarStyleConfiguration="Office2003"
Height="400" Width="98%" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,Cut,Copy,Paste,Undo,Redo,Print;Bold,Italic,Underline,fontforecolorpicker,fontbackcolorpicker,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,insertdate,inserttime,WordClean,preview,InsertRule"></ftb:FreeTextBox>
Height="400" Width="98%" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,Cut,Copy,Paste,Undo,Redo,Print;Bold,Italic,Underline,fontforecolorpicker,fontbackcolorpicker,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,insertdate,inserttime,WordClean,preview,InsertRule"></ftb:FreeTextBox>
8、替换admin目录下ftb.imagegallery.aspx里面的
<iframe style="width:100%;height:100%;border:0;" border=0 frameborder=0 src="ftb.imagegallery.aspx?frame=1&<%=Request.QueryString%>"></iframe>
为
<form id="Form1" runat="server" enctype="multipart/form-data">
<FTB:ImageGallery id="ImageGallery1" AllowImageUpload=true AllowImageDelete=true AllowDirectoryCreate=true AllowDirectoryDelete=true runat="Server" />
</form>
<FTB:ImageGallery id="ImageGallery1" AllowImageUpload=true AllowImageDelete=true AllowDirectoryCreate=true AllowDirectoryDelete=true runat="Server" />
</form>
并在最上部添加:
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
编译之后,如果没有意外即可升级到FreeTextBox 3.0。