Entry Post is a plugin that enables visitors to post entries to Movable Type via an external form. To get Entry Post, or for more information, click here.

Entry Post can be used in many different ways, using the many options available. This entry provides some tips on a few usage scenarios, and may inspire a few ideas for other ways that it can be used.

Displaying Information about Entry Posters

If you want to display information about the person who submitted an entry, you can use the following template tags. (Note: these template tags are provided by the CustomFields plugin, which is a requirement for Entry Post v1.0)

<MTEntryDataName> - The Name of the poster.
<MTEntryDataEmailAddress> - The email address of the poster.
<MTEntryDataURL> - The URL provided by the poster, if any.

For example, if you wanted to display a linked name, you could use the following code:

<MTIfNonEmpty tag="EntryDataURL">
<a href="<MTEntryDataURL>"><MTEntryDataName></a>
<MTElse>
<MTEntryDataName>
</MTElse>
</MTIfNonEmpty>

But suppose you are entries that could be posted via Entry Post or posted by an Author in the system. The following code can be used to simulate the "Posted by..." line from the MT 3.3 default templates:

click here for the template code

Displaying an Image Submitted by the Poster

If you are enabling posters to submit an image, you can display the image using the following template code:

<MTIfNonEmpty tag="EntryDataImage">
<img src="<MTBlogURL><MTEntryDataImage>">
</MTIfNonEmpty>

Requiring Moderator Approval before Publishing

If you don't wanted entries to be published immediately, you can choose "Unpublished" as the "Default Status" in the settings for this plugin. In such cases, you may want to include a hidden "redirect" field on your form. Here is an example:

<input type="hidden" name="redirect" value="http://mt-hacks.com/thankyou.html">

When Entry Post finds a redirect URL in the submitted form, it will redirect the poster to that URL after the submission has been received. The redirect page can be any page, usually with some text thanking them for their submission, that it is pending moderator approval, etc. This is also very useful when using MT as a contact form (see below).

Using Entry Post as a Contact Form

An advanced usage of Entry Post is a contact form. A contact form is a form which accepts information from the poster and then sends you the results via email. In a business context, this is sometimes referred to a "lead from". To make the plugin work this way, there are two important settings. First, ensure that email notification is turned on in the settings, and make sure that an email address is entered. Second, check the "Disable Entry Creation" setting: this will prevent an entry from being created. While contrary to the primarily purpose of the plugin, this options converts the form into a contact form, only sending you the submission by email. Using a form is better than posting your email address on your site, as email address harvesters will find your email address and you will get (even more) spam in your inbox. When using Entry Post in this way, it is a good idea to add a hidden 'redirect' field, as discussed in the previous section. An example of an Entry Post contact form can be seen here (view the HTML source to seem what the form looks like, including the hidden fields at the top).

Overriding Default Settings

Depending on your needs, there may be some case where you want to override some of the default settings. One reason you might want to do this, is when you would like to include more than one EntryPost form on the same blog, each with a different purpose. For example, one for entry submissions and another as a contact form. The following settings can be overridden by fields in form:

Default Category - If a form includes a field (hidden or visible) named 'cat_id', the value of that field will be used as the Category ID for the entry to be placed in. You could include a hidden cat_id field and assign a category ID, or create a visible dropdown box so that the poster can choose a category (an example of the latter can been seen here with template code found here.)

Default Tags - Similar to above, the default tags can be overridden by including a field named 'tags' in your form. A tags example is also present on the form and code linked to above.

Disable Entry Creation - If you include a field called 'no_entry' and set its value to 1, then no entry will be created when the form is submitted. This field is useful as a hidden field when you want to create a contact form using Entry Post, but also want to have another form for submitting entries. An example on my contact form on this site.

Creating a Contact Author Form

The Contact Form technique described above is useful, but what if you have more than one Author, and you want people to be able to contact each of them? Entry Post has an advanced feature that addresses this. In addition to the above overridable fields, the Notification Email Address field can also be overridden. However, including authors' email addresses in a hidden form field does not protect their privacy, and will certain lead to more email spam. For this reason, you need to include a field called 'email_author_id' and then assign the MT Author ID of the author to send the email to. Entry Post will take the email_author_id and look up the author's email address in the MT database, and send the email to that author. Similar to categories, this can be a hidden field, but it may make more sense as a dropdown box, enabling visitors to choose the Author to contact.


I hope the above tips and tricks are useful, and perhaps inspire creative uses for Entry Post. If you have questions or suggestions, please reply to this entry. To get Entry Post, or for more information, click here.

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.

Update 1/23/07: Entry Post now works with MT 3.2 as well as MT 3.3.

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

Try Entry Post Now

I have setup 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 (and 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.

Requirements

  • MT 3.2+ (Note: The tags and TypeKey login features require MT 3.3+)
  • CustomFields Plugin - Version 1.22 - To store and display information about entry posters, the CustomFields plugin (from Movalog) is required. Using this plugin, the Name, Email, URL, and IP address of the poster will be visible on the "Edit Entry" screens, and template tags can be used to display these values on your site. In the unlikely case that you don't want either of these features, then EntryPost will still work (entries will be posted, email notifications sent, etc.) A portion of all sales of Entry Post will be donated to Movalog. Note that CustomFields version 2.x is not currently supported.

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.

Two months ago I posted about the CPU load effect of Comment and Trackback spam. In short, even when most of the spam gets correctly marked as junk, it can still have a major impact on the CPU load and memory usage of the server. This can make everything else run slower, and some web hosts may threaten to disable your account for hogging CPU resources.

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

SpamFirewall.zip

Membership required, please sign-in or register:

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

MT Plugin Network is a plugin for Movable Type that provides links to the latest plugins and tools, from within the MT administration interface:

MT Plugin Network is collaborative effort by a growing list of plugin developers. When plugin developers release new or updated plugins or tools, they will be added to list of recent MT Plugins and Tools. This way you can quickly and easily stay on top of the latest plugins for Movable Type.

Download Now

Click here to download MT Plugin Network v1.0

Membership required, please sign-in or register:

Instructions

Unzip the PluginNetwork.zip file and upload the contents to your plugins directory within your Movable Type installation (often /cgi-bin/mt/plugins/). After uploading, MT Plugin Network is installed.

In the near future, many of the free plugins released by MT Hacks will have MT Plugin Network included in the download files. As a condition of the free use of the software, I ask that you also install PluginNetwork. It is a great way to keep up to date on new and updated plugins from MT Hacks, as I will be posting all future updates to the Plugin Network announcements box.

Are you a plugin developer? If you would like to join the MT Plugin Network and include your plugin announcements in the "MT Plugins and Tools" box, please send an email to plugins at mtpluginnetwork.com.

While there are many strategies for blocking, filtering, and reducing blog spam, many of them don't due much to reduce the CPU load incurred to handle all that spam. Even if you have strong MT spam filters, or close comments on your entries, spam may continue to cause increased CPU load, even if the spam is rejected or filtered.

As far as spammers are concerned, the automated ones don't care much (or even realize) that comments are closed on your entries. And they don't take the time to see if their attempts were junked or pubished. They will continue to submit comment spam and trackback spam. MT will refuse them, of course, but the entire MT application loads on every attempt -- the MT cgi scripts still incur load in process these, but likely not as much as a junked or successful comment submission. The main benefit to closing comments and using MT junk filters is to reduce / remove the clean-up effort, and to keep spam from be published on your blog. You end up with less published spam, but I am not sure how much CPU load is saved in these cases.

To address the CPU load of spam, you need to prevent/reduce spam hitting the MT cgi scripts. A temporary solution is to rename your comments and trackback scripts. Spammers will still try to hit the old URLs, but they will get 404 "not found" errors. This still incurs some load, but not as much as if MT had to handle those requests to reject or filter them. This solution is temporary because spammers will soon learn the new names of your scripts, and spam and load will increase thereafter.

A longer term solution is to attempt to block spam *before* it hits the MT scripts. mod_security is one way to do this. It is an Apache module that uses rule-based filters to block requests at an early stage. You still need a good ruleset, of course. In many, case you will need a dedicated server to use this, but some shared hosting providers support mod_sec to varying degrees. In recent days, spam attempt have increased on my server. Yesterday, mod_security blocked almost 4,000 spam attempts. Without mod_security, that would have been a lot for MT and my dedicated server to handle. My server would likely have crashed several times. But my blocking the spam before it gets to my MT scripts, I was able to weather the attack without a huge spike in CPU load.

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.

New Features in Version 1.5

Fast Search v1.5 has several new features:

  • Search Method Options. Three methods are available which control how the searches are conducted. Most users will use the default "Fulltext" option, but some installations will beneft from the two new options. More details below.
  • Multi-Byte Language Support. Fast Search can now search entries with languages in multi-byte languages, such as Arabic and Japanese, using the "Non-Fulltext" search method.
  • Total Number of Results Found. A new tag for displaying the total number of results in the database, so you can display "showing 1 - 10 of 256 results".
  • Search Page Links. Display linked page numbers to link directly to multiple pages of search results.
  • Previous Page Link. Links to the previous page of search results.
  • Short Words Searching. Using the "Non-Fulltext" or "Fallback" search methods, you can now search for words under 4 characters in length.
  • Match Partial Words. Search for partial words using the "Non-Fulltext" or "Fallback" methods, you can now search for partial words.
  • "Mixed" Multi-blog Searching. You can now search multiple blogs in the same search. The results are "mixed" together, in one list of search results, not grouped by blog.

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 1.5 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.
    • 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">
  • <MTBlogResultHeader> - this is container tag that displays content before the search results.
  • <MTBlogResultFooter> - this is container tag that displays content below the search results.
  • <MTNoSearchResult> - 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 tag that displays its content only if no search phrase was specified.
  • <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 - <MTSearchIfPrevioustPage> - 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.
  • new - <MTSearchTotalResults> - The total number of matching results in the database.
  • new - <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=" - ">
  • new - <MTSearchPageNumber> - Displays the page number of each search results page. This must be used within a <MTSearchPages> container.
  • new - <MTSearchPageLink> - Displays the URL to each search results page. This must be used within a <MTSearchPages> container.
  • new - <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.

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.

  • 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 from Fast Search v1.0

    Follow steps 1 to 3 above, then adjust your Fast Search plugin settings and search template, if desired.

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>fastsearch"

...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$>fastsearch">
    <label for="query" accesskey="4">Search this blog:</label><br />
    <input id="query" name="query" size="20" />
    <input type="submit" value="Search" />
</form>

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:

Commercial use - $97.00

Download Now

Download Now
Downloads: 4725 (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 v1.5 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 v1.5 does not include. Fast Search v1.0 does not support comment searches, regexp search, case-senstive search, the use of AND and OR operators, and Edit Entry Links). Also, Fast Search v1.5 does not inlcude MT 3.3 search features such as tag search. Some of these features may be supported in future versions -- please let me know what features you would like to see.

Note: There was a major bug in v1.5 that is fixed in this version. If you are using v1.5, you must upgrade to v1.7.

Smart Rebuild v1.7 provides several new features, including:

  • rebuild "chunking" of category rebuilds. When you rebuild your categories, they will get rebuilt in chunks, similar to the way Indvidual Archives get rebuild, a certain number at a time. Of course, this includes the category rebuilding optimizations from Smart Rebuild v1.0. This new chunking feature will be especially helpful for blogs that have many categories (40 or more, in most cases).
  • background rebuilding of category and date-based archives when a new comment is posted. This reduces the amount of time that it takes to post a comment.
  • background rebuilding when items are created, edited, junked, or deleted from the Movable Type admin interface. This means less time waiting when you conduct these tasks.

Note that background tasks will not reduce the server load nor the actual time it takes for pages to be rebuilt. The benefit of background tasks is that the rebuilding is done "in the background", meaning that the process of posting a comment, saving an entry, junking comments, or other task can continue without waiting for the rebuild to complete. In short, it saves time for commenters, authors, and blog admins.

Requirements

MT 3.3x

Note: This version of Smart Rebuild is not suitable for use on MT4+.

Installation Instructions:

  • Download the plugin and upload to the 'plugins' directory in your Movable Type installation.
  • Check to see if background tasks will work on your server. To check, you can use a test script that comes with MT. Go to http://www.yourmtdomain/cgi-bin/mt/mt-tesbg.cgi (modify this address so that it points to the file in your MT directory). If you get message that says "Background tasks are available", then you can turn on this option (see the next step). If background tasks are not available, you should not enable it, as it may cause errors.
  • If you haven't done so previously, turn on background tasks by adding the following line to your mt-config.cgi file:

    LaunchBackgroundTasks 1

Download Smart Rebuild

Non-commercial use - FREE

Commercial use - $97.00

Download Now

SmartRebuild.zip

Membership required, please sign-in or register:

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

Update, Oct. 9, 2006 - A newer version of Fast Search has been released. Click here for details.

The built-in search tool in Movable Type can be slow and can take a lot of processing power, especially if you have blogs with many entries. When I recently upgraded to version 3.31 of MT, I was dismayed to learn that searches became slower and more processor-intensive (at least on my server). I was forced to disable the mt-search.cgi script, as it was overloading my dedicated server. So I went looking for an alternative. I found a PHP mySQL Fulltext method that worked very fast, and without the CPU problems.

So contacted IƱaki, the creator of this PHP solution, who granted me permission modify the solution and package it up as a Movable Type plugin. I have added a number of features, and I have made significant efforts to make the plugin easy to install and use.

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.

Template Tags

Version 1.0 of FastSearch is designed to easily replace the existing search functionality in Movable Type. 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.
  • <MTBlogResultHeader> - this is container tag that displays content before the search results. (Note: in version 1.0 of Fast Search, you cannot search multiple blogs in the same search)
  • <MTBlogResultFooter> - this is container tag that displays content below the search results.
  • <MTNoSearchResult> - 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 tag that displays its content only if no search phrase was specified.
  • <MTSearchCount> - The number of search results displayed. 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.

As you may have noticed, most 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.

  • 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 4.0.1 or higher

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)
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>fastsearch"

...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$>fastsearch">
    <label for="query" accesskey="4">Search this blog:</label><br />
    <input id="query" name="query" size="20" />
    <input type="submit" value="Search" />
</form>

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.

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:

Commercial use - $97.00

Download Now

Download Now
Downloads: 4725 (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 v1.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 v1.0 does not include. Fast Search v1.0 does not support comment searches, multi-blog searches (searching multiple blogs at the same time), regexp search, case-senstive search, the use of AND and OR operators, and Edit Entry Links). Also, Fast Search v1.0 does not inlcude MT 3.3 search features such as tag search. Some of these features may be supported in future versions -- please let me know what features you would like to see.

Updated: 8/9/06 07:39:00 - added some additonal info to the instructions based on feedback from Patrick.

This plugin enables you to trust commenters on you blog -- without requiring them to login via TypeKey or other authentication service.

The plugin enables you to trust commenters based on a combination of three things:

  1. the commenter's name
  2. the commenter's email address
  3. the IP Address(es) used by the commenter

The last item is important, as it vastly reduced the possibility of "spoofing" -- someone lese posing as the trusted commenter. For each Name/Email combination, you can trust multiple IP Addresses.

How it works

  • You can trust a commenter from a specific IP address with a single click. When viewing the comment in the MT admin interface, click the "Trust this commenter from this IP address" link that appears under "Plugin Actions" below the comment fields.
  • When you trust a commenter in this manner, the plugin will create a commenter record in your database (similar to the way this happens when someone posts a comment using TypeKey). In addition, the commenter is granted permission to post again from the same IP address.
  • If the commenter already exists in your database, their permissions are simply updated to include the new IP address, if necessary.
  • The next time the commenter posts a comment on your blog (from a listed IP address), the plugin will recognize them as trusted. Behind the scenes, a cookie is placed on the commenter's computer (again, very similar to the TypeKey cookie). Furthermore, the comment gets posted in "trusted" status, which means that the junk filters are bypassed for this commenter (for example).
  • The next time the commenter posts a comment, they will not have to enter their name and email address. Once again this is similar to TypeKey, the commenter will be greeted as if they have signed in via TypeKey. (The cookie is used to identify the commenter).
  • When recognized trusted commenters post comments, a green "check mark" icon will appear beside their name (same icon as trusted TypeKey commenters).
  • After a commenter is trusted, he or she will appear in the "Commenters" section of the MT admin interface for that blog, along with the number of comments posted, etc. You can also "untrust" or "ban" these commenters as well.
  • Commenters can continue to sign-in via TypeKey, if desired. When using this plugin, you can accept trusted comments from both types of trusted commenters.

Benefits

This plugin attempt to provide the benefit of Movable Type's trusted commenters feature, without requiring commenters to register and sign-in via TypeKey. While I think TypeKey authentication is a great idea, I have come to learn (from experience) that many people do not want to use it, for reasons that I don't fully understand. As an example, read the comments on this Pharyngula entry, in which the author announces that TypeKey is no longer required.

Another key benefit is the ability to trust commenters so that they will be able to bypass the junk filters. With spam getting worse, many of use (like me) have very aggressive spam filters False positives do happen, and it can be frustrating for commenters when their legit comments get moderated or junked. In this way, Trusted Commenters can act as part of your anti-spam portfolio (effectively a "whitelist" of commenters).

Instructions:

1. Download the plugin and expand the zip file.

2. Upload the "TrustedCommenters" folder to your "plugins" directory within your MT installation.

3. Start trusting commenters from the view/edit comment screen with MT. Click the "Trust this commenter from this IP address" link that appears under "Plugin Actions".

4. (optional) Go to your settings and enable authentication. (Go to Settings>Feeback>Authentication Status). This is not necessary but it will enable the commenter "greeting" and alleviate the need for commenters to enter their name and email address. Alternatively, this can be enabled manually without enabling authentication, as I have done on this site, by ensuring that the proper javascript and CSS elements are present.

Download Trusted Commenters

Non-commercial use - FREE

Commercial use - $97.00

Download Now

TrustedCommenters.zip

Membership required, please sign-in or register:

I have been using Trusted Commenters on Mars Rover Blog and Seinfeld Blog for about a month, and it is going quite well.

As always feedback is appreciated.

Introducing Smart Rebuild, a plugin for Movable Type that speeds up rebuilding. Version 1.0 of this plugin specifically addresses the speed of rebuilding category archives from the MT admin interface.

Do you need this?

  • If category rebuilds are taking a long time, you may want to try Smart Rebuild.

  • If you are getting 500 - Internal Server Errors when rebuilding, you may want to try Smart Rebuild.

  • If you have a blog with a large number of entries and/or a large number of categories (or both), you may want to try Smart Rebuild.

Download Now

SmartRebuild.zip

Membership required, please sign-in or register:

Installation:

1. Expand zip file and upload the "Smart Rebuild" directory to your "plugins" directory within Movable Type (this is often something like /cgi-bin/mt/plugins).

2. Try it by clicking the "rebuild site" button from the left menu and choose "Rebuild All Files" or "Rebuild Category Archives Only".

You may want to time your category rebuilds before installing the plugin, and then again after you install it. This will help give you a sense of the improvement, which will vary depending on your site.

Tested with MT 3.2 and 3.31.

Future versions of Smart Rebuild may contain further rebuild optimizations.