Currently Viewing Posts in Notes of MovableType

Assets Directory of MovableType

There is a folder under the MovableType installation. It is used to store the files uploaded.
The default is assets_c.
Because of I manually setup the .htaccess file to convert all underscore(_) to dash(-). The link or file under assets_c will be redir to assets-c. And got the 404 error.
So I changed Assets Directory.
1) Make a directory assets-c.
2) Move all files from assets_c to assets-c.
3) Add one line to mt-config.cgi
AssetCacheDir /assets-c
4) Login the MT system and update all images, etc.
5) Rebuild it.

Upgrade my blog from Movable Type 4.12 to MovableType 4.14 on Dreamhost

SixApart releases MovableType 4.14 for some security upgrade.
* Release Type: Security Release. None of the fixed vulnerabilities has been exploited in the wild.
* Mandatory? This is a mandatory update for all users of Movable Type 3.36 and later.
* Performance Implications: None.
* Plugins Affected: None.
* Templates Affected: No changes in your templates are required.
* System Requirements: This release has no new or additional system requirements.
* Licensing considerations: None. MT 3.37, MT 4.01c and MT 4.13 are free updates for users of any version of MT3 and MT4 respectively.
* Upgrade Fatigue: No updates are scheduled until the release of MT 4.2, which is currently in the final stages of release. There will be no further releases before MT 4.2 unless significant security issues are found which require additional 4.x releases. It has been 46 days since the last recommended update to MT4.

Continue reading “Upgrade my blog from Movable Type 4.12 to MovableType 4.14 on Dreamhost”

MovableType 4.2 RC release

Just got the news about MT 4.2 rc release.
It looks like a small upgrade for new features.
Let us have a close look about it.

  1. A faster and more efficient user experience
  2. More design options and our simplest and most powerful templates yet
  3. The best, most effective anti-spam solution

In the first feature, the most important is described as below:

Completely Rewritten Search – Movable Type’s venerable built-in search system has been rewritten from the ground up to be modernized, much more flexible, and lightning-fast. Now it’s easy to create custom-filtered views of your content.

MT-search is heavy CPU load script on my host.
If the new search can solve it, I would like to keep use it instead of Google Search.
It announced that Common tasks in Movable Type 4.2 are up to 100 times faster.
Do you believe it?

Continue reading “MovableType 4.2 RC release”

Highlight source code in the post

There is a great highlight tool written by javascript.

syntaxhighlighter is a Google code project.

Update: Just found it is a new version for Syntaxhighlighter. It is a little bit different than the old one which I mentioned here. Please find the right way to use it.
It is easy to use and looks perfect.

The following are some examples.

1) PHP script

// Pull the array data from the lang pack//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();
for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
{$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
$faq_block[$j][$counter]['answer'] = $faq[$i][1];
$counter++;<br />$counter_2++;<br />}
else{$j = ( $counter != 0 ) ? $j + 1 : 0;
$faq_block_titles[$j] = $faq[$i][1];
$counter = 0;
}
}

2) CSS script

.tag1{
font-size: xx-large;
color: #6588c7;}
.tag2{
font-size: x-large;
color: #5578a7;}
.tag3{
font-size: large;
color: #4568a7;}

This code project covers C++ C# CSS Delphi Java Java Script PHP python Ruby Sql VB XML/HTML.

Let’s discuss how to use it in MovableType.

Continue reading “Highlight source code in the post”

Change theme to improve user experience

I changed the theme of this Blog.
The purpose is to make it display faster and looks clear.
I removed some gadgets on the side column. Change the color to emphasize the good stuffs I recommend.
I also add a Google search (You can find it on the menu, named Google Custom Search) to replace the search provided by Movable Type.
I received email from my Hosting provider, Dreamhost. It said my load is over the limit.
mt-search.cgi has one of the biggest problems.
Spammer is so strong. I have to stop using mt-search.
Anyway, Google Search is good. I do like it and it is my first choice in Search Engines.
You may like it or not. If you have any comments for this theme change, just leave it below.

Database on Dreamhost

This blog has some error last week. Some pages were not build correctly.
I diagnosed it and found the template was broken. A bunch of codes were missing.
I want to find the backup of MySQL database.
Go to Dreamhost Web Panel > Goodies > Manage MySQL
Next to the database name, there are four links. One of them is Restore DB.
dh_mysql

Click Restore DB, and go the following page.
dh_restore_db

Continue reading “Database on Dreamhost”

Add reCAPTCHA in MovableType 4.1

reCAPTCHA is better than MT native captcha image. reCAPTCHA is not only the a program that can tell whether its user is a human or a computer, but also let users help to recognize the scanned document. More details about the theory of reCAPTCHA.
MovableType 4.1 has an native CAPTCHA tool. It also has an extra plugin of reCAPTCHA.
Let me show you how to install and enable it.
1) Register an account at reCAPTCHA.
2) Add domain, all sub-domain will works under it.
3) Get public key and private key.
4) Copy the reCaptcha folder from /your MT folder/extras/examples/plugins/ to /your MT folder/plugins/ directory
5) Choose reCaptcha as the blog’s captcha provider
Blog name > preferences > blog settings > comment
6) Save public key and private key into settings.
Blog name > preferences > plugins
7) Edit Comment Form template, so it renders MTCaptchaFields unconditionally. In practice, this means replacing these lines

 <MTIfNonEmpty tag="MTCaptchaFields">
 <MTIfCommentsAccepted><MTIfRegistrationAllowed><MTElse><$MTCaptchaFields$></MTIfRegistrationAllowed></MTIfCommentsAccepted>
 <div id="comments-open-captcha">
 </div>
 </MTIfNonEmpty>

to these lines:

<MTIfNonEmpty tag="MTCaptchaFields">
 <div id="comments-open-captcha">
 <$MTCaptchaFields$>
 </div>
 </MTIfNonEmpty>

8) Edit Javascipt index template, to remove these lines of code which calls delayShowCaptcha:

<MTIfNonEmpty tag="MTCaptchaFields">
 captcha_timer = setInterval('delayShowCaptcha()', 1000);
 </MTIfNonEmpty>

9) Rebuild index and individual entry archive and page archive.

MovableType three distributions

Six Apart own the one of the most popular Blog software, Movable Type.
The latest version is 4.1, which released on Jan 24, 2008
Now MovableType has three distributions under different license.
1) MTOS (Movable Type Open Source) is a distribution of MT available under the GPL (v2).
It is Open Source license. Free to download, use, and modify. The restriction is keep Open Source, if you want to re-distribute it.
2) Movable Type for Personal Use is a distribution of Movable Type that is 100% identical to MTOS from a code perspective, however it is only available under a proprietary (closed source) license.
This is a free version for personal use. I also use this distribution.
3) Movable Type for Commercial Use is a distribution of Movable Type that includes the commercially-licensed equivalent of the core open source product and includes the Movable Type Professional Pack that contains features exclusive to our paid customers.
The advantage is the Professional Pack. The features are not included into the MTOS and personal license.

Continue reading “MovableType three distributions”

  • Archives