ManniAT
  •  ManniAT
  • 59% (Neutral)
  • YAF Camper Topic Starter
2009-09-14T12:51:11Z
Hi,

since it took me some time to add this integration I thought it could be helpful for other users.
To enable Image managing with the telerik RadEditor you have to do the following.
Locate toolsFile.xml (/editors/radEditor)
And modify it as following:
	<tools name="MainToolbar" enabled="true">
		<tool name="ModuleManager" />

	<tools name="MainToolbar" enabled="true">
		<tool name="ImageManager" shortcut="CTRL+M"/>
		<tool name="ModuleManager" />
 
Of course you can place the tool wherever you want.
Next it's up to modify code.
Locate the file ForumEditor.cs (/App_Code/YAF)
About line 750 (in the class RadEditor - method Editor_Load) change the code to:
                if (Config.UseRadEditorToolsFile)
                {
                    pInfo = _typEditor.GetProperty("ToolsFile");
                    pInfo.SetValue(_editor, Config.RadEditorToolsFile, null);
                }
				//add the next lines
				Telerik.Web.UI.RadEditor rE = (Telerik.Web.UI.RadEditor)_editor;
				rE.ImageManager.ViewPaths = new string[] { "~/Upload" };
				rE.ImageManager.DeletePaths = new string[] { "~/Upload" };
				rE.ImageManager.UploadPaths = new string[] { "~/Upload" };

Modify web.config (like with spell checking described here: spellcheck integration )
--in the section <httpHandlers> add the following line
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
--for IIS 7 add the following line in the section <handlers>
<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>

You are done - simply click the tool icon and you can upload, delete,....
If you don't want the users to delete files simply do NOT add the line
rE.ImageManager.DeletePaths = new string[] { "~/Upload" };

Regards
Manfred
Sponsor

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved