How do you get the URL type not to overird the Image Gallery path?

Last post 03-25-2010, 2:08 PM by Eric. 3 replies.
Sort Posts: Previous Next
  •  03-18-2010, 12:48 PM 59490

    How do you get the URL type not to overird the Image Gallery path?

    No matter what I do to  try and set the image gallery path the Editor.URLType over rides it.  If I set the URLType to default the link button on the toolbar will work the way I want it but when I use the image upload/insert or the file insert then the source that points to the files becomes relative and I am not storign the files and pictues in the project directory.   The help says to use this to set the image gallery path 
    editor.ImageGalleryPath = "/Uploads"  When I try this it tells me that imagegallery is not a member of cuteeditor.editor so I had to use   Editor1.Setting("security:ImageGalleryPath") but that doesnt work either.

    this is what the html view shows
    <div><a title="google" href="www.google.com">google</a> </div>
    <div>&nbsp;</div>
    <div><img border="0" alt="" src="http://cutesoft.net/uploadstest/1.jpg" width="215" height="300" /></div>
     
     this is what it show if I change the URLType to Absolute
    <div><a title="google" href="http://localhost/BroadcastEmail/www.google.com">google</a></div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div><img border="0" alt="" src="http://localhost/uploadstest/1.jpg" width="215" height="300" /></div>
     
    Waht I need it to show is
     this is what it show if I change the URLType to Absolute
    <div><a title="google" href="www.google.com">google</a></div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div><img border="0" alt="" src="http://localhost/uploadstest/1.jpg" width="215" height="300" /></div>
     
    If I change the URL Type to Absolute then the image upload/insert and fiel insert work but the link button does not create the correct url.  It adds the directoy path to the link?
     
    Any Ideas, thanks
     
  •  03-18-2010, 2:42 PM 59492 in reply to 59490

    Re: How do you get the URL type not to overird the Image Gallery path?

    Larryluv33,
     
    1. To set the image gallery path, please use the following method:
     
    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><!-- Image Gallery Dialog -->
    <security name ="ImageBrowserPath" >~/uploads</security><!-- Insert Image Dialog -->


    You can modify ImageGalleryPath element and ImageBrowserPath element to meet your own requirements.

    For example:

    Use absolute path:


    <security name ="ImageGalleryPath" >/uploads</security><!-- Image Gallery Dialog -->
    <security name ="ImageBrowserPath" >/uploads</security><!-- Insert Image Dialog -->


    Use physical path:


    <security name="ImageGalleryPath" >c:\inetpub\wwwroot\uploads</security><!-- Image Gallery Dialog -->
    <security name="ImageBrowserPath" >c:\inetpub\wwwroot\uploads</security><!-- Insert Image Dialog -->



    2. Programmatically specify the Image gallery path

    C# Example:

    //use the app-based path 

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

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

    VB Example:

    //use the app-based path 

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

    Editor1.SetSecurityImageGalleryPath("~/uploads")
    Editor1.SetSecurityImageBrowserPath("~/uploads")
     
    2. For the URLType issue, please check the following example:
     
     
    Cute Editor will not change your domain name when changing URLType property.
     
    Http://somesite/some.htm stays unchanged.
     
    Hope it helps.
     
    Keep me posted

    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

  •  03-25-2010, 10:53 AM 59653 in reply to 59492

    Re: How do you get the URL type not to overird the Image Gallery path?

    Ive tried everythign you posted in your reply and none of it seems to resolve the issue.    Are there any working examples that show this with the code?
  •  03-25-2010, 2:08 PM 59656 in reply to 59653

    Re: How do you get the URL type not to overird the Image Gallery path?

    Dear larryluv33,
     
    Example can be found in download package, path is CuteEditor_for_NET6\Framework 2.0\cs\implementSecuritypolicy.aspx
     
    Regards,
    Eric
View as RSS news feed in XML