Entry Post is a plugin for Movable Type that enables visitors to your site to submit entries using a form. Visitors do not need a user account and they do not need to login. Similar to posting a comment, they can simply fill in a form and submit.

New features in version 2.0

Entry Post 2.0 contains the following new features:

  • Native Field Support - This means that the EntryPost plugin now manages fields by itself, so you don't need to install CustomFields or any other plugin. You can use Entry Post 2.0 alongside other fields plugins -- there are no known conflicts.
  • Extra Fields - In addition to the standard Name, Email Address, URL, and Image fields, you can now use Entry Post to submit extra fields "on the fly".
  • New Template Tags - New tags make it easier to display information about the poster (and any extra fields) in your blog pages.
  • Support for MT4 - Entry Post two can be used with MT 3.2, 3.3, and now 4.0. tested with MT4 beta5.

I have been using external forms and scripts to do this for several years. Examples include Mars Rover Forum and Seinfeld Forum. These MT-powered forums enable forum members to post new topics (entries) using an external form. Based on this experience, I have converted the entry posting script into a plugin -- and added a bunch of additional features.

Basic Features

  • enable visitors to post entries to your blog
  • new entries can be set to "Published" or "Unpublished" (pending admin/moderator review)
  • supports TypeKey authentication (optional)
  • entries can be scanned against MT's Junk Filters
  • entries can be previewed before posting
  • email notifications of new entry submissions
  • entries can be added to a category (set a default or allow poster to choose)
  • entries can be tagged (default list of tags, or specified by the poster)
  • included default templates include spam-protected form

Advanced Features

  • enable posters to upload an image with the entry
  • other entry fields supported (Extended Entry, Excerpt, Keywords)
  • option to disable rebuilds when an entry is posted
  • option to disable entry creation (makes the form work as a 'contact me' form with email notification turned on.)
  • xml response option
  • support for extra fields defined by you

Try Entry Post Now

I have set up an Entry Post test blog that you can use to submit test entries. You can use one of two forms:

  1. Basic Form (default form installed with Entry Post)
  2. Advanced Form (an example form to demonstrate advanced features)

By using the forms above, you will quickly get an idea of the visitor experience with Entry Post. In its simplest form, it is very similar to posting a comment.

The Administrator Experience

Entry Post has been designed to be easy to install and configure. Simply upload the files, change some file permissions, then configure the plugin via the Plugin Settings for each blog. Required templates are installed with a single click (which can then be customized, if desired).

The settings area for Entry Post looks like this:


By using the above settings, you can configure most of the features of Entry Post.

Template Tags

New in version 2.0, EntryPost includes the following template tags that you can use to display information posted using the plugin:

  • <MTEntryPosterName> - The name of the poster, as submitted in the "Name" field. If the name field it blank, the plugin assumes that the entry was not submitted via Entry Post, and this tag will display the name of the author of the entry. This makes it very easy to update your templates, simply replace the <MTEntryAuthorDisplayName> tag with the <MTEntryPosterName> tag, and it will "just work", regardless whether the netry was posted by an author or posted by a visitor to your blog.
  • <MTEntryPosterEmail> - The email address of the poster, as submitted in the "Email" field. If the "Name" field is blank, this tag outputs the email address of the author. For privacy and anti-spam reasons, I don't recommend using this tag in your templates.
  • <MTEntryPosterURL> - The URL of the poster, as submitted in the "URL" field. If the "Name" field is blank, this tag outputs the URL of the author.
  • <MTEntryPosterIP> - The IP address of the poster. For privacy reasons, I don't recommend using this tag in your templates.
  • <MTEntryPosterImage> - The relative path of the image uploaded by the poster.
  • <MTEntryPosterLink> - Outputs the linked name of the poster. If the "Name" field is blank, it will display the author's linked name. Supports the same arguments as <MTEntryAuthorLink>.
  • <MTEntryPostField> - This tag can be used to to display the value of any extra fields submitted using Entry Post. A single field argument is required, which should inlcude the name of the field, without underscores. For example, <MTEntryPostField field="Favorite Color"> would display the value of the Favorite Color field.

Advanced Use - Adding Extra Fields

Entry Post 2.0 makes it very easy to add extra fields. All you have to do is add the extra fields to the form. First, browse to Templates and then Template Modules and edit the 'EntryPost Form" module. Now add a field to the form in the following format:

<input type="text" name="entrypost_Favorite_Color" />

..and you are done! Note that the "name" argument above must begin with "entrypost_", followed by the name of the field. Use underscores ("_") instead of spaces, if the field name has more than one word. You can add multiple extra fields in this manner, and they will automatically be added to the entries posted, and displayed automatically on the admin Entry screen.

Requirements

  • MT 3.2+ (Note: The tags and TypeKey login features require MT 3.3+)

Limitations

  • Under MT 3.2, you will be able to see the Entry Post fields on the entry screen, but you won't be able edit them.
  • Under MT 4.0, the Typkey sign-in feature doesn't work reliably. The next version of Entry Post will focus on support for MT4's native authentication system.

Installation


  • Download the zip file and extract the contents.

  • Upload the "EntryPost" directory (and all its sub-directories and files) to your MT 'plugins' directory.

  • Change the file permissions to 755 (CHMOD 755) for the EntryPost/mt-entrypost.cgi and EntryPost/signin.cgi files.

  • Login to MT and go to the 'Settings' area of a blog and choose the 'Plugins' tab. Then click the "Settings" link for EntryPost. You should now see the available settings for EntryPost, as shown above.

  • Enable the plugin by checking the Enable checkbox, choose other settings, and the save the settings.

  • Return to the EntryPost settings and install the templates by clicking the provided link. After the templates have been created, you can customize them, if desired, to suit your needs or match your site design. The primary template is an index template called "EntryPost Submit Page" - this page includes the form to post entries.

  • You will probably now want to provide a link to the Submit Page from your main index. One way to do this is to use the provided "EntryPost Submit Link" widget (using WidgetManager). Alternatively, you can manually create a link such as <a href="<MTEntryPostSubmitPage>">Submit an Entry</a>.

Get Entry Post

Commercial License - $97

If you site or blog is for-profit, a commercial license is required. The license includes all future updates to Entry Post and priority feature requests.

Personal License - $33

For use on a personal site or blog, a personal license is required. The license includes all future updates to Entry Post.

If you would like to use Entry Post on a non-profit or charity site, please contact me.

Live Demo

If you are interested in purchasing EntryPost, but would like to try it first, that can be arranged. To experience the poster side of things, visit the Entry Post test blog using the links provided above. If you would like to login to see the admin interface, please contact me.

As always, feedback, suggestions, and product questions are appreciated. Please reply to this entry.

Note: - While Entry Post 2.0 includes built in support for poster fields and extra fields, it is not intended to be used as a general purpose "extra fields" plugin. Fields can only be added via the external Entry Post form. If you are interested in a general purpose fields plugin, there are several available, including CustomFields and RightFields.

Comment Registration is a plugin for Movable Type that enables readers to register an account on your site and login to post comments. Commenters register and login directly with your site, not via an external authentication service (this plugin does not use TypeKey).

UPDATE: The latest version of this plugin, version 1.2, includes an important security bug fix. It is highly recommended that sites using previous versions upgrade to version 1.2 immediately. Simply upload the new version to upgrade -- there is no need to edit or re-install templates.

Movable Type supports comment registration (authentication), but commenters must register and sign via TypeKey, a centralized authentication service offered by Six Apart (the makers of MT). While this "remote authentication" approach has some key advantages, there are also reasons why you might prefer a "local authentication" system. The Comment Registration plugin provides this option.

Comment Registration works with the built-in Commenter system of MT (see the "Commenters" menu item on the left-hand navigation menu). When someone creates a commenter account on your site and posts a comment, they will appear on the Commenters screen, including their Nickname, username, URL, email, and a tally of their comments:

Note: Commenters must post at least one comment before they appear on the Commenters listing. If someone creates an account but does not post a comment, they will not appear in the listing.

Because the plugin uses the the built-in Commenters system, you can use all the MT commenter features, such as:

  • Trusting and Banning commenters:
  • Settings for accepting comments:
  • Settings for publishing comments:

Comment Registration comes with 4 default templates (based on the default MT3.3 templates):

Commenter Login - An index template that contains a login form for commenters.
Commenter Registration - And index template that contains a form for creating a commenter account on your system.
Site Javascript - This is a replacement index template for the existing Site Javascript (mt-site.js) template. (Your existing Site Javascript will be renamed as a backup during installation).
Widget: Commenter Login - A Widget Manager widget that you can add to your sidebar, containing a login form for commenters.

Test it Out Now

Head over to the MT Hacks Test Blog and register for an account and then submit a few comments. Start at this test entry by clicking here.

Installation:

  1. Extract the files from the zip file, and upload the contents of the 'plugins' directory to the 'plugins' directory of your MT installation.
  2. Change the permissions on the mt-login.cgi file to 755 (CHMOD 755).
  3. Browse to the blog you want, then go to Settings - Plugins, and then the Settings button for Comment Registration. You will notice that the plugin has no settings of its own, but you will find a link to install the default templates. Click that link. The default templates will be installed and rebuilt.
  4. You must have Authentication enabled for the default templates to work (if you currently allow TypeKey authentication, you can skip this step). Go Settings > Feedback and find the "Authentication status" setting. In field after "Or, manually enter token", enter some text (anything will do).
  5. (Optional) Adjust the Feedback settings for accepting and publishing comments (see images above) as desired.
  6. Save Feedback settings and then manually rebuild the Site Javascript (mt-site.js) index template.

Requirements

  • MT 3.3x

Note that this plugin does not work with MT4, as this plugin's features have be built-in to MT4.

Get Comment Registration

Comment Registration is free for personal use, but you must place a link on your site, such as:

Powered by the <a href="http://mt-hacks.com/commentregistration.html">Comment Registration</a> plugin for Movable Type.

Donations are appreciated:

Download
Download Now
Downloads: 299

Membership required, please sign-in or register:

Commercial License (up to 5 blogs) - $97

Blog Network License (unlimited blogs) - $249

Note for multi-blog installations / blog networks: commenters need only create one account and can use the same login for all of the sites on the same MT installation.

As always, comments and feedback are appreciated. Please reply to this entry.

Fast Search is a PHP plugin for Movable Type. This means that Fast Search uses Movable Type's dynamic PHP-based publishing system to display search results. However, you can continue to use static publishing for all of your indexes and archives. Fast Search is fast in part because it uses mySQL fulltext indexing -- basically this means that a search index will be created for the entries in your database, making searches much faster. Like the built-in search, Fast Search logs searches to the Movable Type Activity log.

Update 3/11/2007:Version 2.02 has been released. This is a critical update for those who installed 2.0 prior to March 10, 2007. Inadvertently, the old version of the MTSearchString tag was included in that zip file. Version 2.02 has the correct version of that tag. Note: if you don't plan on using Tag Search, then you don't really need 2.02.
Update 3/14/2007:Version 2.03 has been released. This version addresses a Unknown column 'mt_entry.entry_id' in 'on clause' error that affected people running mySQL 5+. (A big thanks to David Chiu for providing the fix!)

New Features in Version 2.0

Fast Search v2.0 has several new features:

  • Tag Search. Fast Search now supports Tag Search (MT3.3+). Also known as a tag listing, Tag Search displays a list of entries with a specific tag. If you list tags in your entries, they are probably linked to a Tag Search. Fast Search v2.0 does the same thing, only faster.
  • Better Relevance Ranking. Fulltext searches now provide much better relevance ranking.
  • Easier System-wide Searching. Now it is even easier to to search all blogs in a single search.
  • Search results containing all keywords. This is a small change for Fulltext searches. Previously, if you searched for 'red books' (without quotes), the search results would include any entry containing 'red' or 'books'. In version 2.0, only entries with both 'red' and 'books' will be included in the search results. This makes things more consistent with other search engines.
  • Fast Search Widget. A new Fast Search Widget makes it easy to add a Fast Search form to your sidebar.
  • New Template Tags. Several new template tags make it easier to customize your search results. Fast Search now supports all of the template tags used in the default MT 3.3 search results template -- this means it is even easier to switch to Fast Search

Tag Searches with Fast Search

Fast Search now supports tag search. A tag search will display a list of all entries with a specific tag. Of course, tag searches have the same pagination features as regular searches, enabling you to browse multiple pages of tag search results. Tag search results are always sorted with the most recent entries listed first. Tag searches can done on a single blog (default), or across multiple blogs.

Tag Search Links. If you are using tags with MT 3.3+, you are probably displaying a list of tags with each entry. Each of those tags are linked to a search results page that displays all the entries with that tag. Since those links point to the built-in mt-search.cgi script -- Fast Search includes a new version of the <MTTagSearchLink> tag that points to the Fast Search script. This happens automatically, you don't have to edit your templates -- just enable Fast Search, install the Fast Search template, then rebuild your pages -- the tag links will be automatically updated.

Clean Tag Search URLs

With Fast Search 2.0, it is possible to use nice looking tag search URLs such as:

http://mt-hacks.com/tag/spam
http://mt-hacks.com/tag/comments

This feature requires editing you .htaccess file and a minor edit to the Dynamic Bootstrapping template. This feature is only available to those who purchase a license or those personal users who donate at least $33. I will email you the required files and full instructions.

Better Relevancy

By tweaking the fulltext queries, I have managed to improve the relevancy ranking significantly. To test this out, you should do a few searches (in fulltext mode) before you upgrade to Fast Search 2.0 -- note the results and their relevancy -- then upgrade and do the same searches. You should see much more relevant results at the top of the search results. Please post your feedback on this by replying to this entry.

Search all Blogs Easier

In the previous version of Fast Search, it was possible to search across all blogs on a system, but you had to specify each of them separated by commas. This is fine if you have a few blogs, but what if you have 50? 100? 500? Version 2.0 makes this easier by allowing the special "all" keyword to indicate that you want to search all blogs (example <MTSearchResults blogs="all"> or in the URL/form: ?query=books&blogs=all). A time-saver for large MT installations and blog networks.

Include PHP in your Search Results Template

This not a new feature, but it deserves highlighting. Many sites use PHP on most of their pages for various reasons (for example, to include content such as headers/footer and advertising blocks). The problem is that you can't use PHP on the "built-in" search results pages, because they are dislayed by a (Perl) CGI script. This can make it challenging to maintain your site in a consistent manner. You can avoid such problem with Fast Search -- since it is powered by PHP, you can include blocks of PHP code in the search results template. (Note: there is a small requirement that you need to use <?php to start each block, using simply <? won't work.)

What Search Method is Best?

For most cases, "Fulltext" will be the fastest search method. This is the same method used in version 1.0. There are some cases in which you might two options:

  • Non-Fulltext. Technically speaking this method used a LIKE %query% syntax. If you don't know what that means, don't worry about, just read on.
  • Fallback. The Fallback method is a combination method. FastSearch will first try a fulltext search, and if that returns no results, then it will try a Non-Fulltext search.

Non-Fulltext and Fallback are capable of some types of searches that you can't do with mySQL. You might want to use Non-Fulltext or Fallback to:

  1. search multi-byte languages such as Arabic and Japanese.
  2. search words shorter than 3 characters (such as "MTV")
  3. search partial words
  4. search a mySQL database that does not support Fulltext searching

Template Tags

Version 2.0 of FastSearch is designed to easily replace the existing search functionality in Movable Type, but with added features. For example, if you are currently using customized search templates, you can use them with Fast Search, with very few changes in most cases. Many Fast Search template tags have the same names as their CGI counterparts:

  • <MTSearchString> - The search string (query) being searched.
  • <MTSearchResults> - A container tag that displays search results. Arguments include (all are optional):
    • lastn - restricts the search to n results. (example <MTSearchResults lastn="10"> ) The lastn argument, like all arguments for MTSearchResults, can also be specified in the URL (...&lastn=10) or POSTed from a search form)
    • offset - used in coordination with lastn, starts M entries from the start of the list. (example <MTSearchResults lastn="10" offset="10"> will display results 11-20)
    • order - must be either 'date' or 'relevance', the default is 'relevance'. (example $lt;MTSearchResults order="date"> will provide similar results as the CGI search)
    • category - must be a valid category ID for the current blog - restricts the search results to entries from this category.
    • google_highlight - if specified, search words will be highlighted. (example <MTSearchResults google_highlight="1"> )
    • query - the search string (text) to be searched. In normal use, you would NOT include this argument as part of the <MTSearchResults> tag, rather, it would be specified as a URL paramter (example ...query=search+phrase) or POSTed from a search form.
    • new - tag - the tag to be searched. In normal use, you would NOT include this argument as part of the <MTSearchResults> tag, rather, it would be include as a URL parameter (example ...tag=books) as part of a Tag Search Link.
    • blogs - a comma-separated list of blog_ids if you want to search more than one blog. This argument is optional, if excluded, only the current blog will be searched. Example usage: <MTSearchResults blogs="1,3,8">new - Set blogs equal to "all" to search every blog on the sytem.
  • <MTBlogResultHeader> - this is container tag that displays content before the search results.
  • <MTBlogResultFooter> - this is container tag that displays content below the search results.
  • <MTNoSearchResults> - A container tag that displays its content only if zero results are found. Note that this tag must be used after a <MTSearchResults> container.
  • <MTNoSearch> - A container conditional tag that displays its content only if no search phrase was specified. new - Now supports the use of <MTElse> inside this container.
  • <MTSearchCount> - The number of search results displayed on the current search results page. This tag should be used with a <MTBlogResultHeader> or <MTBlogResultFooter> container.
  • <MTSearchFirst> - The number of the first search result on the current page. This tag should be used with a <MTBlogResultHeader> or <MTBlogResultFooter>container.
  • <MTSearchLast> - The number of the last search result on the current page. This tag should be used with a <MTBlogResultHeader> or <MTBlogResultFooter>container.
  • <MTSearchIfNextPage> - A conditional tag that displays its content if there is a subsequent page of search results. This tag should be used with a <MTBlogResultHeader> or <MTBlogResultFooter>container.
  • <MTSearchNextPageLink> - Output a URL to the next page of search results. This tag should be used within <MTSearchIfNextPage> tags.
  • new - <MTSearchIfPreviousPage> - A conditional tag that displays its content if there is a previous page of search results. This tag should be used with a <MTBlogResultHeader> or <MTBlogResultFooter>container.
  • new - <MTSearchPreviousPageLink> - Output a URL to the previous page of search results. This tag should be used within <MTSearchIfNextPage> tags.
  • <MTSearchTotalResults> - The total number of matching results in the database.
  • <MTSearchPages> - A container tag that can display links to multiple pages of search results. Optional arguments include:
    • max - the maximum number of page links to display on each page. Example: <MTSearchPages max="20">
    • glue - a text string that seperates each page. For example, if you wanted to display 1 - 2 - 3 - 4, you could use <MTSearchPages glue=" - ">
  • <MTSearchPageNumber> - Displays the page number of each search results page. This must be used within a <MTSearchPages> container.
  • <MTSearchPageLink> - Displays the URL to each search results page. This must be used within a <MTSearchPages> container.
  • <MTSearchIfCurrentPage> - A conditional tag that only displays its contents if the page number is the same as the current page - you would normally use this is you wanted to highlight the current page in the list of page numbers, etc. This must be used within a <MTSearchPages> container.
  • new - <MTIfStraightSearch> - A conditional tag that only displays its contents if the search is a normal search and not a tag search.
  • new - <MTIfTagSearch> - A conditional tag that only displays its contents if the search is a tag search and not a normal search.
  • new - <MTFastSearchScript> - This tag displays the filename of your Fast Search script. You can use this in your search forms as shown below. Note: for this tag to work, you should not rename your Fast Search template -- it should laways be named "Fast Search". This tag works in both static and dynamic templates.
  • replacement - <MTTagSearchLink> - This tag overrides the built-in tag of the same name (this automatic, not need to edit templates or anything). The new version of the tag is "smart" -- if Fast Search is enabled for a blog, it will link to the tag search results using the Fast Search script -- if not, it will use the built-in search script. This tag has the following optional argument:
    • tag_dir - Use this argument to specify a "directory" name for your tag search URLs. Note: This feature is only available to personal users who make a donation OR those who buy a commercial license.

Note: the new default Fast Search template includes pre-formatted template code that displays Google-style search results page links.

As you may have noticed, some of the tags above are identical to the ones used for the existing CGI-based search results. This is by design, so you will easily be able to cut-and-paste your existing search template code into the Fast Search template, though some minor modifications may be required.

Working Examples:

Here are some working examples you can try. Feel free to try additional search queries and note the speed that searches are performed.

  • Tag search results on MT Hacks. Example tags: spam cms.
  • Mars Rover Blog has over 5,000 entries. Example search: "water on mars". Note that this example shows the default FastSearch template, which is very similar to the default search results template in MT 3.2.
  • Seinfeld Blog has over 8,000 entries, 180 of which consist of the episode descriptions and scripts of all 180 episodes. Fast Search powers the Seinfeld Script Search, which is restricted to a single category containing the episodes. Example search: 'bubble boy'

Requirements:

  • Movable Type 3.2 or 3.3
  • mySQL

Instructions

  1. Download the plugin and expand the zip file.
  2. Upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation (usually something like /cgi-bin/mt/plugins).
  3. Upload the contents of the 'php' folder to the 'php' directory (usually something like /cgi-bin/mt/php)
  4. Login to the MT admin interface. If you already logged in, choose 'Main Menu'
  5. If your are running MT 3.3, you should be redirected to an 'Upgrade' screen at this point. The Fast Search upgrade process will update your database to add a fulltext index to the table in your database where entries are stored. Note that this may take some time if you have many entries, and this will add to the overall size of your database.
  6. If you are running MT 3.2, you will not see the upgrade screen (as it is a 3.3 feature), so you need to create the index by browsing to the 'Settings' of a blog where you want to use Fats Search. Choose the 'Plugins' tab then find 'Fast Search' and choose 'Settings'. Now click the link in bold that says "Click here to create or rebuild the FastSearch fulltext index". Again, this may take some time, please be patient. After the index has been created, hit the Back button.
  7. Now browse to the 'Publishing' settings tab for the blog, and scroll down to the Setting called "Dynamic Publishing". If the first option, "Build all templates statically", is selected, you should change this setting to "Set each template's Build Options separately" and click "Save Changes" at the bottom of the screen. Otherwise, you don't need to make any changes here.(Note that change this setting will create an .htaccess file in the root path of the blog. Normally you won't notice this and everything will work fine, but if you have an existing.htacces file, you may want to take a look at it to make sure everything looks okay)
  8. If you just changed your Dynamic Publishing settings in the previous step, you should now rebuild all files for this blog by choosing "Rebuild Site" from the left menu, then "Rebuild all Files". You should also ensure that you have a "Dynamic Site Bootstrapper" (mtview.php) index template and make sure that it gets built, if it hasn't been built previously.
  9. Now return to the Fast Search settings ('Plugins' tab within 'Settings') and check the box to enable Fast Search. You may also want to adjust the settings for Maximum Search Results and logging, then click "Save Changes".
  10. Open the Fast Search settings once again and choose "Click here to install the default Fast Search Template." The template will be created and then displayed. This is an dynamic Index template (which can be customized) used to display the search results. (If desired you can also skip this step and create the index template manually, use the template tags as desired, or by cutting and pasting your exisiting search template code)
  11. Upgrading Fast Search

    Follow steps 1 to 3 above, then adjust your Fast Search plugin settings and search template, if desired. If you using Tag Search, you probably want to update your Fast Search template. One way to do this is to rename or delete your existing template, then reinstall the new default template from the plugin settings area.

The Search Form

If you already have search forms on your blog pages, you need to update them to point to the new Fast Search template. For each template that contains a search form, look for the following (or similar):

<form method="post" action="<$MTCGIPath$><$MTSearchScript$>"

...and change it to:

<form method="post" action="<$MTBlogURL><$MTFastSearchScript>"

...save the template and repeat this step for every template that has a search form.

If you want to insert a new search form on your site, or completely replace existing forms, you can use the following:

<form method="get" action="<$MTBlogURL$><$MTFastSearchScript>">
    <label for="query" accesskey="4">Search this blog:</label><br />
    <input id="query" name="query" size="20" />
    <input type="submit" value="Search" />
</form>

Or better yet, install the new Fast Search Widget from the plugin settings area, and use WidgetManager to add the widget to your sidebar (you should also remove the existing search widget).

Of course you can also add optional fields to the form such as:

<input type="hidden" name="order" value="date" />

....to sort the results by date, or....

<input type="hidden" name="category" value="5" />

...to restrict the search to category_id = 5.

Once you have the search form(s) on you site, rebuild those pages and start searching. You should notice significant speed and resource improvement, especially on blogs with many entries.

Fast Search Settings

Fast Search settings are on a "per blog" basis. To access the settings, browse to the blog you want to use, then choose "Settings", then "Plugins". Look for Fast Search in the list and click the "Show Settings" button.

Download Fast Search

Non-commercial use - FREE ( although you must include a

Movable Type search results powered by 
<a href="http://mt-hacks.com/fastsearch.html">Fast Search</a>
link on your search results pages.

Also, donations are appreciated. Those who donate at least $33 will receive the BONUS "clean tag URLs" feature described above:

Commercial use - (up to 5 blogs) - $97.00

Blog Network License - (more than 5 blogs) - $249.00

Download Now

Download Now
Downloads: 4816 (since 3/6/07)

Membership required, please sign-in or register:

As always, suggestions and feedback are appreciated. Please reply to this entry.

Note: FastSearch v2.0 is a suitable replacement for most implementations of the built-in search function in Movable Type. However, there are a few features that Fast Search v2.0 does not include. Fast Search v2.0 does not support comment searches, regexp search, case-senstive search, the use of AND and OR operators, and Edit Entry Links). Some of these features may be supported in future versions -- please let me know what features you would like to see.

Comment Registration is a plugin for Movable Type that enables readers to register an account on your site and login to post comments. Commenters register and login directly with your site, not via an external authentication service (this plugin does not use TypeKey).

Movable Type supports comment registration (authentication), but commenters must register and sign via TypeKey, a centralized authentication service offered by Six Apart (the makers of MT). While this "remote authentication" approach has some key advantages, there are also reasons why you might prefer a "local authentication" system. The Comment Registration plugin provides this option.

Comment Registration works with the built-in Commenter system of MT (see the "Commenters" menu item on the left-hand navigation menu). When someone creates a commenter account on your site and posts a comment, they will appear on the Commenters screen, including their Nickname, username, URL, email, and a tally of their comments:

Note: Commenters must post at least one comment before they appear on the Commenters listing. If someone creates an account but does not post a comment, they will not appear in the listing.

Because the plugin uses the the built-in Commenters system, you can use all the MT commenter features, such as:

  • Trusting and Banning commenters:
  • Settings for accepting comments:
  • Settings for publishing comments:

Comment Registration comes with 4 default templates (based on the default MT3.3 templates):

Commenter Login - An index template that contains a login form for commenters.
Commenter Registration - And index template that contains a form for creating a commenter account on your system.
Site Javascript - This is a replacement index template for the existing Site Javascript (mt-site.js) template. (Your existing Site Javascript will be renamed as a backup during installation).
Widget: Commenter Login - A Widget Manager widget that you can add to your sidebar, containing a login form for commenters.

Test it Out Now

Head over to the MT Hacks Test Blog and register for an account and then submit a few comments. Start at this test entry by clicking here.

Installation:

  1. Extract the files from the zip file, and upload the contents of the 'plugins' directory to the 'plugins' directory of your MT installation.
  2. Change the permissions on the mt-login.cgi file to 755 (CHMOD 755).
  3. Browse to the blog you want, then go to Settings - Plugins, and then the Settings button for Comment Registration. You will notice that the plugin has no settings of its own, but you will find a link to install the default templates. Click that link. The default templates will be installed and rebuilt.
  4. You must have Authentication enabled for the default templates to work (if you currently allow TypeKey authentication, you can skip this step). Go Settings > Feedback and find the "Authentication status" setting. In field after "Or, manually enter token", enter some text (anything will do).
  5. (Optional) Adjust the Feedback settings for accepting and publishing comments (see images above) as desired.
  6. Save Feedback settings and then manually rebuild the Site Javascript (mt-site.js) index template.

Get Comment Registration

Comment Registration is free for personal use, but you must place a link on your site, such as:

Powered by the <a href="http://mt-hacks.com/commentregistration.html">Comment Registration</a> plugin for Movable Type.

Donations are appreciated:

Download

Download Now
Downloads: 299

Membership required, please sign-in or register:

Commercial License (up to 5 blogs) - $97

Blog Network License (unlimited blogs) - $249

Note for multi-blog installations / blog networks: commenters need only create one account and can use the same login for all of the sites on the same MT installation.

As always, comments and feedback are appreciated. Please reply to this entry.

Template Inheritance is a plugin for Movable Type that enables you to link templates together in a way that one template inherits its template code from another template. One example is when you have two or more blogs in your MT system, and you want to use the same design or template layout for each blog. Using the Template Inheritance plugin, you can effectively use one blog's templates as master templates that control the templates of the other blogs. So if you have 3 blogs on a company site with same look and feel, this can save you a lot of time manually updating the templates of each blog every time you make a change. Another way to think of it is sharing templates between several blogs. You can link all the templates in one blog to another, or selectively choose which templates should be inherited (including template modules).

I have wanted a plugin like this for years, the ability to share template code between multiple blogs. For a long time, MT has included a "Link this template to a file" feature in which you could link a template to an actual file on your server. I used to link multiple templates to the same file, effectively (and indirectly) sharing the template code between different blogs. While this works, it has its problems. At times in the past, there we MT bugs that prevented templates from being updated from the file - but I think those are fixed now. The other main problem is that you have to be very careful when editing a template, remembering that it may be shared with other blogs, etc. The Template Inheritance plugin is an improvement over the file linking method, addressing the key issues with file-based linking.

Features

For any specific template, you can assign another template on the system from which to inherit template code. For example you could decide that you want template "B" to inherits its template code from template "A".

It may be helpful to think of "A" as the parent template and "B" as the "child" template -- the child inherits its template code from its parent. When template becomes linked to parent template, the child's template code will immediately be replaced by the template code of the parent, and will be derive its template code from the parent from that point forward. You won't be able to edit the child template after the link is made (the template code is greyed-out and the field is disabled) -- instead, you will see a link to the parent template, and you can then edit the parent template.

Editing the parent template will automatically update all of its children templates. Of course, you need to rebuild the appropriate pages on each blog for template changes to be reflected on your blogs. You remove remove inheritance (break the link with the parent) at any time. When you remove inheritance from a child template, it becomes independent from that point forward, and you can now customize it independently of the parent template.

Notes:

  • Only system administrators (sometimes called superusers) can create inheritance links.

  • You must enable the plugin for each blog before you can create inheritance links (blogs to have "child" templates need to be enabled, not those containing the "parent" templates)

  • A template cannot be both a child and a parent. If you try to assign inheritance from a template that is a child of another template, it will work -- but the plugin will make the link directly the ultimate parent. This makes it easier to manage, as you won't have to trace template linkages through several generations to find the "master" template.

  • When a parent template is deleted, each of its children immediately become independent (orphaned, if you will).

  • When first assigning inheritance to a template, the child template's code is replaced by that of the new parent. BE CAREFUL, there is no undo, the child's former template code will be gone. Just to be safe, it may be a good idea to back up the old template code beforehand, in case you decide to revert back.

Requirements

  • MT 3.3+

Great for Blog Networks

While Template Inheritance can be used in many different scenarios, it is a great fit for blog networks. Networks of blogs on the same MT system often have similar (or identical) design or template code. Sometimes only certain things are the same, such as a common header / footer, stylesheet, sidebar, advertising blocks, etc. Using this plugin to link up those common template elements, you can save a lot time managing the templates of the network. If you have a blog network and this sounds interested, please contact me. I can help implement this for you, customize the plugin to meet your specific needs, etc.

Instructions

  1. Extract the contents of the zip file and upload the contents of the 'plugins' directory into the 'plugins' directory of your MT installation
  2. Login to MT (or hit Main Menu, if you are already logged in). You should now see and upgrade screen that will install a table for Template Inheritance.
  3. Browse to the blog you want, then go to the plugin settings to enable the plugin.
  4. Browse to the template you want, then click the "Click here to inherit code from another template" link.
  5. Enter the template ID of the desired parent in the prompt box, hit OK.
  6. The template is now linked to the parent. Rebuild to see the results on your site.

Get Template Inheritance

Template Inheritance is free for personal use on up to 3 blogs.

Donations are appreciated:

Download Now

Download Now
Downloads: 172

Membership required, please sign-in or register:

Commercial License (4-10 blogs): $97

Blog Network License (10+ blogs): $249

As always, feedback and suggestions are appreciated. Please reply to this entry.

Spam Firewall v1.2 is now available. Version 1.2 has two changes:

  • An updated "top 40" list of firewall rules
  • A bug fix that should address the "blank page" problem that some people experienced from time-to-time. If you still have this problem with version 1.2, please let me know.

Download Now

Download Now
Downloads: 295 (since 2/21/07)

Membership required, please sign-in or register:

About Spam Firewall

Spam Firewall is a plugin for Movable Type that can help reduce this load. The goal of Spam Firewall is to block 80% of spam attempts before they reach MT's comment and trackback scripts. As the name suggests, it acts like a firewall protecting your MT scripts.

How Spam Firewall Works

Spam Firewall creates a PHP script that acts as a firewall. Once installed, when comments or trackbacks are posted, they get posted to the PHP firewall script. The firewall script will then scan the the request against a "Top 40" list of common spam patterns. If the request matches, things stop right there. If the request passes the test, it gets forwarded to MT for processing in the normal manner. Most spam is blocked quickly, without consuming large amounts of CPU and memory.

The Top 40 List

The key to Spam Firewall is a "Top 40" list of common spam patterns. The 40 spam patterns (rules) released today represent 80% of the spam that I have received in the past 8 days. Of a total of 14,405 spam attempts, this Top 40 list matches 11,541 of them (80.1%). The list is based on real spam attempts from the past week. I plan on updating the Top 40 list regularly.

Requirements:

  • MT 3.2+
  • PHP (Note: you do not need to enable MT's dynamic publishing to use Spam Firewall, but your server must support PHP scripts -- most do)

Instructions:

  1. Download the zip file and extract its contents.
  2. Within the main 'Spam Firewall' directory, there are two folders, one names 'plugins' and one named 'php'. Upload both of these folders (including sub folders and files) into the same directory as Movable Type (often /cgi-bin/mt).
  3. Go to 'Settings' on the blog you want to setup, then choose 'Plugins', then choose the 'Settings' link under "Spam Firewall". Then click the "Click here to install the Spam Firewall Template for this blog" link. This will install the Spam Firewall index template and rebuild it. Advanced users can change the Output File name if desired, but you should not change the Name of the template.
  4. (Optional, but highly recommended) Rename your comment and trackback scripts [More Info]. Because Spam Firewall hides the name of these MT scripts, now is a very good time to rename them.
  5. To setup Spam Firewall for comments, you need to change the comments submission form to point to the firewall script. Go to your Individual Archive Template and look for the following:

    action="<$MTCGIPath$><$MTCommentScript$>"

    and replace it with:

    action="<$MTBlogURL$><$MTFirewallCommentScript$>"


  6. To setup Spam Firewall for trackbacks, look for the <$MTEntryTrackbackData$> and replace it with <$MTFirewallTrackbackData$>. Also, look for the <$MTEntryTrackbackLink$> and replace it with <$MTFirewallTrackbackLink$>.

  7. Rebuild all individual archives.

Download Spam Firewall

Non-commercial use - FREE ( In exchange for the free use of this plugin, I ask that you install the MT Plugin Network plugin. Plugin Network will help keep you up to date on the latest version (and rules) of Spam Firewall and other useful plugins. [more info])

Also, donations are appreciated:

Commercial use - $97.00

Download Now

Download Now
Downloads: 295 (since 2/21/07)

Membership required, please sign-in or register:

As always, suggestions and feedback are appreciated. Please reply to this entry.

Blog Janitor is a plugin for Movable Type that preforms various clean-up tasks. In version 1.0, Blog Janitor can perform the following tasks:

  • Close comments on old entries.
  • Delete duplicate comments and trackbacks

Blog Janitor does his work automatically, you don't need to edit your templates. Just tell Blog Janitor the tasks you want him to perform (by adjusting the plugin settings), and he will go to work periodically (using the scheduled tasks feature of MT 3.3+).

Here are some details on his current skills:

Close Comments and Trackbacks on Old Entries

One technique for reducing blog spam is to close comments (disable commenting) and trackbacks on entries that are older than a certain number of days. This can be a tedious process to do manually, if you remember to do it. Blog Janitor can take care of this job for you. Simply enable Close Comments in the plugin settings for a blog, and tell Blog Janitor the number of days he should wait before closing comments on an entry. That's all you have to do, Blog Janitor will routinely check for old entries and close comments on them for you.

Delete Duplicate Comments and Trackbacks

Duplicate comments and trackbacks can happen in a number of ways. For example, a commenter may hit the submit button twice, thinking that the comment did not get posted the first time. Another common occurence is duplicate junk comments and trackbacks -- since spammer often post identical spam messages, your Junk folders may be full of duplicates. Blog Janitor is skilled a scanning your recent comments and trackbacks for duplicates. If you give him the order (by enabling duplicate checking in plugin Settings), he look for recent duplicates and delete them. Just tell him how many recent items to scan, and he will go to work every hour looking for recent duplicates. (Note: there is no "undo" when Blog Janitor deletes items, but he does leave a message in the Activity Log notifying you of which items he has deleted).

Settings

The Settings is where you give Blog Janitor his orders. Go to the blog you want, then choose Settings, then the Plugins tab, and then click on Setting for Blog Janitor. The settings look like this:

Requirements

  • MT 3.3x

Instructions

  1. Download the zip file and expand it.
  2. Upload the contents of the 'plugins' directory in to the 'plugins' directory of you MT installation (usually /cgi-bin/mt/plugins/)
  3. Adjust the settings as described above

Notes:

  • If you have a large number if entries in your blog, Blog Janitor will not close comments on every old entry the first time he goes to work. He gets tired if he tries to close comments on too many entries at a time, and his union contract states that he doesn't have to close comments on more than 100 entries each hour. (Okay, the real reason is to save your MT from excess load that might slow things down) Since Blog Janitor works on up to 100 entries each hour, it may take some time before he gets 'caught up'. For example, if you have 2400 entries on your blog, it will take about 24 hours for Blog Janitor to go through all the old entries and close comments and trackbacks.
  • Blog Janitor punches his time clock when he starts and finishes a task. For each task, he posts a message to the Activity Log that explains what task was completed, and how many seconds it took him to complete. If you are concerned about system load, keep an eye on the Log to see how hard he is working.

Get Blog Janitor

Blog Janitor is free for personal use:

Download Now

Download Now (Blog Janitor for Personal Use)
Downloads: 765

Membership required, please sign-in or register:

Commercial Use: $97

If you buy a commercial license, you will get priority for future features, and an advanced version of Blog Janitor that enables you to give Blog Janitor orders on a system-wide basis (so you can adjust the settings in once place for all blogs on the system).

As always, comments and suggestions are welcome - please reply to this entry.

Add Category is a simple MT Plugin that enables you to select multiple entries and add them to one or more categories at the same time. This can be a timesaver if you want to add a bunch of entries to the same category -- using this plugin you can avoid opening up each entry, adding the category, saving the entry, etc.

This screen snap says it all:

Instructions:

  1. Download the zip file and expand it.
  2. Upload the content of the 'plugins' directory into the 'plugins' directory within your MT install.
  3. Go to an Entry Listing screen for the blog you want.
  4. Select one or more entries by checking the boxes on the left-hand side.
  5. Choose "Add to Categories..." from the drop-down box on the top-right of the entry listing.
  6. Enter the names or category IDs of one or more categories. If you enter more that one category, separate each with commas. Then hit the okay button.
  7. Rebuild the entries.

Notes:

  • If you have more than one category with the same name in the same blog (rare, but it does happen), then you should use category ID numbers to make sure the entries get added to the intended category.
  • If an entry is not assigned to any categories, the plugin will assign the first category you specify as the primary category.
  • If you specify a category that does not exist, the plugin will display an error message. You should create the categories first.
  • This plugin cannot be used to change the primary category.
  • This plugin cannot be used to remove categories from entries (perhaps in a future version).

Get Add Category

Add Category is not free, but you can try before you buy. The license cost is only $7.

Download Now

Download Now
Downloads: 239

Membership required, please sign-in or register:

The Ajax Rating Pro plugin enables you to setup comment threshold viewing for Movable Type powered sites. For more information about Ajax Rating Pro, click here.

This article focuses on ways that you can use Ajax Rating Pro to setup comment thresholds for Movable Type. The concept behind comment threshold is the ability to hide or collapse comments with rating score below a certain threshold. The result is collaborative filter, readers rate each others comments, and higher ranked comments are given more prominence, while lower ranked comments are given less prominence. Popular site such as Slashdot, Digg, and Scoop-powered sites use comment threshold filtering. It is a great tool for popular sites that attract a large number of comments.

Ajax Rating Pro is very flexible and customizable -- you can decide how you want to implement comment threshold filtering. Do you want to completely hide low ranked comments? Merely collapse them? Implement a default threshold score, or let readers choose their own? Something else in mind?

Ajax Rating Pro comes with a few built-in tools to help setup some of the more common approaches to comment thresholds. Let's walk through such an example. First take a look at the test entry here. Feel free to rate some comments and set a person comment threshold - notice how the display changes (refresh the page if needed). I am going go step-by-step to setup comment thresholds in this manner.

In this scenario, reader will rate comment with a vote up or a vote down. Votes are +1 point and votes down are -1 point. The default threshold is -3. In this scenario, comments with a total score of less than -3 will appear in a collapsed state. A single-click reveals the below threshold comment. Reader can optionally choose their own threshold using the form at the bottom of the comment listing.

Step 1 - After you have installed Ajax Rating Pro, go to the plugin settings for the blog you want. Choose Thumbs Up/Down for comment mode and choose 1 for Comment Max Points. Set the default threshold as desired (in this example, we will use -3).

Step 2 - Add a thumb rater to your Individual Archive template, between the <MTComments> and </MTComments> tags. In this example, I added it after the comment date on the default MT 3.3+ template:

<$MTAjaxThumbRater type="comment" report_icon="1"$> Score: <strong><span id="ajaxrating_comment_<MTCommentID>_ttl"><MTAjaxRating></span></strong> (<span id="ajaxrating_comment_<MTCommentID>_cnt"><MTAjaxRating show="vote_count"></span> votes cast)

Then rebuild your individual archives. (Tip: make sure you have the Ajax Rating lines in the <head> section of this template, as described in step 10 here. After rebuilding, each comment should have a thumb rater -- test to make sure the ratings are working.

Step 3 - Now that our readers can rate others' comments, now we can change the display for comments that fall below the threshold. In this example, we will do this using CSS styles to show or hide things. First we want to create add a section to the Individual Archive template, that will display only when comments fall below the threshold. In this example, immediately after </MTCommentsHeader>, enter the following:

<span class="below-threshold" id="threshold-<$MTCommentID$>">
<a href="#" id="c<$MTCommentID pad="1"$>" onclick="showComment(<$MTCommentID$>); return(false);"><$MTCommentBody trim_to="30" strip_linefeeds="1" remove_html="1"$>...</a> (Below threshold)
<p class="comment-footer">
Posted by <$MTCommentAuthorLink default_name="Anonymous"$> <$MTCommentAuthorIdentity$> |
<a href="#comment-<$MTCommentID$>"><$MTCommentDate$></a> | Score: <strong><$MTAjaxRatingTotalScore$></strong>
</p>
</span>

The first and last lines above are very important. This <span> encloses the stuff that we want to display when a comment is below the threshold. We will show and hide this span depending on the score and threshold. Both the class="below-threshold" and id="threshold-<$MTCommentID$>" are required for this purpose.

Inside the the span, you can customize what you want to display when a comment is below threshold. In this example, we have included a link that will display the comment. Notice the onclick argument in the link:

onclick="showComment(<$MTCommentID$>); return(false);"

This onclick section is important, as it will cause the link to run some javascript to display the comment in the browser.

Step 4 - The next step is to include a form that readers can use to set their own threshold. (If you don't want readers to be able to set their own threshold, you can skip this step). Below the </MTComments> tag, enter the following form code:

<form id="threshold-form" name="threshold_form" action="<$MTEntryLink$>#comments" onsubmit="setThreshold(this);">
<input type="text" name="threshold" size="3">
<input type="submit" name="submit" value="Set Comment Score Threshold">
</form>

The important part of this form is the onsubmit="setThreshold(this);" section as this will set the readers threshold by storing in a cookie in their browser.

Step 5 - By default, the section that we added in Step 3 above is hidden from view, and the full comment is displayed. At this point we need to compare the score to the threshold of each comment and decide which comments should be collapsed. Add the following below the form coded added in Step 4:

<script type="text/javascript">
<!--
var comments = new Array(<MTComments>'<$MTCommentID$>',</MTComments>'');
hideComments(comments);
//-->
</script>

The above javascript will check each of the comments. If a comment is below the threshold, the comment will be hidden and the section from Step 3 above will be displayed instead.

Step 6 - Rebuild your individual archives and test it!

The customized individual archive template used in this example on the test entry can be found here.

The above example is only one way to implement comment thresholds on your site using Ajax Rating Pro. You can customize the above to meet your needs. You can even edit the javascript and CSS elements to customize things further.

Another Built-in tool is the <MTIfAjaxRatingBelowThreshold> conditional tag. You can use this tag inside an <MTComments> container. Anything between <MTIfAjaxRatingBelowThreshold> and </MTIfAjaxRatingBelowThreshold> tags will not be inlcuded in the HTML of the page. (Note that the score is checked against the default threshold when the page is rebuilt, or if you are using PHP dynamic publishing, when the page is displayed). For example, if you wanted to completely hide comments below the default threshold, you could do something like this:

<MTComments>
<MTIfAjaxRatingBelowThreshold>

.....comment template code here......

</MTIfAjaxRatingBelowThreshold>
</MTComments>

Note that if you use this tag, you won't be able to provide a link to display the comment like in the example above.

Another way to use this tag might be to apply certain filters to comments below the default threshold. For example you might want to remove HTML from comments below threshold:

<MTIfAjaxRatingBelowThreshold>
<MTCommentBody remove_html="1">
<MTElse>
<MTCommentBody>
</MTIfAjaxRatingBelowThreshold>


I hope that the example above provide a few examples of how you can implement comment threshold viewing, and perhaps inspire a few ideas for unique ways to do so.

To get Ajax Rating Pro, or for more information, click here.

In this article I will cover some of the more advanced features of the Ajax Rating plugin. Ajax Rating is rating plugin for Movable Type that makes it easy for readers to rate entries, comments, and more. If you haven't read about Ajax Rating yet, you should read this first, and then come back to read this article afterwards.

Covered in this article:

Custom images for star and thumb raters
Using custom raters
Dynamically updating numeric ratings and vote counts
Setting up comment raters
Rating non-MT objects

Custom images for star and thumb raters

Whether you are using Ajax Rating or Ajax Rating Pro, you can use alternative images for rating items. For star/point raters, the image must be named "starrating.gif". The image should be a "three state" image. For example, here is the default image that comes with Ajax Rating (design credit to Ryan Masuga):

Note that the image has 3 stars, appearing one on top of the other. As such, the height of the image should be 3 times as long as the width. The default image, above, is 30 pixels wide by 90 pixels high. The star at the top is the "empty star", the star in the middle is the "hover star" (the color of the star when you hover your mouse over it), and the bottom star is the "current rating star". Of course, the images don't have to be "stars" at all -- you could use images of hearts, checkmarks, boxes, or bananas. As an example, Ajax Rating comes with an alternative star image called 'starrating16x16.gif' that looks like this:

Note that this image is 16 pixels wide and (16 times 3 equals) 48 pixels high. if you want to use this image, you can rename it 'starrating.gif'.

After you have the image you want, make sure it is named starrating.gif and then upload into the /mt-static/plugins/AjaxRating/images/ directory on your server.

The final (but important) step is to browse to the Ajax Rating settings for your blog and enter the width on your new image into the "Star Icon Width" field. Save your settings and then rebuild the Ajax Rating javascript and styles index templates. Finally rebuild all your pages with star raters.

To use custom image with Thumb Raters (Pro feature), the process is much easier. The only rule is that you have to name your images "up.gif" (+1 point) and "down.gif" (-1 point). You make them any size that suits your needs. Upload the new images to the /mt-static/plugins/AjaxRating/images/ directory and you are done (no need to rebuild any pages).

Creating Custom Raters

The previous section explains how to customize the look of the raters that appear when you use the convenient <MTAjaxStarRater> and <MTAjaxThumbRater> tags. You are not limited to those raters, however. You can create your own custom raters.

For example, here is a simple rater that consists of a "Vote For This Entry!" text link:

<a href="#" onclick="<$MTAjaxRaterOnclickJS points="1" type="entry"$>">Vote For This Entry!</a>

The above example illustrates the key elements of rating link. Set the href equal to "#" and include an onclick= argument. The special MTAjaxRaterOnclickJS tag helps you fill the javascript required to capture the vote. They key argument here is the "points" argument -- use this to specify how many points get assigned when someone clicks that link.

To expand the above example, here is a 5 point rater using text links instead of images:

<a href="#" onclick="<$MTAjaxRaterOnclickJS points="1" type="entry"$>">1</a> <a href="#" onclick="<$MTAjaxRaterOnclickJS points="2" type="entry"$>">2</a> <a href="#" onclick="<$MTAjaxRaterOnclickJS points="3" type="entry"$>">3</a> <a href="#" onclick="<$MTAjaxRaterOnclickJS points="4" type="entry"$>">4</a> <a href="#" onclick="<$MTAjaxRaterOnclickJS points="5" type="entry"$>">5</a>

Tip: if you want your customer rater to disappear after a vote, surround in a div or span element with an "id" in the following format "thumb{type}{id}", replacing {type} and {id} with the type and id of the object being rated. For example:

<span id="thumbentry105"> ...rater goes here </span>

Dynamically updating numeric ratings and vote counts

Often you will want to display numeric representations of ratings and vote counts on your pages. Consider the following example, which shows box a star rating and the average rating and vote count:

  • Currently 3.9/5
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 3.9/5 (1209 votes cast)

Notice when you make a rating with the above rater, the average rating and vote count numbers get updated dynamically. The trick to doing that is to surround those numbers in "span" tags. Here the template code for the above example:

<$MTAjaxStarRater type="entry"$>
Rating: <strong><span id="ajaxrating_entry_<$MTEntryID$>_avg"><$MTAjaxRatingAverageScore type="entry"$></span></strong>/<$MTAjaxRatingEntryMax$> (<span id="ajaxrating_entry_<$MTEntryID$>_cnt"><$MTAjaxRatingVoteCount type="entry"$></span> votes cast)

First looking at MTAjaxRatingAverageScore, the "id" of the span must be in the format id="ajaxrating_{type}_{id}_avg". For an entry with an id of 105, that would be id="ajaxrating_entry_105_avg". Using MT template tags in this example, you can do it as follows:

<span id="ajaxrating_entry_<$MTEntryID$>_avg"><$MTAjaxRatingAverageScore type="entry"$></span>

For MTAjaxratingVoteCount, the process is the same, but the id ends in "_cnt" instead of "_avg". So the template code becomes:

<span id="ajaxrating_entry_<$MTEntryID$>_cnt"><$MTAjaxRatingVoteCount type="entry"$></span>

If you wanted to dynamically update MTAjaxRatingTotalScore (not shown in above example), the id should end in "_ttl":

<span id="ajaxrating_entry_<$MTEntryID$>_ttl"><$MTAjaxRatingTotalScore type="entry"$></span>

Setting up comment raters

With Ajax Rating Pro you can rate comments and other objects. Setting up comment raters is similar to entry raters. While you can use star raters or thumb raters, many people will prefer to thumb raters for rating comments, so my example will focus on these.

To add a thumb comment rater, place the following in suitable place in a <MTComments> container:

<MTAjaxThumbRater type="comment">

(Optionally, you could include a report_icon="1" argument to display a third button, that will enable readers to report comments to entry authors)

Rating non-MT objects

With Ajax Rating Pro, you can even create raters for non-MT objects. For example, suppose I have five photos in my sidebar, and I want people to be able to rate them. The rules for rating non-MT objects are as follows:

  • choose a unique "type" of object (don't use the reserved names like 'entry', 'comment', etc.)
  • create a unique numeric id for each specific object you want to rate.

In the sidebar photo example, let's choose the type "sidebarphoto" and give each photo a numberic id from 1 to 5. For the first photo, I would use the following code to display a star rater:

<$MTAjaxStarRater type="sidebarphoto" id="1" max_points="5"$>

...and the second photo would be:

<$MTAjaxStarRater type="sidebarphoto" id="2" max_points="5"$>

... and so on.

Also note that the discussion above about dynamically updating ratings and vote counts also applies to non MT objects -- just be sure to use your chose "type" and "id" values in the span ids.


The features above are just a few advanced ways to use Ajax Rating. To get Ajax Rating, or to learn more, click here.

Look forward to the next article (soon) on Ajax Rating: Setting Comment Threshold Viewing.