June 20th, 2004 §
I saw this movie, Terminal yesterday. Wonderful movie. I noticed that in a close up shot, Catherine Zeta-Jones’ face is shown in bad light, and the imperfections in her skin show up, but besides that, this is a movie that is different from the regular hit movie. A bit too oh-so-perfect what with all the arranged unbeleivable coincidences and all, but parts of it were truly hilarious.
Thanks to psasidhar I got to know of The history of Jazz in a picture. This is not the first time a close friend has blogged about something which is very much on my mind, as if on cue, but actually through a pure coincidence.photomatt likes Jazz, and that is among the reasons why Wordpress v1.2 is called “Mingus”. Ever wanted to see what the real Mingus looked like? There you go!
Now you must be wondering why I mention WordPress, and Terminal in the same post. Go see the movie! As it is, this post is enough of a spoiler.
June 19th, 2004 §
I had fun helping Jennifer fix a sinister problem with the entries she imported from Movable Type, yesterday. The backslashes were missing. I cannot describe what a backslash(a.k.a Reverse Solidus, or Reverse Virgule or Reverse Slant) looks like, cause I cannot type a backslash and have it appear in this post*. That is because WordPress runs on backslashes.
Yes, it has remained a closely guarded secret, and I will let it out. WordPress is powered by backslashes. WordPress eats backslashes.
An unsuspecting user left a comment on a WordPress FAQ entry, and he mailed me expressing desperation at the mysterious disappearance of the backslash from both the post and the comment.
Bob Bemer is the man to blame for the extra work the WordPress devs have been putting in lately, especially Ryan Boren (who has been systematically working towards eliminating this problem.)
To get to the point, Bob Bemer added the backslash to ASCII to be able to represent the logical symbols for logical AND and OR in ALGOL. An interesting read.
* Just kidding: WordPress users can represent a backslash in their posts using “& # 0 9 2 ;”(without the spaces or the quotes, thus : \
June 19th, 2004 §
While trying to use the Press It! bookmarklet with FireFox 0.9, I got the following error :
Deprecated method document.getSelection() called. Please use window.getSelection() instead.
So I fixed the bookmarklet to be :
...createRange().text:window.getSelection();}void(window.open('http://...
where it said
...createRange().text:document.getSelection();}void(window.open('http://...
(changed document.getSelection() to window.getSelection() )
To fix yours, if you are using FireFox 0.9, right click on you Press It bookmarklet in the BookMarks toolbar, click on “Properties” and edit the code as I did above in the “Location” field.
June 4th, 2004 §
Listing Templates for editing in WordPress is Charles’ attempt to increase the utility of WordPress’ template editor.
June 4th, 2004 §
I thought it would be neat to be able to import Bookmarks/Favorites/Whatever-the-browser-calls-it into a WordPress weblog, and so I wrote this script that does just that, with some help from another website. I started on this since a user (Grod) on #wordpress wanted an xbel importer.
XBEL(XML Bookmark Exchange Language), is one of the formats in which one can save bookmarks. Galeon uses the XBEL format to save bookmarks. The reason why I expect the script to be useful, though, is because LinkaGoGo offers a free service that converts bookmarks/favorites from most of the browsers’ format to an XBEL file. So, in short, using LinkaGoGo and the script I link to here, you can import your bookmarks into the WordPress link manager.
Thanks to Roberto Giungato, for making his script available. That saved me a lot of time.
Steps:
1. Convert your browser’s bookmarks/favorites to the xbel format using the LinkaGoGo Converter.
2. Upload the .xbel file that results to the wp-admin directory in your WordPress installation.
3. Download xbel.phps, rename it to xbel.php, read it, follow the instructions to edit one line in it to specify the name and location of the xbel file on your server, and then upload it to your wp-admin directory.
4. Access the import-xbel.php file you uploaded, using your browser (eg: http://example.com/wordpress/wp-admin/import-xbel.php)
The importer does not import duplicates, and creates new link categories corresposing to the “folder”s in the xbel file.
As always, if you use this, let me know how it turns out
May 14th, 2004 §
The Codex MT import Guide now contains detailed directions, with links.
Mena says It’s about time, and I can’t agree more. It’s about time Movable Type users moved to WordPress.
A lot of MT users might want to move to WordPress, but may have a lot of questions and doubts regarding the move, and about WordPress. I thought a short post with essential resources, tips and answers will come in handy to at least a few people, so here goes.
Downloading and Installing WordPress:
WordPress 1.2 “Mingus” is now ready, get it from The sourceforge download page.
Importing MT entries:
You can import all your MT entries into WordPress using the import-mt.php script that ships with WordPress, which can be found in the wp-admin folder.
Updates:
- MT exports the entries with the dates set wrong. The dates do not carry AM/PM or 24 hour information. There is a Fix for the date problem at the MT support forums.
- WordPress uses UTF-8 as the default encoding. So if your MT blog uses ISO 8859-1 or Latin – 1 to encode posts, convert the posts to UTF-8 before importing, to ensure that all characters display properly. Optionally you could also set an Option (Option -> Reading -> Character Encoding) in WordPress to set the Charset for the WP weblog to ISO 8859-1.
- The import-mt.php that ships with 1.2 had a couple of bugs, which I fixed. The new import-mt.php is available for use. Read the post at scriptygoddess. Use this to ensure the backslashes in your posts are treated properly, and the “——–” strings in your posts do not break anything.
The MT import tutorial is there if you need help, and be sure to read the notes at the end to see how you can refer visitors to your new WP powered blog from the old MT urls, and other such bits and pieces. 
Edit: If you are having trouble importing all the entries at once, getting timed out on the import etc, this thread has some pointers regarding how to work around it.
Modifying your template, stylesheets:
1. LaughingLizard’s Well commented index.php should be helpful in understanding the wordpress index.php file/template.
2. The template tags are explained at the template tags wiki page, and Gregory Auld has written a nice article comparing the MT and WP “template tags”, which should also be of help.
3. NuclearMoose’s Annotated default CSS and podz’ Graphical CSS are excellent guides to the default css stylesheet that ships with WordPress.
Growing wings:
A few very useful wordpress links:
1. The WordPress Wiki – I find myself here at the beginning of a search for a hack/plugin/technique all the time.
2. The Support Forums – search and you shall find 
3. AlexKing.org WP styles competition – for awesome ready-to-use stylesheets (…and how to use them).
4. WeblogToolsCollection.com – The blog with loads of tips and useful links.
A few answers:
Multiple blogs using WordPress:
From the trackbacks to Mena’s post above, it seems like a lot of people think it impossible to use WordPress to run multiple weblogs. It is possible to use wordpress to run multiple weblogs off of the same server, with just one MySQL database. I have 7 WP weblogs running on one server! All it takes is to install wordpress multiple times. Each blog would have a different MySQL table prefix. Installing a wordpress blog takes less than five minutes (I agree it could take longer to get the template and stylesheet modified), and so, it’s not only possible, but really easy to have more than one blog powered by wordpress on your server.
Rebuilds and pages:
WordPress does not have to rebuild any pages each time you update your blog. It uses PHP to dynamically create pages on the fly, and is real quick, too. (You can see how much time it took to create and display this page at the bottom of this page)
This also means that all you need to have is one template – index.php. The individual entry “pages”, the archives and everything else is created by WordPress depending on the parameters passed to the index.php file.
Keeping your MovableType links:Last Edited July 10th, 2004
You can redirect visitors to pages on your old Movable Type blog to the correct ones on your new WordPress blog using some readily available solutions. If you are only concerned about search engines, most of them will catch up with the changes in the URLs within a certain amount of time. The following solutions work for both kinds of urls, ones that use the ‘post_id’, like so — http://example.com/000121.html, and the ones that are ‘dirified’, like so — http://example.com/archives/2004/05/12/this_post . For some solutions for the former type, you may need to keep your MT installation around until the search engines are updated to reflect the changes in your blog. This is because of the fact that the MT export file does not provide the ‘post_id’ s for the posts. For dirified urls, there should be no problem.
Update: If your MT permalinks had the post ids in them, then with a little code-fu, you can get wordpress to use the same post ids as MT, and the detailed directions, complete with required changes is available at Dr. Bacchus’ Journal.
- Alex King’s MovableType template to redirect visitors
- Matt’s Solution.
- Idly.org’s solution
Licensing and other issues:
WordPress is distributed under the GPL, and will remain Free Software. Period.
Please leave a comment if you have any questions, or if you find a resource not listed here very useful in making the transition.
April 9th, 2004 §
This article should explain how to use the Feed on Feeds server-side RSS aggregator to create a page on a WordPress powered blog.
Update : Instructions in Spanish, thanks to Frank Pereiro, from Tenerif�, Spain. He also adds that it works so much to his satisfaction that he now uses this as his primary news reader. Many thanks to him!
First off, let me say that I love Feed on Feeds, and I wish to thank Steve Minutillo for making it available under the GPL.
This modified code is also made available under the same terms as the original Feed on Feeds code. I claim no rights to the original Feed on Feeds code. You are free to modify part or whole of the _modified_ code that I have included for your needs.
I started off with this with gat’s excellent tutorial for doing something similar. Thanks, gat
For example, I can read all the feeds I subscribe to at My subscriptions page using the setup I am about to describe.
Advantages:
1) Feed on Feeds (FoF) is a server-sider RSS aggregator, so you dont have to rely on other applications/ websites/ services to read a page with all your RSS feed updates.
2) FoF gives you updates in chronological order, unlike some RSS aggregators, where, if you are subscribed to say 2 xml feeds, you see all the entries from feed 1, then all the entries from feed2. With FoF you get the latest from feed 1, the latest from feed 2, — in short, you get the entries in the order that the websites were updated, latest first.
Here’s an overview of what needs to be done :
1)The required files need to be edited/uploaded.
2)The WordPress index.php file needs to be modified.
3) The .htaccess file needs to be modified to rewrite some urls.
Step 1.
a) Get the fofwp.zip file and unzip it.
b) edit the “config.php” that is in the “fof” folder.
c) edit the “init2.php” file that is the “fofwp” folder, that is, outside the “fof” folder (lines 3, 11 and 12 to be precise).
d)upload all the files to your server, if your wordpress files are in the /blog directory, the “init2.php” and the “view.php” files should be in the same directory The “fof” folder should also be in the same directory, so now the directory with wordpress installed in it now has an additional directory “fof” in it so that you now have a “/blog/fof” directory.
e) point your browser to /blog/fof/install.php and run through the installation.
Now FoF is hopefully installed and running fine. If you had any problems, the installation help at the FoF about page should be of help.
Also, please read the same page for more details about how to add/delete feeds, update them etc.
Step 2 : Modifying index.php
The portion of index.php that serves the entries is what needs to be modified. What we are trying to do is to have the index.php file display the subscriptions page when the parameter “subscriptions” is passed to it.
So find the line that says :
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
and just above this line, include the following piece of code :
<?php
$subscriptions = $_GET['subscriptions'];
if ($subscriptions == 1) { echo "My subscriptions:<br/>";
include('view.php');
}
else { ?>
then,
find the lines that say :
<p>Sorry, no posts matched your criteria.</p>
<?php } ?>
and add :
<?php } ?>
on the line immediately after.
–So, here, we did a “if subscriptions, serve the view.php; else serve the index.php as you normally do otherwise”.
Step 3 : Taking care of security.
You need to protect your “fof” folder on the webserver with a .htaccess and .htpasswd file setup.
I have included a “sample.htaccess” and “sample.htpasswd” file , but you need to create your own .htaccess and .htpasswd to protect this directory so only you can update/delete/modify the feeds etc. A lot of resources are available as to how to password protect a directory in Apache.
Once that is done, lets write some ReWrite rules for friendlier urls. I you don’t have the mod_reqrite module installed on the server, or don’t want to use it, then your subscriptions page can be accessed at “http://yourblog.com/index.php?subscriptions=1″
To add the rewrite rules, open the .htaccess file in your blog root directory and add the following lines to it :
RewriteRule ^subscriptions(.*) /index.php?subscriptions=1 [QSA]
RewriteRule ^view.php(.*) /index.php?m=000000 [QSA]
The first one makes “http://yourblog.com/subscriptions/” the url for your subscriptions page, and the second one prevents nosy people from accessing the view.php page directly, so you can be sure no one can mess around.
If you use the above instructions, and the code, please do let me know at mail @ carthik REMOVE THIS. net . I will be glad to hear from you.
I know this is no where near perfect, ’cause this is the first time I am attempting anything of this kind, so please tell me whatever you think about it, including suggestions for improving how it works/ feedback etc. Leave me comment on this post, or send me an email.