This is a migrated thread and some comments may be shown as answers.

Viewpaths in web.config?

1 Answer 111 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael Loffland
Top achievements
Rank 1
Michael Loffland asked on 24 Mar 2009, 05:40 PM
Hello...

I am using the RadEditor provider for Dotnetnuke... I installed the RadEditorProvider... selected it as the default editor for DNN.

Question:

Is it possible to setup the viewpath, uploadpath for the image manager via the web.config? I am using it in Active forums... and I would like to have a default location where all of our users can upload images.. create directories.. etc.. the only thing I want to disable is the ability to delete.

Is this possible?

This is what I have:

Web.config:

       <add name="RadEditorProvider" type="Telerik.DNN.Providers.RadEditorProvider" EditModes="Design,HTML" ToolsFile="~/DesktopModules/TelerikWebUI/CNdefault.xml" DialogHandlerUrl="~/DesktopModules/TelerikWebUI/RadEditorProvider/Telerik.Web.UI.DialogHandler.aspx" ContentAreaCssFile="~/DesktopModules/TelerikWebUI/Custom.css" providerPath="~/DesktopModules/TelerikWebUI" AutoCreatePaths="true" ImagesPaths="~/images/ForumImages/" UploadImagesPaths="~/images/ForumImages/" DeleteImagesPaths="~/images/ForumImages/" MaxImageSize="512000" /> 




TollsFile (CNdefault.xml)

<?xml version="1.0" encoding="utf-8" ?> 
<root> 
    <modules> 
        <module name="RadEditorStatistics" dockingZone="Bottom"/> 
    </modules> 
    <tools name="MainToolbar"
        <tool name="Print" shortcut="CTRL+P"/> 
        <tool name="FindAndReplace" shortcut="CTRL+F"/> 
        <tool separator="true"/> 
        <tool name="Undo" shortcut="CTRL+Z"/> 
        <tool name="Redo" shortcut="CTRL+Y"/> 
    </tools> 
    <tools name="InsertToolbar" > 
        <tool separator="true"/> 
        <tool name="ImageManager" shortcut="CTRL+G"/> 
        <tool name="LinkManager" shortcut="CTRL+K"/> 
        <tool name="Unlink" shortcut="CTRL+SHIFT+K"/> 
    </tools> 
     
    <tools> 
        <tool name="InsertGroupbox" /> 
        <tool name="InsertHorizontalRule" /> 
    </tools> 
     
    <tools> 
        <tool name="FormatBlock"/> 
        <tool name="FontName" shortcut="CTRL+SHIFT+F"/> 
        <tool name="RealFontSize" shortcut="CTRL+SHIFT+P"/> 
    </tools> 
 
    <tools> 
        <tool name="Bold" shortcut="CTRL+B"/> 
        <tool name="Italic" shortcut="CTRL+I"/> 
        <tool name="Underline" shortcut="CTRL+U"/> 
        <tool name="StrikeThrough" /> 
        <tool separator="true"/> 
        <tool name="JustifyLeft" /> 
        <tool name="JustifyCenter" /> 
        <tool name="JustifyRight" /> 
        <tool name="JustifyFull" /> 
        <tool name="JustifyNone" /> 
        <tool separator="true"/> 
        <tool name="Indent" /> 
        <tool name="Outdent" /> 
        <tool separator="true"/> 
        <tool name="InsertOrderedList" /> 
        <tool name="InsertUnorderedList" /> 
    </tools> 
     
    <tools> 
        <tool name="ForeColor"/> 
        <tool name="BackColor"/> 
        <tool name="ApplyClass"/> 
        <tool name="FormatStripper"/> 
    </tools> 
 
    <tools name="DropdownToolbar" > 
        <tool name="InsertSymbol"/> 
        <tool name="InsertTable"/> 
        <tool name="InsertCustomLink" shortcut="CTRL+ALT+K"/> 
    </tools> 
</root> 

With the configuration above... the Image Manager does not even show up... However, if I remove the ImagesPaths, UploadImagesPaths, DeleteImagesPaths, and MaxImageSize from the web.config file... the Image Manager will show up... but its viewpaths are set to the root folder of dotnetnuke.

I have verified that the folders exist in the path indicated... and the folder has full permissions for the NETWORK SERVICE account.

Thanks!
Mike


1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 30 Mar 2009, 12:03 PM
Hi Mike,

The editor provider for DNN uses the DNN security permissions to determine whether users can read/upload/delete files. This is why it will only work with folders in the current portal. You cannot use web application relative paths (~/folder/) in the image paths by default. If you want to use such paths, you will need to edit the code of the editor provider, which is in the ~/App_Code/TelerikWebUI/RadEditorProvider.vb file in your DNN site. The permissions checking is done in the PopulateFolder() method.

Regards,
Lini
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Michael Loffland
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or