Menu

Image support

Help
2004-09-01
2004-09-01
  • Jerry Gennaria

    Jerry Gennaria - 2004-09-01

    I am using Kafenio in a CMS I'm building and I have successfully integrated it into the forms but I'm having trouble with the insert image function.

    Clicking insert image shows the dialog box, but I can't get images to appear in the list. I think it has to do with where I store the images, so here is my setup.

    First of all, I have Kafenio configured for CGI support. Is that correct? I understand that using CGI rather than Java causes the image directory/file directory parameters to not apply.

    Second I'm developing the system on an internal network. The url for the site is http://192.168.1.250/~jerry/mbc/ and the content management components are at http://192.168.1.250/~jerry/mbc/cms/ the .jar files are at http://192.168.1.250/~jerry/mbc/cms/editor/

    Ideally I would like the images used by Kafenio to reside at http://192.168.1.250/~jerry/mbc/images/ but I'm flexible and can name the directory the images reside in to anything and am willing to place the directory somewhere else.

    Currently I have the following parameters set as follows:

      <param name="CODEBASE" value="http://192.168.1.250/~jerry/mbc/cms/">
      <param name="ARCHIVE" value="editor/applet.jar,editor/gnu-regexp-1.1.4.jar,editor/config.jar,editor/icons.jar">

    What other parameters should I set or change to make this work?

    jerry

     
    • Karsten Pawlik

      Karsten Pawlik - 2004-09-01

      hi jerry,
      for the "insert image from server" feature it is irrelevant what your codebase is set to or wich items your archive-tag contains.

      the kafenio applet contains the possibility to read information about images (URLs and display-names) from a URL.

      in the demo folder you can find a file called getDemoData.php wich explains the format in wich the kafenio applet wants to receive the image-path and/or file-path information.

      you need to deploy this script on a http-server and put the url to the script in the "servleturl" parameter.
      please also need to set the "servletmode" parameter to cgi in order to make it work.

      to give you a quick start on the file format:
      the script adds the parameter GetImages=true to the URL defined in the "servleturl" parameter.

      example:
      if the URL in "servleturl" is

      http://www.kafenio.org/cgi-bin/getDemoData.php

      the URL that is called when you open the "insert image from server" dialog would be:

      http://www.kafenio.org/cgi-bin/getDemoData.php?GetImages=true

      the script then responds with a plain-text document.

      the document contains on the first line the URL prefix to a directory where all images reside. if you want to use absolute paths for each image (i.e.: if the images reside on more than one server) just leave the first line blank.

      all further lines then contain the image-paths relative to the URL-prefix that was defined in line 1 (in case line1 is blank, all images need to have absolute URLs).

      example1 (relative image paths):
      http://www.xeinfach.de/media/projects/kafenio/\n
      screenshots/one.gif\n
      screenshots/two.gif\n

      example 2 (absolute image paths):
      \n
      http://www.xeinfach.de/media/projects/kafenio/screenshots/one.gif\n
      http://www.xeinfach.de/media/projects/kafenio/screenshots/two.gif\n
      http://www.anotherserver.com/images/one.gif

      example 3 (invalid!):
      http://www.xeinfach.de/media/projects/kafenio/\n
      screenshots/one.gif\n
      screenshots/two.gif\n
      http://www.anotherserver.com/images/one.gif

      in case your server does not support php, use any other language or just take a plain-text file that outputs the image-paths in the manner described above.

      hope this helps. if not please let me know.
      regards
      karsten.

       

Log in to post a comment.