There have been a lot of changes here recently, most of them on the back-end. Most of this work was related to having a bilingual (English and Urdu) blog along with MathML equations. This required valid XHTML 1.1 and serving the site as
application/xhtml+xml as described before.
One strange artifact of a good CSS/XHTML design is that something doesn’t show up correctly in Microsoft Internet Explorer. I got two problems.
- One was the lack of the
lang()pseudo-class selector in MSIE. Therefore, I had to style Urdu text using a class for MSIE.
- Another bizarre effect was that the calendar on the right sidebar overflowed in MSIE. I have fixed that if you are using medium or smaller fonts.
I also changed the Reading list and movie list archive pages so that they show an excerpt from my review on the main blog instead of just showing the book or movie titles. I used the multiblog plugin for the purpose. I found two issues with the plugin:
- I couldn’t use MT tags as the entry ID argument in multiblog to specify which entry should be shown from my main blog. That was fixed with a couple of lines of code.
- Multiblog has a bug where it displays entries from the other blog regardless of whether they are draft or published. I didn’t know how to fix that in the plugin code, so I am using
<MTIfEqual>from the Compare plugin along with the
<MTEntryStatus>tag to filter out the unpublished entries.
My category pages were becoming huge. The photography archive was more than 1MB in size while a couple of other categories were more than 500KB. So instead of showing the whole entry text in the category archives, I am now showing only an excerpt.
I also wanted to change the category and monthly archives to dynamic. However, in Movable Type’s implementation, most of the plugins would not work and that was unacceptable. So they are going to stay static.
lib/MT/Entry.pm so that I could send trackbacks to my own entries. This way, when I write a new entry about something that I have written about before, I won’t have to update the old entry with a link to the new one. Instead that would happen with the trackback.
Like a lot of recent changes, I got the weather forecast from Jacques Distler. I am showing the current weather and the 2-day forecast for Atlanta from the National Weather Service on the sidebar on the main page.
To enhance the reader experience, I have added small logos to posts containing Urdu or MathML. Clicking on these logos will open a window telling you how you can view MathML or Urdu content nicely. I stole this idea (and the MathML logo) from Jacques Distler.
I have also added instructions about how to comment in Urdu, write Math in the comments, or PGP sign your comment.
I am trying to increase the Urdu content and interface of the blog to make it truly bilingual. As a first step, the date headers and category names are bilingual. I had to add the month and week names in Urdu to
lib/MT/Util.pm. For the categories, I am using the category description as the field for the Urdu version of the category title.
Along with the list of the number of entries, comments and pings, I added a counter showing how long this blog has been up in the blog statistics section on the right sidebar on the main page using the Countdown and MTSQL plugins.
As for valid XHTML, everything in the zackvision.com domain is XHTML 1.1 + MathML 2.0 valid and served as
application/xhtml+xml. This includes cgi pages, which broke Typekey. Validating individual archive pages with the comments and trackbacks wasn’t as difficult as I thought it would be because I am using the textile plugin. Ampersands were the main problem in trackbacks.
Another issue with trackbacks is that Unicode Urdu (or Farsi) text in the trackback excerpt seems to generate invalid characters because the character count doesn’t work as expected. I don’t think it is a MT problem as it happened with trackbacks from WordPress as well as Typepad.
The only exception to the valid pages are the popup photos. The default uploaded image popup template is horribly invalid. I have managed to write my own template to fix that, but changing the code for all the photos I have put on the blog for more than 2 years is not that easy.
Another place that doesn’t generate valid XHTML 1.1 is the
<MTCommentFields> code in
lib/MT/Template/Context.pm, which I have modified as well.
Serving my pages as
application/xhtml+xml had broken the Google ads on my individual entry pages. They work now thanks to Keystone Websites.
First, the MIME type broke the Typekey commenting because of the use of
document.write in the commenting part of the individual entry archive. I fixed it with PHP-Typekey. But serving
application/xhtml+xml broke it badly. So I have removed Typekey since almost no one uses it.
application/xhtml+xml requires the served page to be valid or it breaks badly showing an error message instead of the page, I am now requiring comments to be valid XHTML. I have installed MTValidate for the purpose. The plugin wasn’t able to find sgml-lib until I changed its path in the config file to an absolute path instead of a relative one, but it works beautifully now. Since MT-Textile 2 filter is the default for comments, most comments should validate easily.
The next step was to force commenters to preview the comment first (and after any changes.) I am doing that with MTHash. An added benefit of this plugin is that it should stop bot-submitted comment spam.
Another counter-measure for spam is Jacques’s version of MT-DSBL which blocks comments and trackbacks from open proxies. This should be especially useful against trackback spam which is a general weak point in the fight against spam.
I have also installed the Real Comment Throttle plugin and set
mt.cfg as a defense against crap-flooding of comments and trackbacks.
The nofollow plugin seemed useful when it was released. I installed it at first but removed it when I realized that all comment links were getting
rel="nofollow", even including comments by me.
Another enhancement to the commenting system is the OpenPGPComment plugin. Installing the Perl module Crypt::OpenPGP required for this plugin was a big hassle. CPAN shell with the
LIB variable to
mt/extlib did not work. Actually I couldn’t install it at all with the CPAN shell. So I downloaded all the required modules and installed them manually. During this process, I found out that Crypt::Random was throwing up errors. The patch in this bug thread fixed the problem and the rest was easy.
So how can you sign your comment? Here are some instructions. I use GPGshell with a back-end of GnuPG. I have set the options to word wrap off and UTF-8 character set. With GPGshell, I can clear-sign current window contents (like the comment textarea) as well as clipboard contents. However, GPGshell has Unicode issues, so you can’t clear-sign Urdu text.
A final enhancement is the ability to write itex (a dialect of LaTeX) code in comments. This allows you to write all sort of equations to explain your argument better. 🙂 This was made possible by the extensive work done by Jacques Distler to let every commenter switch the comment text filter.