|
OK.
Have you read the different comments made under the annotated manual? If you
still got any problems, go ahead.
Some
tips:
When
it comes to blobs, the simple part is to make a 'blobfolder' in in midgard. The
folder contains the code for serving an attachment. Just make a subpage in
midgard, and add the following to the code-init page
element:
<?
if ($argc == 1) { mgd_serve_attachment($argv[0]); exit; } if ($argc == 2) { mgd_serve_attachment($argv[0]); exit; } ?> (the
subpage must be active)
When
you whant to call an attachent you've uploaded somehow(I'm only familiar with
the framed admin and there attachments are only used in articles, but it
shouldn't matter), you just need to know it's id. If you got an attachment with
id = 134. You can do <img src=/imfolder/134> and it should work out ok.
I've fiddled with the code in the framed admin (se the maillinglist archive for
how) so I can include with and height for images, very practical, but then you
need to to mgd_get_attachment();.
The
code init element I've added in this mail, has one favourable part to the one
which I think is in my annotation, you can add the imagename. So instead for
doing:
<img src=ID> you do something like
<?
if ($att) {
$att =
mgd_get_attachment($att);
?>
<img
src=/imgfolder/&(att.id);/&(att.name);">
<?
}
?>
this
gives you a way to give back the former attachment name if that is interesting.
I use this when people are going to download files etc..
btw.
The twig implementation for midgard done a few months ago, is possible to make
it into some .txt files that peole can download and enter into their own site as
snippets? Tarjei
|
- [midgard-user] attachment IT Partner
- Re: [midgard-user] attachment Henri Bergius
- Tarjei Huse
