Press "Enter" to skip to content

Blog: How My Blog Works

[My blog coming out of a top hat]To satisfy Neil‘s curiosity, here’s how my blog works…

Basically, it runs on the Movable Type blog content management system (which uses MySQL and Perl) on a Debian Linux server running the Apache web server. The web pages it outputs are made into PHP files (using Apache’s mod_mime extension with .htaccess functionality to force the .html extension files to be interpreted as PHP).

I’ve used PHP to help split the site down into several extra “template” files – therefore if I want to make a change to the title bar of the site or to the column which runs down the side – then I just change the appropriate template file, “rebuild” it and the entire site is dynamically re-updated.

That’s the basics: now onto the more complicated stuff…

If you want to replicate the trick I used with mod_mime, then set your .htaccess file to read:

<Files “*.html”>
ForceType application/x-httpd-php
</Files>

Movable Type Plugins Used

This is the list of Plugins I currently use on my blog:

MTMacro

I use Brad Choate’s MTMacro Movable Type plug-in to mainly provide the “smiley/smily faces”.

In Brad’s words: “Sometimes it’s nice to get a lot for a little. Macros let you do that. Instead of typing laborious HTML as you write your entries, a macro can do all the work for you so you can concentrate on writing. Perhaps you want to use a set of icons within your posts but don’t care to write <img> tags all day long”

Basically, I’ve installed the module and downloaded a few smiley graphics from Resource-Zone. I’ve then set up a Movable Type “Template Module” called “MacroDefine” which contains:

<MTMacroDefine name=”smile” string=”:)”>
<img src=”/photos/smile.gif” height=”15″ width=”15″ alt=”:)” />
</MTMacroDefine>
<MTMacroDefine name=”wink” string=”;)”>
<img src=”/photos/wink.gif” height=”15″ width=”15″ alt=”;)” />
</MTMacroDefine>
<MTMacroDefine name=”frown” string=”:(”>
<img src=”/photos/frown.gif” width=”15″ height=”15″ alt=”:(” />
</MTMacroDefine>

This means that every time I type :), I get a nice little smiley face 🙂 .

I then just have

<$MTInclude module=”MacroDefine”$>
<MTMacroApply>

in the <head> section of each main template and </MTMacroApply> near the bottom.

Therefore, if I want to add or remove any Macros, I only have to modify one file, rebuild the site, and everything has been updated.

MTMacro

I also have Brad’s MTSanitize plugin installed which helps sanitizer/clean-up any HTML in the comments. Ok, at the moment I’ve got “Should visitors be able to include HTML in their comments?/Allow HTML in comments?” unchecked (i.e. set to ‘no’ status), but it’s there as an extra safety precaution.

Validable

Sebastian Delmont’s Validable plugin is also installed at this moment of time, but I haven’t had the wherewithal to configure my templates to use it. Perhaps soon…

Javascript Extras

overLIB

In the past few days, I’ve installed and started to play with overLIB. It’s a “a JavaScript library created to enhance websites with small popup information boxes (tooltips) to help visitors around your website. It will provide the user with information about what will happen before they click on a link as well as navigational help”.

At the moment, I’m just using it as a sort of “acronym expander” in conjunction with MTMacro. After installing overLIB, I added the following definitions into the previously mentioned ‘MacroDefine’ template:

<MTMacroDefine name=”GESF” string=”GESF”>
<span onmouseover=”return overlib(‘My Green-Eyed Southern Friend – a female friend of mine that has green eyes and lives down south’);” onmouseout=”return nd();” class=”tooltip”>GESF</span>
</MTMacroDefine>
<MTMacroDefine name=”ODP” string=”ODP”>
<span onmouseover=”return overlib(‘Open Directory Project – also known as Dmoz.org’);” onmouseout=”return nd();” class=”tooltip”>ODP</span>
</MTMacroDefine>

This means that whenever I type GESF or ODP and someone points at those words (try it!) a little explanation pop-ups in front of their very eyes.

Other Extras

MT-RefSearch

Of course, I’m also running MT-RefSearch (which I basically re-wrote after Eliot wrote the inital code and had the idea).

When someone comes to your blog via any one of over 240 search engines, then MT-RefSearch will search you blog and present a little box like:

Google (United Kingdom) Reference

I noticed you arrived here via Google (United Kingdom) looking for flibblepenguin.
To aid you on your search, here are the top results for your keywords:

If they happen to hit the direct page from the search engine, the visitor to your blog will also be presented with a “Highlight” option which will allow highlight the appropriate words on the page.

Blogrolling

And, finally, to continually update my list of “Blogs I read often” in the column, I use BlogRolling which grabs the recently updated XML feed from weblogs.com and blo.gs (both of which I “ping”) every 5 minutes, updates it’s database and then allows you to have a selection of Blogs showing up (the “Blog Roll”) and if they have been recently updated.

Other Useful sites

If you are thinking of starting your own blog, or want to make some changes to your current one – then you may find the following sites useful:

10 Comments

  1. Thanks

    You may find it easier to just use <acronym> tags for displaying acronyms; Mozilla (and probably IE) popup tooltips in this instance. Mozilla also puts a dotted underline underneath, but you can turn this off on your site by the usual way of CSS. And of course it works without using JavaScript, and makes your page more compliant with WCAG and Bobby.

  2. Unhappy about Smileys

    Well, beebware revealed his secrets, but unfortunately they didn’t work. After installing the MTMacro plug-in, I kept getting a rather nasty error whenever I tried

  3. Why not just modify the prefs of your MT blog to put .php filename suffixes on your files?

  4. i like the graphic for this post. clever.

  5. Changing .html to .php would break all the links.

  6. Realizations: MTInclude plus PHP instead of SSI

    Realizations as a result of implementing a direct SQL include instead of SSI for, in this case, rightcontent photos: I could have used an <$MTInclude file="photolog.txt" $> all along instead of including via SSI (verified). Difference…

  7. Woo, thanks for the examples of combining MTMacro and overLIB. I’d seen Kristine do it, and she told me which plugins to use, but your code samples actually got it working for me!

  8. Tooltips Implemented

    I originally got the idea from Kristine, when I figured out that I could do the same thing with my girlfriend that she does with her husband.

  9. Unhappy about Smileys

    Well, beebware revealed his secrets, but unfortunately they didn’t work.

  10. Mama Write's Sideblog Mama Write's Sideblog

    Macros

    Using the Macros plugin with an MT-powered blog… I think I understand how to set some of these macros up, though I’m not sure why I’d use them. About an hour ago, I had a good idea… of course, I’ve…

Comments are closed.