Re: Download pub type tute

"jojodee" <jojodee-8nna1qhvBBM9QQeoy3GH/[email protected]> Tue, 5 Aug 2003 01:08:32 +0930
Newsgroups gmane.comp.cms.xaraya.documentation
Organization Xaraya News Server
Message-ID <[email protected]>
Thanks Mike for such a comprehensive reply.

I actually did the tutorial quite a while ago - and then changed it, and
again.  I had three versions each matched to 3 working downloads.  The
reason being that my downloads pubs stopped working - so I had to go fix it.
Then that method stopped - so I fixed it again! Each way worked
differently - perhaps because I was dropping files variously in from bk.
This time I though I'd put it all in there lol and just get some feedback.

I had the following probs over the last few months:

1. If I just had the uploads hooked to articles - i get the the binary
displayed instead of uploaded. So I gave that up - even tho it *was* working
for me that way.

2. Tried with just DD - changed the templates - worked beautifully. Then
went to check my downloads page one day and realized it was showing the
#ulid:x# not the download.

3. Now, I had previously removed the bodyfile field when I changed back to
DD, so in the process of fixing things I put it back. By accident I found
the downloads worked again! Took it out - downloads broke - so that is why I
still have it in there lol.

Anyway, I'll write up a few of these methods and test them all on a fresh bk
install as I do it.

Thanks for your help!


"Michael Cortez" <[email protected]> wrote in message
news:mailman.236.1060010483.8743.xaraya_docs-n5IRV0TL0hwRxVAL8JNkP+OyGI2DFzLe@public.gmane.org
> >> I never did find out how Download pub type is
> >> *supposed* to be setup. If anyone reads the tute, and has a
> >> better way of using dynamic data/uploads - let me know and
> >> I'll update the tute during my edit of it.
> >>
>
> Alternatively, you could choose not to use the DD File Upload field at
all,
> and you should be able to just use the Body File Upload Field -- this
would
> make it so that you don't have to do any template hacking.
>
> You note in your tutorial:
>
> "In our case, we want the file uploaded and saved to disk,
>  ready for downloading, not displayed so we use the Uploads
>  module and hooks."
>
> Yes this was the original intent of that field.
>
> However, if you have the uploads module hooked to articles, and if the
code
> base hasn't changed, then the articles module detects the uploads module
is
> hooked to it, and it allows the upload of files using that field without
> using the DD Upload Property type.
>
> This is actually the mechanism that automatically places in the body text
> field the code #ulid:1#    ---  the DD Upload property type does not place
> that code into any of the other fields, and instead makes it available as
a
> variable to the display templates ($upload in your case, based on the
label
> you provide that field in the DD property config for the publication type}
>
> So since your using the Body field, and the Body File field, and you've
> hooked uploads to the articles module, you should not need the DD Upload
> property at all, and you can simply remove that part of your tutorial and
> the rest should work fine.  If not, I can drop into IRC and help out.
>
> --
> Mike C.
>