>>>>> "Erik" == Erik Curiel <[EMAIL PROTECTED]> writes:

    Erik> Does anyone know an easy way to import images onto wiki
    Erik> sites, in particular onto zwikis?

In you zwiki dir create new document of type 'DTML Method' and name it
like you would a wiki page, like SexyPics.  Also create a Folder
called images (or whatever, the user won't see the folder, only the
script).  You can link to this page off of your wiki in the normal
way, eg, 'see SexyPics'.

Below is the dtml for the page that shows pictures of my daughter Ava.
It iterates over the all of the images in the 'images' dir and creates
links to them.  That is the 'dtml-in' part .  At the bottom is a form
to add new images to the dir.  zope also has an ftp server on 8021 so
you can ftp the images right to the dir with something like:

ncftp ftp://jdh2358:[EMAIL PROTECTED]:8021/Wikis/MiltonWiki/images

Because it is script based, the images page is automatically updated
after each ftp. Here is what you get:

http://nitace.bsd.uchicago.edu:8080/Wikis/MiltonWiki/AvaJohanna

You can modify this in a variety of ways, such as showing the images
on the page rather than the links to the images, or adding thumbnails
etc, but this simple approach serves my purposes.  Once you uploaded
the images, you may want to go add a title to them from the zope
manager interface.

JDH

Here is the dtml:

<dtml-comment> -*- mode: dtml; dtml-top-element: "body" -*- </dtml-comment>
<dtml-var standard_html_header>
<h2>Ava Johanna (and Rahel!) Hunter: <i>The Early Years</i></h2>
<dtml-in expr="images.objectValues()">
<p>
<a href="<dtml-var absolute_url>"><dtml-var title></a>
(<dtml-var getSize> bytes)
</p>
</dtml-in>

<dtml-var standard_html_header>

<br><br><hr>

<p><h2>Upload a picture to the Ava/Rahel Photo Archive.</h2></p>

<form action="photoAction" method="post" enctype="multipart/form-data">
  <p>Description <input type="text" name="photo_title"></p>
  <p>File name   <input type="file" name="file"></p>
  <input type="submit">
</form>
<hr>

<dtml-var standard_html_footer>

Reply via email to