[EMAIL PROTECTED] wrote:
> Have seen editthispage? It's an interesting idea,although I think the implementation
> they provide -sucks-. Anyway (www.editthispage.com), they allow you to control
> the site layout with XML. It'd be nifty to add XML parsing so that you could
> let people control things with that.
I've taken a brief look at editthispage. The idea is certainly
interesting, and they
provide many reusable components, which certainly speeds up site
development.
The layout mechanism is usuable but inflexible once you've tasted
Midgard :) and I
think they should have gone for all XML or all HTML but not a mixture. I
understand
the motive (little XML knowledge available, no WYSIXML editors), but
still.
Midgard can certainly server XML documents, so the interesting point is
at what point
to apply the style template, and how to construct it.
> Good idea. How do I do attachments? (that is, is there a nice elegant way
> to do it, or do I just put a path in an extra field or something?)
mgd_list_files, mgd_get_file, mgd_create_file, mgd_update_file and
mgd_delete_file
can be used to 'attach' files to an article. You'll have to store the
file yourself
after it has been posted and update the attachment administration with
these
commands. If you want to send the file to the user you'll need to use
header and readfile
to send the appropriate headers and the actual content.
$att = mgd_list_files($articleid);
while ($att->fetch())
{
/* $att now has these attributes:
$id = file id
$article = $articleid
$type = mime type
$name = filename
$content = path to physical file (need not be the same as $name)
$size = size in bytes
$md5 = MD5 checksum
*/
}
$att = mgd_get_file($fileid);
/* $att now has these attributes:
$id = file id
$article = $articleid
$type = mime type
$name = filename
$content = path to physical file (need not be the same as $name)
$size = size in bytes
$md5 = MD5 checksum
*/
mgd_create_file($articleid, $type, $name, $content, $size, $md5);
mgd_update_file($fileid, $type, $name, $content);
mgd_delete_file($fileid);
Emile
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]