This plugin is designed to be used with MT-BlackList. The plugin gives you the ability easily see stats about what is being blocked by your blacklist, including the ability to summarize and rank blacklist entries.

BlacklistStats is an adaptation of the Searches plugin by David Raynes. 99.9% of the credit goes to David, as I modified only a very small portion of the code to create this plugin.

Instructions

1. Download the plugin:

blackliststats.zip

Membership required, please sign-in or register:

2. Upload the "blackliststats.pl" file to the plugins directory in your MT installation.

3. Begin using the template tags described below

Template Tags

MTBlacklistStats - A container tag used for displaying statistics about your blacklist activity. The tags below must be used within an MTBlacklistStats container.

arguments:

days: to include blocks from only the last n days (e.g. <MTBlacklistStats days="7">)
lastn: to include n searches in the list (e.g. <MTBlacklistStats lastn="5">)
unique: to include only the latest instance of a particular blacklist entry (e.g. <MTBlacklistStats unique="1">)
rank: orders the blacklist entries by rank, the most common being the first (e.g. <MTBlacklistStats rank="1">), implies unique

MTBlacklistValue - The blacklist entry that caused the comment/trackback to be blocked (ie. viagra.com).

MTBlacklistDate - The date that the comment was blocked. This tag takes a "format" argument, which works the same as MT Date formats.

MTBlacklistIP - The IP address of the person (or server) of the blocked comment/trackback.

MTBlacklistBlog - The name of the blog on which the blog occured. This is useful if you have more than one blog.

MTBlacklistType - The type of block: 'comment' or 'trackback'

MTBlacklistRank - The rank of the blacklist entry. For example, the blacklist entry that resulted in the highest number of blocks would be ranked #1.

MTBlacklistTotal - The total number of blocks for a blacklist entry. For example if 5 comments were blocked containing "viagra.com", this tag would have a value of 5.

Also included in the zip file is a sample template. The template creates two tables:

Blacklist Stats - lists each block by date, most recent listed first.

Rankings - lists each blacklist entry, ranked from the most blocks to the least.

You may need to adjust the stylesheet and image paths. I used the stylesheet used by the MT admin interface.

Notes:

1. If you want keep your stats private, be sure to build the stats file in a protected area.

2. It may be a good idea to uncheck "Rebuild this template automatically..." and just manually rebuild the stats from time to time (especially if you have a large activity log).

3. The plugin pulls data from the activity log. If you reset the activity log, your BlacklistStats will also be reset.


There are a number of different implementations of Smileys :) for Movable Type. Here's mine.

The smilieys that I use on most of my sites display in both the entries and comments. The smileys images and javascript are borrowed from phpBB. For comments, the smileys are displayed above the comment form, enabled the comment author to click on a smiley to include with their comments.

Instructions

1. The MTMacro plugin is required for the smileys to work. If you don't already have it, click here to get it.

2. Download the smiley images and templates: mt-smiley.zip

3. Upload the smiley images to a folder called "images". This folder should reside within the local site path of your blog.

4. Create a Template Module called "smiley javascript". (If you have never created a Template Module before, go to your Templates page, and scroll all the way to the bottom, below the Miscellaneous Templates). In the body of the "smiley javascript" Template Module, cut and paste the text from the "smiley-javascript.txt" file.

5. Create a Template Module called "smiley macros". Cut and paste the text from the "smiley-macros.txt" file into the new template module.

Note: If you want to place the smiley images in location other than an "images" subfolder of your blog, you need to edit the path of each "img" tag in this module.

6. If you want to display "clickable smileys" above your comment submission form, create a Template Module called "smileys". In it, cut and paste the text from the "smileys.txt" file.

Note: If you want to place the smiley images in location other than an "images" subfolder of your blog, you need to edit the path of each "img" tag in this module.

7. To make the clickable smileys appear on the comment submission form, open your comment listing template. Within the <HEAD> tags, cut and paste the following:

<$MTInclude module="smiley javascript"$>

Now find the line that reads:

<label for="forget">No</label>

After that line, cut and paste the following and save the template:

<br /><br />

<$MTInclude module="smileys"$>

8. To make the smileys appear in entries and comments, add the following line to the top of every template where you want smileys to show (ie. Main Index, Comment Listings, Comment Preview, Individual Archives, etc.):

<$MTInclude module="smiley macros"$>

9. To apply the Smiley Macros to your entries and comments you need to enclose them with MTMacroApply tags. For example, for entry text you would edit your templates as follows:

<MTMacroApply><MTEntryBody></MTMacroApply>

And for comment text:

<MTMacroApply><MTCommentBody></MTMacroApply>

10. Rebuild your site.

And that's it - 10 steps to MT Smileys. Let me know if any of that didn't make any sense. :) :) :)

MTDynamic is a Movable Type plugin that is designed to facilitate the dynamic rendering of Movable Type blogs, using URL parmaters to control the display of entries and comments.

Download (v0.6)

Installation

1. Movable Type ships with a dynamic viewer (mt-view.cgi), which is described as an "experimental feature". To use to the viewer, you must turn "SafeMode" off. To do this, edit your "mt.cfg" file such that it includes the following:

SafeMode 0

There should already be a SafeMode section near the bottom of the cfg file.

2. Download and extract Dynamic.pl to your hard drive.

3. Upload Dynamic.pl to the "plugins" directory in your MT Installation.

Template Tags

MTDynamic creates two new tags, <MTDynamicEntries> and <MTDynamicComments>. These tags can be used in the same manner as MTEntries and MTComments - the tags will work in both static and dynamic views.

To use with the MT dynamic viewer, you need to use a path like:

http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/index.html

where the number is the Blog ID of the blog. Index templates can be accessed using this format.

Now you can use URL paramters in the format of ?argument=value to control the entries that are displayed. Any of the MTEntries arguments can be used*. For example:

mt-view.cgi/1/index.html?lastn=10&category=Links

will display the last 10 entries posted by John.

*Note: to specify an author argument in the URL, you need to use a parameter called "entry_author". This is to avoid conflicts with the comment "author" parameter used with comment submissions.

Update (v0.6): To specify an "offset" argument in the URL, you need to use a paramter called "dyn_offset". This is to avoid conflicts with the "offset" parameter used with "rebuild files" tool.

To access individual entry pages using the dynamic viewer, use a path like:

http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/entry/123

where "1" is the blog ID and "123" is the Entry ID.

MTDynamicComments includes two new arguments: start and show. I found that the "lastn" and "offset" approach can get confusing when listing comments, because usually you want to show them in ascending order. The "start" and "show" simplifies this:

start - the first comment to be displayed (chronologically)

show - the total number of comments to be displayed

Using this logic, ?start=11&show=10 will display comments 11 through 20. This can be useful for displaying blog entries with a lot of comments.

What if an argument is defined in the template AND in an URL parameter? In this case, the URL parameter value will override the value defined in the template. This enables you to create templates that can be used in both static and dynamic formats. For example, your home page might be presented in a static format, but you could provide filtered views of the home page using dynamic paths with parameters.

Examples

Using my Mars Rover Blog as an example, see that the home page contains blog entries and photos by two authors: Spirit and Opportunity. You can use MTDynamic to offer filtered views of the home page (note the path and URL parameters):

Only Spirit's blog entries and photos
Only Opportunity's blog entries and photos


This is my first plugin. I am sure there are bugs, please report any strange behaviour. Any and all comments, feedback, and suggestions are welcome.

MTDynamic is a Movable Type plugin that is designed to facilitate the dynamic rendering of Movable Type blogs, using URL parmaters to control the display of entries and comments.

Download (v0.5)

Installation

1. Movable Type ships with a dynamic viewer (mt-view.cgi), which is described as an "experimental feature". To use to the viewer, you must turn "SafeMode" off. To do this, edit your "mt.cfg" file such that it includes the following:

SafeMode 0

There should already be a SafeMode section near the bottom of the cfg file.

2. Download and extract Dynamic.pl to your hard drive.

3. Upload Dynamic.pl to the "plugins" directory in your MT Installation.

Template Tags

MTDynamic creates two new tags, <MTDynamicEntries> and <MTDynamicComments>. These tags can be used in the same manner as MTEntries and MTComments - the tags will work in both static and dynamic views.

To use with the MT dynamic viewer, you need to use a path like:

http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/index.html

where the number is the Blog ID of the blog. Index templates can be accessed using this format.

Now you can use URL paramters in the format of ?argument=value to control the entries that are displayed. Any of the MTEntries arguments can be used*. For example:

mt-view.cgi/1/index.html?lastn=10&category=Links

will display the last 10 entries posted by John.

*Note: to specify an author argument in the URL, you need to use a parameter called "entry_author". This is to avoid conflicts with the comment "author" parameter used with comment submissions.

To access individual entry pages using the dynamic viewer, use a path like:

http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/entry/123

where "1" is the blog ID and "123" is the Entry ID.

MTDynamicComments includes two new arguments: start and show. I found that the "lastn" and "offset" approach can get confusing when listing comments, because usually you want to show them in ascending order. The "start" and "show" simplifies this:

start - the first comment to be displayed (chronologically)

show - the total number of comments to be displayed

Using this logic, ?start=11&show=10 will display comments 11 through 20. This can be useful for displaying blog entries with a lot of comments.

What if an argument is defined in the template AND in an URL parameter? In this case, the URL parameter value will override the value defined in the template. This enables you to create templates that can be used in both static and dynamic formats. For example, your home page might be presented in a static format, but you could provide filtered views of the home page using dynamic paths with parameters.

Examples

Using my Mars Rover Blog as an example, see that the home page contains blog entries and photos by two authors: Spirit and Opportunity. You can use MTDynamic to offer filtered views of the home page (note the path and URL parameters):

Only Spirit's blog entries and photos
Only Opportunity's blog entries and photos


This is my first plugin. I am sure there are bugs, please report any strange behaviour. Any and all comments, feedback, and suggestions are welcome.


This is a new site where I plan post some of the "MT Hacks" that I use on my sites. For this purpose, I define hacks very broadly: to mean any type of non-standard use of Movable Type. This will include some template designs, scripts, plugins, and ideas. I am not that well versed in Perl - though I am learning. For this reason, some of the plugins that I will post here will be adaptations of other plugins or existing MT functions -- and I am sure that much of the code written by me will be far from perfect. I hope to post my first plugin very soon...