mt-gizmos - an ecclectic grouping of tiny yet helpful plugins.
- MTAlternator [key=``'' odd=``'' even``'']
Alternates between odd and even values each time it appears.
All additional arguments are optional.
- key
This optional argument allows the system to track multiple
alternators if necessary. In order to increment a specific
alternator simply use the same key. If a key is not defined
the plugin uses the default identifier.
- odd
This optional argument sets the value to return when the
alternator is on. If undefined the default is ``odd.''
- even
This optional argument sets the value to return when the
alternator is off. If undefined the default is ``even.''
- MTAutoTitle [reverse=``1'' glue=``'']
Inserts a title constructed from the current context. This
tag takes two optional arguments.
- reverse
By default the MTAutoTitle tag orders its element from most
specific to least specific. Specifying reverse
with a
true value (1) will reverse the order of the elements used
in generating the title from least specific to most
specific. The default is false (0).
- glue
This optional argument specifes the string to use when
joining the elements together to form the title. By default
the tag uses ``<'' the less then character.
- MTEntryBodyMore
A tag that outputs both the entry body and more fields with
one tag
- MTEntryCategoryIs (id=``'' or label=``'')
A conditional tag that will render its contents if the
primary category of the entry in context matches the
category defined by either the id
or label
argument.
- MTEntry (id=``'' or basename=``'' or title=``'')
Creates a context to the identified entry. Takes an argument
of either id
, basename
or title
. Selecting by
basename
or title
can only be applied to the current
weblog in context. This limitation does not apply to id
because that value is guaranteed to be unique across the
entire system and not just one weblog.
The title
attribute is not supported when using BerkeleyDB.
- MTBlog id=``''
Creates a context to the identified weblog via a required
id
argument.
- MTCategory (id=``'' or label=``'')
Creates a context to the identified category. Takes an
argument of either id
or label
. Selecting by label
can only be applied to the current weblog in context. This
limitation does not apply to id because that value is
guaranteed to be unique across the entire system and not
just one weblog.
The label
attribute is not supported when using BerkeleyDB.
- MTComment id=``''
Creates a context to the identified comment via a required
id argument.
- MTPing id=``''
Creates a context to the identified ping via a required
id argument.
- MTCategoryIsActive
A conditional tag that will render its contents if the
category in context matches either the archive category or
the category of the entry in context.
- MTEntryIsActive
A conditional tag that will render its contents if the entry
in context matches the archive entry.
- MTIndexIsActive template=``''
A conditional tag that will render its contents if the page
is an Index template and its name matches the template
argument.
- MTArchiveTypeIsActive type=``''
A conditional tag that will render its contents if the
template is of an archive type that matches the type
argument name.
- MTEntryAuthorNicknameLink**
A tag that inserts and links the nickname of an entry's
author rather then the author's login name as does the
MTEntryAuthorLink tag.
If the author's profile contains a web URL, the link will be
to that URL. If no URL was provided, but an email address
was, the link will be a mailto: link to that email address.
If neither an email address or URL was provided, then the
nickname will not be linked.
Like the original MTEntryAuthorLink, you can use the
spam_protect attribute to encode the author's email address
to provide some protection against spam.
- MTEntrySmartBody**
Inserts an entry's excerpt if it has one and the post's body
if it doesn't.
- MTEntryIfExcerpt**
A conditional tag whose contents will be displayed if an
entry has an excerpt.
- MTTemplateComment
A container tag for placing comments (or ``commenting out''
pieces of markup). The contents of this tag will not be
inserted when the template is built into a page.
- MTXMLEncodeBlock
A container tag that allows the encode_xml global filter to
be used on any block of markup or text.
- wiki_case
Converts text into a wiki-cased word such as WikiCasedWord.
- camel_case
Converts text into a camel-cased word such as camelCasedWord.
- encode_csv
Converts text into comma seperated value (CSV) safe text.
- strip_whitespaces
Removes any leading or trailing whitespace.
- real_spaces
Converts the underscore character to an actualy space.
- double_spaces**
Converts multiple spaces to non-breaking spaces so they'll
display properly in HTML.
- plain_xml
Strips HTML then XML encodes the resulting text.
- cpaned
Converts text into a CPAN style file name. Spaces and double colons are
converted to dashes. All other non-word characters are stripped.
- Preformatted Text
A simple text formatting engine which wraps the entry text in HTML
<pre> tags and encodes any special charcters with MT's
built-in encode_html filter.
To install mt-gizmos, simply place the
mt-gizmos.pl file into your
MovableTypeHome/plugins/ directory. If the plugins
directory does not exist, you need to create it.
The software is released under the Artistic License. The
terms of the Artistic License are described at
http://www.perl.com/language/misc/Artistic.html.
** - Tags and filters originally developed and copyright
2002 by Adam Kalsey, The Kalsey Group.
Except where otherwise noted, mt-gizmos is copyright 2002-2005
Appnel Internet Solutions, Timothy Appnel, tim@appnel.com.