different locations for link / document root

Last post 07-28-2008, 2:20 PM by Adam. 7 replies.
Sort Posts: Previous Next
  •  04-15-2008, 3:26 AM 39214

    different locations for link / document root

    Hi,
     
    Hopefully this is a quick fix - at present I have a directory for my document uploads to go, say /documents/uploaded/.  Thats fine, and can be set in the default.config XML.  However setting this also sets the root for browsing for  hyperlinks, which users need to browse from the site root.
     
    How do I make these roots different?  It's pretty essential at the moment as I can't allow documents uploaded to root, but also I need the browse facility for linking.
     
    Many thanks
     
    Alan

  •  04-15-2008, 9:15 AM 39247 in reply to 39214

    Re: different locations for link / document root

    Alan,
     
     

    How to specify the Image gallery path?

    You can easily specify the image gallery path using the following methods:

    1: Edit security policy file:


    The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder. In security policy file you can find the ImageGalleryPath element which contains the image gallery path information within CuteEditor.  By default, it contains the following value:


    <
    security name="ImageGalleryPath">~/uploads</security>
      

    You can modify the ImageGalleryPath element to meet your own requirements.

    For example:

    Use absolute path:

    <security name="ImageGalleryPath">/uploads</security>

     

    Use physical path:

    <security name="ImageGalleryPath">c:\inetpub\wwwroot\uploads</security>

     

    2: Programmatically specify the Image gallery path:


    C# Example:

    //use the app-based path 

    Editor1.Setting["security:ImageGalleryPath"]= "~/uploads";
    //use the absolute path 
    Editor1.Setting["security:ImageGalleryPath"]= "/uploads";
    //use the physical path 
    Editor1.Setting["security:ImageGalleryPath"]= @"c:\inetpub\wwwroot\uploads";
    or
    //use the app-based path 

    Editor1.SetSecurityImageGalleryPath("~/uploads");
    //use the absolute path 
    Editor1.SetSecurityImageGalleryPath("/uploads");
    //use the physical path 
    Editor1.SetSecurityImageGalleryPath("c:\inetpub\wwwroot\uploads");


    VB Example:

    //use the app-based path 

    Editor1.Setting("security:ImageGalleryPath")= "~/uploads"
    //use the absolute path 
    Editor1.Setting("security:ImageGalleryPath")= "/uploads"
    //use the physical path 
    Editor1.Setting("security:ImageGalleryPath")= "c:\inetpub\wwwroot\uploads" 
    or
    //use the app-based path 

    Editor1.SetSecurityImageGalleryPath("~/uploads")
    //use the absolute path 
    Editor1.SetSecurityImageGalleryPath("/uploads")
    //use the physical path 
    Editor1.SetSecurityImageGalleryPath("c:\inetpub\wwwroot\uploads") 
     

    How to Specify the Document Gallery Path

    You can easily specify the document gallery path using the following methods:

    1: Edit security policy file.:


    The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder. In security policy file you can find the FilesGalleryPath element which contains the document gallery path information within Cute Editor.  By default, it contains the following value:


    <
    security name="FilesGalleryPath">~/uploads</security>
      

    You can modify the FilesGalleryPath element to meet your own requirements.

    For example:

    Use absolute path:

    <security name="FilesGalleryPath">/uploads</security>

     

    Use physical path:

    <security name="FilesGalleryPath">c:\inetpub\wwwroot\uploads</security>

     

    2: Programmatically specify the Document gallery path:


    C# Example:

    //use the app-based path 

    Editor1.Setting["security:FilesGalleryPath"]= "~/uploads";
    //use the absolute path 
    Editor1.Setting["security:FilesGalleryPath"]= "/uploads";
    //use the physical path 
    Editor1.Setting["security:FilesGalleryPath"]= @"c:\inetpub\wwwroot\uploads";


    VB Example:

    //use the app-based path 

    Editor1.Setting("security:FilesGalleryPath")= "~/uploads"
    //use the absolute path 
    Editor1.Setting("security:FilesGalleryPath")= "/uploads"
    //use the physical path 
    Editor1.Setting("security:FilesGalleryPath")= "c:\inetpub\wwwroot\uploads" 

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-15-2008, 4:29 PM 39257 in reply to 39247

    Re: different locations for link / document root

    Hi,
     
    I think you misunderstand my question - I knew all that - as mentioned in the OP I can set the default paths for images, files etc.  My question is how to distinguish between the root directory for documents, i.e. when clicking on the PDF icon, and that of the hyperlinks, when clicking on the link icon.  At the moment it seems one setting controls both, and I need to separate this.
     
    Many thanks
     
    Alan

  •  04-15-2008, 6:05 PM 39260 in reply to 39257

    Re: different locations for link / document root

    Also,
     
    If this isn't configurable using config settings, I'm more than happy for it to be hard coded if you tell me which parts I need to change.  I just need a resolution ASAP as I have a client that is requiring this urgently.
     
    Many thanks
     

  •  04-15-2008, 6:30 PM 39261 in reply to 39260

    Re: different locations for link / document root

    alanjames,
     
    Please open CuteSoft_Client\CuteEditor\Dialogs\SelectFile.aspx and modify the following code:
     

    fs.VirtualRoot=CuteEditor.EditorUtility.ProcessWebPath(Context,null,secset.FilesGalleryPath).TrimEnd('/')+"/";

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-15-2008, 6:39 PM 39262 in reply to 39261

    Re: different locations for link / document root

    excellent - thanks for that.
  •  07-28-2008, 3:25 AM 42573 in reply to 39260

    Re: different locations for link / document root

    Hi AlanJames,
     
    i have the same problem with the distinction of upload (data) path and link path. I want to let the user create links to all files under root (including subdirs) but upload only into one special folder.
     
    Now, can you please tell me how you solved this problem?
     
    Many thanks in advance,
    Petra.
  •  07-28-2008, 2:20 PM 42583 in reply to 42573

    Re: different locations for link / document root

    Petra,
     
    Please open CuteSoft_Client\CuteEditor\Dialogs\SelectFile.aspx and change the following code:
     


    fs.VirtualRoot=CuteEditor.EditorUtility.ProcessWebPath(Context,null,secset.FilesGalleryPath).TrimEnd('/')+"/";

    to:

    fs.VirtualRoot=CuteEditor.EditorUtility.ProcessWebPath(Context,null,"/")+"/";


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML