| 1 | Assetylene, a plugin for Movable Type |
|---|
| 2 | ====================================== |
|---|
| 3 | |
|---|
| 4 | This plugin provides a new "Caption" field when inserting an asset into a |
|---|
| 5 | post, and the ability to customize the HTML markup produced for publishing MT |
|---|
| 6 | assets. |
|---|
| 7 | |
|---|
| 8 | Usage |
|---|
| 9 | ------ |
|---|
| 10 | |
|---|
| 11 | You can create a custom template module, named "Asset Insertion", and that |
|---|
| 12 | template will then be used to create the HTML for any asset you embed |
|---|
| 13 | into a post. |
|---|
| 14 | |
|---|
| 15 | There are a number of template variables made available to this template: |
|---|
| 16 | |
|---|
| 17 | * upload_html: This is the original markup MT constructed for the |
|---|
| 18 | inserted asset. |
|---|
| 19 | * enclose: 1 or 0, depending on whether the asset is to be wrapped with a |
|---|
| 20 | 'form' tag. |
|---|
| 21 | * include: 1 or 0, depending on whether the image is to be displayed or |
|---|
| 22 | simply linked to. |
|---|
| 23 | * thumb: 1 or 0, depending on whether the inline image is a thumbnail |
|---|
| 24 | of the original. |
|---|
| 25 | * align: The value of the alignment option ('none', 'left', 'right', |
|---|
| 26 | 'center'). |
|---|
| 27 | * popup: 1 or 0, depending on whether the thumbnail image is linked |
|---|
| 28 | to a popup of the full image. |
|---|
| 29 | * caption: The value entered for the caption on the insert options dialog. |
|---|
| 30 | * label: The 'label' value of the asset being inserted. |
|---|
| 31 | * description: The 'description' value of the asset being inserted. |
|---|
| 32 | * asset_id: The numeric ID of the asset being inserted. |
|---|
| 33 | * form_tag: The opening HTML form tag MT creates to enclose the |
|---|
| 34 | asset. If you output this, be sure to add a closing form tag |
|---|
| 35 | as well. |
|---|
| 36 | * form_class: The CSS class name(s) applied to the form tag. |
|---|
| 37 | * form_style: The CSS styling applied to the form tag. |
|---|
| 38 | * img_tag: The MT-constructed img tag being inserted (this is unset |
|---|
| 39 | if no image is actually inserted and linked to instead). |
|---|
| 40 | * img_alt: The "alt" attribute of the inserted image. |
|---|
| 41 | * img_height: The numeric height of the inserted image. |
|---|
| 42 | * img_width: The numeric width of the inserted image. |
|---|
| 43 | * img_src: The url of the inserted image. |
|---|
| 44 | * img_style: Any CSS styling applied to the inline image. |
|---|
| 45 | * img_class: Any CSS class name(s) applied to the inline image. |
|---|
| 46 | * a_tag: The "a" tag produced to link the image (if any). |
|---|
| 47 | * a_href: The "href" attribute value of the "a" tag. |
|---|
| 48 | * a_onclick: The "onclick" attribute value of the "a" tag. |
|---|
| 49 | |
|---|
| 50 | Also, the asset itself is in context, so any of the MT Asset tags may be |
|---|
| 51 | used to generate the asset markup. And the current blog is also in context. |
|---|
| 52 | |
|---|
| 53 | An example template can be found in: |
|---|
| 54 | |
|---|
| 55 | plugins/Assestylene/asset_insertion.mtml |
|---|
| 56 | |
|---|
| 57 | You can use this as a basis for your own custom template. |
|---|
| 58 | |
|---|
| 59 | Installation |
|---|
| 60 | ------------- |
|---|
| 61 | |
|---|
| 62 | To install this plugin, drop the files included with this plugin into your |
|---|
| 63 | Movable Type directory (under the mt-static/plugins/Assetylene, |
|---|
| 64 | plugins/Assetylene locations). |
|---|
| 65 | |
|---|
| 66 | License |
|---|
| 67 | -------- |
|---|
| 68 | |
|---|
| 69 | This plugin has been released under the terms of the GNU Public License, |
|---|
| 70 | version 2.0. |
|---|