[MTOS-dev] attaching vs. embedding assets to entries patch
Hirotaka Ogawa
hirotaka.ogawa at gmail.com
Sun Mar 23 14:35:47 PDT 2008
On Mon, Mar 24, 2008 at 3:38 AM, Timothy Appnel <tim at appnel.com> wrote:
> On Sat, Mar 22, 2008 at 6:57 AM, Hirotaka Ogawa
> <hirotaka.ogawa at gmail.com> wrote:
>
> > Tim, I can't understand well what you exactly mean by "attaching" and
> > "embedding". Why any assets, which are associated with an entry by
> > objectassets, cannot be treated as *embeded* assets?
>
> Sorry I thought this was generally understood and discussed. Perhaps
> it was on another MT list though.
>
> So there is an asset object that can then be associated to one or more
> objects via the objectasset class to make the association. Currently,
> if I want to associate an asset with an entry (or page) I have to use
> very specific markup (the form element with certain asset id tags) to
> get MT to make the association. If I remove that markup from the body
> of the entry or page the association is removed. So in order to
> associate an asset to an entry or page I must embed specific markup
> (regardless of what text editor) in my text. I had a need where the
> asset needs to be associated to the entry, but it doesn't make sense
> to embed it in the body. (Think of a presentation file, word doc or
> some see also links.) What is missing is the functionality equivalent
> of an email attachment. The ability to associate an asset to an entry
> without having to embed specific markup and decided its layout in the
> body of an entry or post.
>
> I looked into implementing such functionality as a plugin; however,
> the MT::Entry save method will remove any asset association it cannot
> find in the text or text_more columns upon saving. This makes creating
> an asset association of any other type not possible. I can create it,
> but as soon as the entry is saved MT will delete the association
> because it can't find it as a form tag. The patch I sent would change
> that by marking an association if it was created by the markup in the
> body of an entry and only remove those if they are no long present in
> those fields. If an association were created outside of that context
> without the embedded flag up then it would remain for the other system
> (plugin) to handle.
>
> So embedding means the association is created by specific markup in
> the text or text more columns. Attachment means a specific association
> is created like attaching a file to an email message. Its sent and
> part of the message, but it doesn't appear in the message itself.
Make sense. In other words, you'd like to classify the associations
into two different classes.
I wonder if we don't need another classes of the associations. I
cannot imagine now. But, instead of adding 'embeded' flag, we can
facilitate the class_type mechanism provided by MT::Object in order to
classify things, or can just add 'asset_type' field which indicates
that its association is attached, embeded, or something else.
Anyway, I can agree with your proposal.
>
>
>
> <tim/>
>
> --
> Timothy Appnel
> Appnel Solutions
> http://appnel.com/
>
--
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
More information about the MTOS-dev
mailing list