On Wed, 2003-02-05 at 13:47, Midgard wrote:
> How do I construct attachment url to be used in a page?

If you have created your web site with Aegir CMS, you
will have the Nadmin-style attachment host
(http://my.host.com/attachment/GUID/).

In that case it will be simple:

> $topic = mgd_get_topic(258); 
>   
>   $list    = $topic->listattachments();
>   while($list->fetch()) {
>    
>     $attachment = mgd_get_attachment($list->id);

      $sitegroup = mgd_get_sitegroup($midgard->sitegroup);
     

      $image_url =
"$HTTP_HOST/attachment/".$sitegroup->guid()."/".$attachment->guid()."/$file_name";
>   }

/Bergie

-- 
Henri Bergius                           [EMAIL PROTECTED]
Consultant Partner                      Tel: +358-20-198 6032
Nemein Oy                               http://www.nemein.com/

Nemein.Net -- Project tracking solution for consulting companies
http://www.nemein.com/Nemein.Net/


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

Reply via email to