Nicholas Janzen wrote:

PS, please read http://www.webfoot.com/advice/email.context.html?Email

> > There's no canonical URL for a non-page attachment. You'll need PHP
> > code to serve them, something like a page /file/ with element
> > code-init:
> >
> > <? mgd_serve_attachement($argv[0]); exit; ?>
>
> then how do you call this?

Create an active page called /file (or whatever), create a page
element code-init, put the above code in it, then from the page you're
using to dosplay the article, do something like:

<? $article = mgd_get_article($whatever);
   $atts = $article->listattachments;
   while ($atts && $atts->fetch()) {
?>
<A HREF="/file/&(atts.id)">&(atts.title);</a><br>
<? } ?>

This is just a sample, of course.

Emile


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to