Saturday, April 09, 2005

Movable Type용 Enclosures 플러그인

출처: Brandon Fuller



How To Use The Tags
This plugin will only work in static (not dynamic) templates.

MTEntryEnclosures
Add this tag into your RSS 2.0 Index template inside of the item element. This tag will create elements for each media URL found within your blog’s entry and extended entry text. This tag MUST be placed within a block. To customize, you can provide one of the following attributes:


include=”pattern”
You can enter a Perl regular expression pattern that will be used to specifically include matching URLs found in the search for enclosures.

exclude=”pattern”
You can enter a Perl regular expression pattern that will be used to specifically exclude matching URLs found in the search for enclosures.

log=”0|1”
The default value is 1. Set the parameter to 0 if you do not want errors logged to your Movable Type activity log. It is recommended that you leave this logging turned on so you can diagnose issues.

mime=”pattern”
You can enter a Perl regular expression that will be used to limit the URLs found in the search for enclosures.

remote=”0|1”
The default value is 1. Set the parameter to 0 if you want to exclude remote links. Remote vs. local is determined by comparing the URL of the enclosure file with the URL of your weblog from your weblog’s configuration.

MTBlogEnclosures
This is a container tag that will iterate through all the entires in your weblog and process the enclosures for each entry. This tag has no output itself because it is a container tag. You must put one of the MTEnclosure* tags inside of it. To customize, you can provide one of the following attributes:


include=”pattern”
You can enter a Perl regular expression pattern that will be used to specifically include matching URLs found in the search for enclosures.

exclude=”pattern”
You can enter a Perl regular expression pattern that will be used to specifically exclude matching URLs found in the search for enclosures.

log=”0|1”
The default value is 1. Set the parameter to 0 if you do not want errors logged to your Movable Type activity log. It is recommended that you leave this logging turned on so you can diagnose issues.

mime=”pattern”
You can enter a Perl regular expression that will be used to limit the URLs found in the search for enclosures.

remote=”0|1”
The default value is 1. Set the parameter to 0 if you want to exclude remote links. Remote vs. local is determined by comparing the URL of the enclosure file with the URL of your weblog from your weblog’s configuration.

MTEnclosureURL
This tag prints out the URL of the enclosure. This tag must be used inside of a container tag, such as MTBlogEnclosures.


MTEnclosureLength
This tag prints the length/size of the enclosure. This tag must be used inside of a container tag, such as MTBlogEnclosures. To customize, you can provide one of the following attributes:


format=”b|k|m|g”
You can specify the format of the length in units. b for bytes, k for kilobytes, m for megabytes and g for gigabytes.

label=”0|1”
Set to 1 if you want the tag to output a text label indicating the units. The default value is 0.

MTEnclosureMIME
This tag outputs the MIME type associated with the current enclosure. This tag must be used inside of a container tag, such as MTBlogEnclosures.

Labels: ,

0 Comments:

Post a Comment

<< Home