Use <img tag to allow linking to images, but not uploading.

Last post 04-10-2007, 8:08 PM by ckincincy. 11 replies.
Sort Posts: Previous Next
  •  04-02-2007, 1:04 PM 27924

    Use <img tag to allow linking to images, but not uploading.

    I want to add the ability for a user to link to an image, but not allow them to upload the image.

    So they can add images to their post, but the image has to be hosted at an external source.

    Possible?

  •  04-02-2007, 2:41 PM 27930 in reply to 27924

    Re: Use <img tag to allow linking to images, but not uploading.

    ckincincy,
     
    Please edit the security policy file (default.config, admin.config and guest.config).

    The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder.
    <configuration>
     <security name="RestrictUploadedImageDimension">true</security>
     <security name="OverWriteExistingUploadedFile">false</security>
     <security name="UseTimeStampRenameUploadedFiles">true</security>
     <security name="AutoResizeUploadedImages">true</security>
     <security name="MaxImageWidth">400</security>
     <security name="MaxImageHeight">768</security>
     <security name="MaxImageSize">200</security>
     <security name="MaxMediaSize">10000</security>
     <security name="MaxFlashSize">1000</security>
     <security name="MaxDocumentSize">10000</security>
     <security name="MaxTemplateSize">1000</security>
     <security name="ImageGalleryPath">~/uploads</security>
     <security name="MediaGalleryPath">~/uploads</security>
     <security name="FlashGalleryPath">~/uploads</security>
     <security name="TemplateGalleryPath">~/templates</security>
     <security name="FilesGalleryPath">~/uploads</security>
     <security name="MaxImageFolderSize">102400</security>
     <security name="MaxMediaFolderSize">102400</security>
     <security name="MaxFlashFolderSize">102400</security>
     <security name="MaxDocumentFolderSize">102400</security>
     <security name="MaxTemplateFolderSize">102400</security>
     <security name="ThumbnailWidth">80</security>
     <security name="ThumbnailHeight">80</security>
     <security name="ThumbnailColumns">5</security>
     <security name="ThumbnailRows">3</security>
     <security name="AllowUpload">true</security>
     <security name="AllowModify">true</security>
     <security name="AllowRename">true</security>
     <security name="AllowDelete">true</security>
     <security name="AllowCopy">true</security>
     <security name="AllowMove">true</security> <!-- this is rename too -->
     <security name="AllowCreateFolder">true</security>
     <security name="AllowDeleteFolder">true</security>
     <security name="ImageFilters">
      <item>.jpg</item>
      <item>.jpeg</item>
      <item>.gif</item>
      <item>.png</item>
     </security>
     <security name="MediaFilters">
      <item>.avi</item>
      <item>.mpg</item>
      <item>.mpeg</item>
      <item>.mp3</item>
     </security>
     <security name="DocumentFilters">
      <item>.txt</item>
      <item>.doc</item>
      <item>.pdf</item>
      <item>.zip</item>
      <item>.rar</item>
      <item>.avi</item>
      <item>.mpg</item>
      <item>.mpeg</item>
      <item>.swf</item>
      <item>.jpg</item>
      <item>.jpeg</item>
      <item>.gif</item>
      <item>.png</item>
      <item>.htm</item>
     </security>
    </configuration>
     

    This property can be programmingly set as well.

     

    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-03-2007, 11:57 AM 27958 in reply to 27930

    Re: Use <img tag to allow linking to images, but not uploading.

    Is there a way to not show much of the dialog that appears?  I don't need the file browse and such on the top of the screen.



  •  04-03-2007, 7:53 PM 27975 in reply to 27958

    Re: Use <img tag to allow linking to images, but not uploading.

    ckincincy,
     
    Yes.
     
    You can put the toolbar items needed to be disabled into this Editor.DisableItemList string.

    For example:

    <CE:Editor id="Editor1" DisableItemList="save, help, CssStyle" runat="server"></CE:Editor>


    C# Example:

     

    Editor1.DisableItemList = "save, help, CssStyle";


    VB

     

    Editor1.DisableItemList = "save, help, CssStyle"
     
    For details, please check the following article:
     
     
     
     
     

    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-04-2007, 5:34 PM 27998 in reply to 27975

    Re: Use <img tag to allow linking to images, but not uploading.

    I'm not talking about the tool bar but the upload window that appears when I click the image button.
  •  04-04-2007, 9:24 PM 28003 in reply to 27998

    Re: Use <img tag to allow linking to images, but not uploading.

    The upload button will disappear if you set the following property to false.

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

    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-05-2007, 1:56 PM 28016 in reply to 28003

    Re: Use <img tag to allow linking to images, but not uploading.

    But then how do I let them add an image to their post?  Maybe we are talking in circles here...

    I want the user to not be able to upload anything, but to be able to display an image in their HTML content.

    I have disabled the ability to upload, but when they hit the Insert Image button it displays the dialog with the upload area grayed out, along with the two directory boxes at the top of that dialog.  I'd really just prefer a window popped up with a few options:
    1. Image size (if blank then the full size of the image should show).
    2. Alt text.
    3. Link to image.

  •  04-05-2007, 2:23 PM 28019 in reply to 28016

    Re: Use <img tag to allow linking to images, but not uploading.

    ckincincy,
     
    I understand what you need now.
     
    It's possible to remove those options.
     
    For example, to remove upload part.
     
    Please open InsertImage.Frame.aspx file and find the following code:
     
    <fieldset id="fieldsetUpload">
           <legend>
            [[Upload]] (Max file size allowed
            <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageSize * 1024)%>
            )
           </legend>
           .....
           
    </fieldset>
     
    And change it to:
     
    <fieldset id="fieldsetUpload" style="display:none">
           <legend>
            [[Upload]] (Max file size allowed
            <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxImageSize * 1024)%>
            )
           </legend>
           .....
           
    </fieldset>
     
    Hope it helps.
     
    Let me know if you have any further questions.
     
     
     
     

    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-10-2007, 1:28 PM 28112 in reply to 28019

    Re: Use <img tag to allow linking to images, but not uploading.

    So how can I change the size of this window?  Now that I've removed so much it looks very empty.

    Also you may want to remember to mention the Gecko_ file as well...

  •  04-10-2007, 6:02 PM 28123 in reply to 27924

    Re: Use <img tag to allow linking to images, but not uploading.

    Adam,
    Don't let me down now... I was just bragging to my boss about the support offered by you guys :-).  Any idea how to resize this without adding a java script command to the top of the page?

  •  04-10-2007, 6:19 PM 28125 in reply to 28112

    Re: Use <img tag to allow linking to images, but not uploading.

    If you are using version 6.0, please open the following file:
     
    constants.js
     
    And modify the following code:
     
    // Default window ornaments for the image dialog
    editorconstant._imageDialogFeature = "status:0;dialogWidth:620px;dialogHeight:595px; scroll: 0; resizable: 0; help:0";

    If you are using version 5.3, please open the following file:
     
    CuteEditorconstants.js
     
    And modify the following code:

    // Default window ornaments for the image dialog
    var _imageDialogFeature = "status:0;dialogWidth:620px;dialogHeight:595px; scroll: 0; resizable: 0; help:0";
     

    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-10-2007, 8:08 PM 28129 in reply to 28125

    Re: Use <img tag to allow linking to images, but not uploading.

    Perfect!

    Will be on 5.3 for a few weeks/months while you all work out the kinks.

View as RSS news feed in XML