Templates in a database

Last post 07-27-2006, 12:42 AM by grover_gaurav. 15 replies.
Sort Posts: Previous Next
  •  06-27-2006, 7:50 AM 20506

    Templates in a database

    Hi
     
    In my project all templates are stored in a database. The templates (html files) shows up corectly in the "Insert template" dialog, but when I point out a specific template and push the Insert button nothing happens. The preview function does not work either.
    In all other insert dialogs (image, flash, media etc) everything woks fine, even in custom dialogs/function. Images and other files are stored in the database too.
     
    I have downloaded version 5.3, but the insert template problem still exists.
  •  06-27-2006, 10:09 AM 20513 in reply to 20506

    Re: Templates in a database

    Torben,
     
    We will resolve this problem in the next build . Sorry for the inconvenience.
     
     

    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

  •  07-04-2006, 7:28 AM 20683 in reply to 20513

    Re: Templates in a database

    Hi
     
    Until then, is it possible to mix it, so images and media files still are stored in the database, and templates are stored in the file system? In Page_load I put the following 3 lines of code, in order to load and store images in the database.
    txtContent.Setting["CuteEditorFileStorageType"]=typeof(SqlFileStorage).AssemblyQualifiedName;
    txtContent.Setting["DownFile"]=ResolveUrl("../Webforms/DownFile.Aspx");
    txtContent.SetSecurityGalleryPath("/");

    If I set the following line of code in order to get templates from the file system, it won't work, because of the 3 lines above. If I uncomment the 3 lines above, then loading of templates works fine.
    As a solution: Is it possible to trigger the key/button pressed? 

    txtContent.SetSecurityTemplateGalleryPath("~/templates");
     
     
    Thanks
    Torben
  •  07-05-2006, 4:30 PM 20754 in reply to 20683

    Re: Templates in a database

    Torben,
     
    Problem resolved.
     
    Demo:
     
     
    Please use the following inserttemplte file:
     
    Http://CuteSoft.net/download/inserttemplate.zip
     
    >>Until then, is it possible to mix it,
     
    No. it's impossible.
     
    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

  •  07-11-2006, 7:31 AM 20888 in reply to 20754

    Re: Templates in a database

    Thanks for your quick response. CuteSoft delivers a very good support.
     
    Now I can insert templates from a database, but there is still a little bug - even in your online demo. If you want to insert a template, you must both check the file checkbox and click on the file name before you can insert the template into the editor.
    An other issue. I want to customize the dialog, so the user can't upload other templates. I also want to prevent the user from deleting templates etc. I have done this customizing by hiding buttons and by setting the width og heigth property in the HTML tags. This works fine, but I also want to customize the file list, so only checkboxes and filenames are shown. I want to suppress the file size and  the button for editing the template. Is this possible?
    Many functions are apperently included in the TemplateBrowserPage, which is referencend in the top of the InsertTemplate.Frame.aspx file, but these functions can't be modified by the user. There is apperently no configuration files for this purpose.
     
    /Torben
     
  •  07-12-2006, 6:32 PM 20946 in reply to 20888

    Re: Templates in a database

    Torben,
     
    Problem resolved.
     
    Demo:
     
     
    Please use the following inserttemplte file:
     
    Http://CuteSoft.net/download/inserttemplate.zip
     
    >>An other issue. I want to customize the dialog, so the user can't upload other templates. I also want to prevent the user from deleting templates etc.
     
    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>
     
     
    The following example also helps:
     
     
     
    >>I have done this customizing by hiding buttons and by setting the width og heigth property in the HTML tags. This works fine, but I also want to customize the file list, so only checkboxes and filenames are shown. I want to suppress the file size and  the button for editing the template.
     
    It's impossible.
     
     
    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

  •  07-14-2006, 4:05 AM 20977 in reply to 20946

    Re: Templates in a database

    Hi
     
    I know of all these settings, but thy are general settings. If you fx disable uploading (AllowUpdate=false) you can't upload images, media files and templates. What I'm looking for is an individual setting for templates. I know that this isn't possible at the moment, but I will suggest, that you in coming releases make separate policy files or different entries in the exitings policy files.
     
    /Torben  
  •  07-25-2006, 10:12 AM 21227 in reply to 20977

    Re: Templates in a database

    I am still getting a problem loading and saving my template files. It gives me an error saying failed to map template path. What do i do ??
  •  07-25-2006, 12:47 PM 21229 in reply to 21227

    Re: Templates in a database

  •  07-26-2006, 12:29 AM 21247 in reply to 21229

    Re: Templates in a database

    Hi Adam,
     
    Yes I am using version 5.3,
    I wanted to use SQL as my database for storing images and templates, Image part works fine..
    But as soon as i browse for a template and click on upload or create a new template and click on save
    it gives me the same error "failed to map path /filename"
    Please see if you can help me with this.
     
    Thanks
    Gaurav
  •  07-26-2006, 12:33 AM 21248 in reply to 21247

    Re: Templates in a database

    Hi Adam,
     
    One more thing, I forgot to add, i don't have a specific need to save my templates in database...i can save the templates on my server itself..so if the templates could even be read from  a templates folder on the server, that would also work for me
     
    Thanks
    Gaurav
  •  07-26-2006, 1:56 AM 21249 in reply to 21248

    Re: Templates in a database

    Gaurav,
     
    Can you download the latest build of the version 5.3 and try again?
     
    >>But as soon as i browse for a template and click on upload or create a new template and click on save
    >>it gives me the same error "failed to map path /filename"
     
    I belive the DLL you are using is not latest.
     
    We fixed this bug in the latest build.
     
    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

  •  07-26-2006, 2:21 AM 21250 in reply to 21249

    Re: Templates in a database

    Hi Adam,
     
    I downloaded the latest build again, added those classes for connection to database...
    and still its the same error that i recieve, when i click on upload button in templates
     
    Gaurav
  •  07-26-2006, 2:29 AM 21251 in reply to 21250

    Re: Templates in a database

    However as pointed in an earlier mail to this post only if i comment the following lines
     
    txtContent.Setting["CuteEditorFileStorageType"]=typeof(SqlFileStorage).AssemblyQualifiedName;
    txtContent.Setting["DownFile"]=ResolveUrl("../Webforms/DownFile.Aspx");
    txtContent.SetSecurityGalleryPath("/");

    and write the following line on the pageload, everything works fine, and the new template is uploaded

    txtContent.SetSecurityTemplateGalleryPath("~/templates");
  •  07-26-2006, 12:14 PM 21270 in reply to 21251

    Re: Templates in a database

    Gaurav,
     
    It's strange.
     
    This isssue should be fixed in the new build. After Torben reported this bug, we fixed it. Are you sure you have updated all the client files and DLL when upgrading?
     
     

    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

  •  07-27-2006, 12:42 AM 21296 in reply to 21270

    Re: Templates in a database

    Hi Adam,
     
    I had dwlded the latest build from the site. And taken care to use all files from the new dwld.
     
    Thanks and Regards
    Gaurav Grover
View as RSS news feed in XML