[MTOS-dev] attaching vs. embedding assets to entries patch
Byrne Reese
byrne at sixapart.com
Mon Mar 24 09:52:39 PDT 2008
+1 for your idea! This is definitely needed.
Not trying to slow things down at all, especially given the rising support
for you patch, let me stop to consider if the whole problem is solved by
this patch.
But let summarize the problem statements as I see them:
* users cannot associate an asset to an entry without embedding it somehow
into the text of the entry. Sometimes this is not desired by the author.
* associations and links between assets and entries are established via
markup - which is confusing and even fragile
* some users will want to add images to an entry that are not intended to be
assets
Now, let's summarize a solution, which your patch should already partially
or completely implement:
* we need a way for MT to differentiate between assets that have been
associated manually vs those associated via being inserted
* we need a way for MT to auto-detect assets that may have been
inserted/removed into/from an entry and then to create/remove an association
between that asset and entry
* we need a simple API to allow plugins, or other methods of
creating/removing an association between an entry and asset. A good example
is custom fields, or another attachment mechanism.
* we need a simpler association method - the complex HTML wrapper is
confusing. Can it be reduced somehow? Perhaps to a simple: mt:asset_id=""
attribute?
Is this accurate.
On 3/23/08 11: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.
>
> <tim/>
More information about the MTOS-dev
mailing list