Break Out, v3.2

Download (Zip File)
Download (Plain Text)

Installation

Just drop the .PL file in your plugins folder and chmod 755. If you don't have a plugins folder, create one in the same folder as the mt.cgi file.

What It Does

The plugin contains a text-formatter that allows slightly more control than the normal 'Convert Line Breaks' formatter.

The following tags can be inserted into your entries on their own lines:

[BREAK] [/BREAK] [NULL] [/NULL]

Enclosing text between [BREAK] and [/BREAK] turns on linbreaks-only mode, which causes the lines between to be formatted solely with linebreaks in the following way: The first line gets nothing. The second and subsequent lines get <br /> inserted at the beginning of each line. If a line starts with a <div>, <p>, <blockquote>, <ol>, <ul>, or <li> (or has one of them as a closing tag), it does not receive the <br /> tag. If a line ends with one of the closing tags, or is solely any of the tags above, the next line will not receive the <br /> tag.

Linebreaks-only mode is useful for things like long <blockquote>'s and other alternate content formatting where you don't want a bunch of paragraph tags cluttering things.

Enclosing text between [NULL] and [/NULL] turns off all auto-formatting. This is useful for comments and text inside <pre> tags.

Customization

As of version 2.0, you now have access to a screen within your MT installation that will allow you to change any of the plugin's tags, and the list of block-level HTML tags used by the linebreaks mode.

MovableType Issues

The current version works best with MT 3.2. For MT 3.17 and earlier versions, use this older version of BreakOut:

Download (Zip File)
Download (Plain Text)

Examples

Sample entry:

This will become a paragraph.

This will be a paragraph
with a linebreak.

[NULL]
<pre>
This collection of lines
will receive no changes
whatsoever.
</pre>
[/NULL]
Another paragraph!

[BREAK]
<ol>
<li>This list won't receive any linebreaks</li>
<li>The 'break' command is sensitive to these tags.</li>
</ol>
<div>
These lines, though
will end up separated.
</div>
<blockquote>
The lines in this long quote

also get separated by linebreaks


instead of paragraph tags
</blockquote>
[/BREAK]

One final paragraph
with a break, as normal.
Gets translated into this HTML:

<p>This will become a paragraph.</p>

<p>This will be a paragraph<br />
with a linebreak.<br />
</p>
<pre>
This collection of lines
will receive no changes
whatsoever.
</pre>
<p>Another paragraph!<br />
</p>
<ol>
<li>This list won't receive any linebreaks</li>
<li>The 'break' command is sensitive to these tags.</li>
</ol>
<div>
These lines, though
<br />will end up separated.
</div>
<blockquote>
The lines in this long quote
<br />
<br />also get separated by linebreaks
<br />
<br />
<br />instead of paragraph tags
</blockquote>
<p>One final paragraph<br />
with a break, as normal.</p>
Which, in turn, gives this output:

This will become a paragraph.

This will be a paragraph
with a linebreak.

This collection of lines
will receive no changes
whatsoever.

Another paragraph!

  1. This list won't receive any linebreaks
  2. The 'break' command is sensitive to these tags.
These lines, though
will end up separated.
The lines in this long quote

also get separated by linebreaks


instead of paragraph tags

One final paragraph
with a break, as normal.

Version History

v1.0 - Original version. [25 December 2003]

v1.01 - Slight change to fix extra linebreaks in certain situations. [6 January 2004]

v1.1 - Internal changes; plugin now appears on front page of MT installations. [16 August 2005]

v2.0 - Added ability within MT installation to change keywords and recognized block-level HTML tags. Typo fixed. [17 August 2005]

v2.01 - Cleaned up some code. [19 August 2005]

v3.0 - Changed internal configuration for use with MT 3.2. [28-August-2005]

v3.1 - Fixed a bug with recognition of individual blog settings. [30-August-2005]

v3.2 - Fixed a fatal error when you try to use BreakOut with a blank entry field. [4-September-2005]

This plugin is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.
To contact the author, send mail to the "webmaster" of this domain.