Upload button in the Insert Image screen

Last post 12-05-2007, 1:08 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  12-04-2007, 10:34 AM 35631

    Upload button in the Insert Image screen

    Dear All
     
    Can anyone tell me how I can either
     
    1) make the Upload button in the Insert Image screen invisible or
     
    2) ideally tell me how I can get rid of this fieldset
     

    <fieldset id="fieldsetUpload">

    <legend>

    [[Upload]] ([[MaxFileSizeAllowed]]

    <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageSize * 1024)%>

    )</legend>

    <table border="0" cellspacing="2" cellpadding="0" width="100%" class="normal">

    <tr>

    <td style="width:8">

    </td>

    </tr>

    <tr>

    <td valign="top" style="FONT-SIZE: 8pt; vertical-align: middle; FONT-FAMILY: MS Sans Serif">

    <CE:UploadSingleFile id="InputFile" runat="server"></CE:UploadSingleFile>

    </td>

    </tr>

    <tr>

    <td style="width:5">

    </td>

    </tr>

    <tr>

    <td>

    <ul style="margin-top:0; margin-bottom:0;">

    <% if(secset.RestrictUploadedImageDimension) {%>

    <li>

    [[MaxImagedImension]]

    <%= secset.MaxImageWidth%>

    x

    <%= secset.MaxImageHeight%>

    [[pixels]].

    </li>

    <li>

    [[AutomaticImageResizeOnOff]]

    <%= secset.AutoResizeUploadedImages? "[[on]]":"[[off]]" %>.

    <%}%>

    </li>

    <li>

    <span style="white-space:nowrap">[[MaxFolderSizeAllowed]]:

    <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageFolderSize * 1024)%>.

    [[Used]]: <%= CuteEditor.Impl.FileStorage.FormatSize(fs.GetDirectorySize(fs.VirtualRoot)) %>

    <span style="background-color:green;height:3px;width:40px;font-size:3px"><span style="background-color:red;height:3px;width:<%= GetUsedSpaceBarWidth() %>px;font-size:3px">

    </span></span>

    </span>

    </li>

    </ul>

    </td>

    </tr>

    </table>

    </fieldset>

    and insert my own button for the Upload, since i have written some code myself for the upload.
     
    Thanks a lot, your help is very much appreciated!
     
    JW
  •  12-04-2007, 10:53 AM 35632 in reply to 35631

    Re: Upload button in the Insert Image screen

    JW,
     

    You can easily hide upload functions 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 AllowUpload element.  By default, it contains the following value:


    <
    security name="AllowUpload">false</security>
      

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

    For example:

    <security name="AllowUpload">false</security>


     

    2: Programmatically limit the size of the image upload folder:


    C# Example:

    Editor1.Setting["security:AllowUpload"]= "false";
    or
    Editor1.SetSecurityAllowUpload= false;


    VB Example:

    Editor1.Setting("security:AllowUpload")= "false"
    or
    Editor1.SetSecurityAllowUpload= false
     

    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

  •  12-05-2007, 4:21 AM 35657 in reply to 35632

    Re: Upload button in the Insert Image screen

    Hi Adam
     
    Thanks for your reply.
     
    I like the code function more cause you can turn it on or off for a particluar page (aspx).
     
    As far as I know, there is not reference for the editor in CuteSoft_Client/CuteEditor/Dialogs/InsertImage.aspx, so how can I get a reference for this file?
     
    Also, is it possible to hide all the panel out, the one where there is the following:-
     

    <fieldset id="fieldsetUpload">

    <legend>

    [[Upload]] ([[MaxFileSizeAllowed]]

    <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageSize * 1024)%>

    )</legend>

    <table border="0" cellspacing="2" cellpadding="0" width="100%" class="normal">

    <tr>

    <td style="width:8">

    </td>

    </tr>

    <tr>

    <td valign="top" style="FONT-SIZE: 8pt; vertical-align: middle; FONT-FAMILY: MS Sans Serif">

    <CE:UploadSingleFile id="InputFile" runat="server"></CE:UploadSingleFile>

    </td>

    </tr>

    <tr>

    <td style="width:5">

    </td>

    </tr>

    <tr>

    <td>

    <ul style="margin-top:0; margin-bottom:0;">

    <% if(secset.RestrictUploadedImageDimension) {%>

    <li>

    [[MaxImagedImension]]

    <%= secset.MaxImageWidth%>

    x

    <%= secset.MaxImageHeight%>

    [[pixels]].

    </li>

    <li>

    [[AutomaticImageResizeOnOff]]

    <%= secset.AutoResizeUploadedImages? "[[on]]":"[[off]]" %>.

    <%}%>

    </li>

    <li>

    <span style="white-space:nowrap">[[MaxFolderSizeAllowed]]:

    <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageFolderSize * 1024)%>.

    [[Used]]: <%= CuteEditor.Impl.FileStorage.FormatSize(fs.GetDirectorySize(fs.VirtualRoot)) %>

    <span style="background-color:green;height:3px;width:40px;font-size:3px"><span style="background-color:red;height:3px;width:<%= GetUsedSpaceBarWidth() %>px;font-size:3px">

    </span></span>

    </span>

    </li>

    </ul>

    </td>

    </tr>

    </table>

    </fieldset>
     
    Thanks again for your help
     
    Johann
  •  12-05-2007, 4:25 AM 35658 in reply to 35657

    Re: Upload button in the Insert Image screen

    Adam, I managed to remove the Upload button as instructed by you in the Configuration/Security section, however I wish to remove the whole upload panel, not to mislead the users.
     
    Is there a possibility to do that?
     
    Thanks
     
     
  •  12-05-2007, 1:08 PM 35670 in reply to 35658

    Re: Upload button in the Insert Image screen

    yes, it's possible.

    Please follow the steps below:

    1. Open CuteSoft_Client\CuteEditor\Dialogs\InsertImage.aspx
     
    2. Change the following code:
     
    <fieldset id="fieldsetUpload">
     
    to:
     
    <fieldset id="fieldsetUpload" style="display:none">
     
    Hope it helps.
     
     

    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