I’ve been looking into using some PHP on this blog in order to reduce rebuild times. My sidebar, which is included on each page using Movable Type’s @MTIncludes@ tag is used to collate information from a variety of sources (although currently just my bloglines blogroll). Due to the way MT handles templates, this sidebar is being rebuilt for each and every page – so in the case of my blogroll, thats one request to bloglines per entry, category page, date archive etc. @MTIncludes@ can be used to include static files rather than other Movable Type modules, so my initial thought was to change my sidebar from a module template to an Index Template so it only gets rebuilt once. The problem with this is that @MTIncludes@ performs a static import – that is to say it imports the content when the page doing the including is built, but won’t pick up any changes to the included file afterwards. This is an even bigger problem when you consider how Movable Type rebuilds files – the index templates are the last to get done, so at best the individual entries will have an out of date include, and at worst might not find the file to be included at all.
Continue reading…
I’m using the “MTOutliner(MTOutliner Plugin for Movable Type)”:http://www.cxliv.org/jayseae/movable_type/outliner/ plugin to extract some of my “bloglines”:http://www.bloglines.com/ subscriptions in order to create my blogroll. MTOutliner is capable of loading and parsing an OPML file, and actually provides a special tag to load the OPML file from a named bloglines user:
Today however this seemed to fail – no information was being returned (and no error was generated by the plugin either). I tried referencing the OPML file directly, which seemed to fix the issue:
Which fixed it. I can only theorise that bloglines changed where the OPML files were located. Anyway, everything’s working now.
Over at Daring Fireball John Gruber has taken the notion of user specific settings and has “created a preferences page”:http://daringfireball.net/2004/04/preferences for his site. John isn’t using the standard style-switcher approach as outlined in Daniel Ludwin’s “A Backward Compatible Style Switcher” for “A List Apart”:http://www.alistapart.com/, and has instead opted for a an on-the-fly generated style-sheet, but the end result is the same. Daring Fireball allows the user to not only change the font size, but also to toggle the visibility of referrers. “Simple Bits”:http://www.simplebits.com/ uses an approach similar to Daniel Ludwin’s to change the colour scheme of the site, this time using three simple toolbar icons.
I have often worried about all the things I could do with this site, but have wanted to avoid visual bloat. It’s for this reason that I’ve avoiding putting ‘edit’ links next to my posts as a convenience for myself, and why the ‘Related Entries’ only get displayed on the individual entry pages. Now I’ve seen Daring Fireball’s admittedly simple options in action it has inspired me to have a play around with user specific preferences – expect a user configurable magpiebrain soon.
As part of my ongoing efforts to streamline this site, I recently added the ability to link to specific comments. I detailed this process in an “earlier post”:http://www.magpiebrain.com/archives/000222.html (which lets hope gets automatically linked to using RelatedEntries), whereupon “Cheah(Redemption In a Blog)”:http://blog.codefront.net/ “pointed out(Comment on Comment Permalinks with MovableType)”:http://www.magpiebrain.com/archives/000222.html#comment422 that my use of anchors (via the “name (Links in HTML Documents – name attribute)”:http://www.w3.org/TR/html4/struct/links.html#adef-name-A attribute) was not as meaningful as linking to a semantic construct. I did some reading around the subject, notably Tantek’s “Anorexic Anchors”:http://www.tantek.com/log/2002/11.html#L20021128t1352, and the W3C’s “specification”:http://www.w3.org/TR/html4/struct/links.html#anchors-with-id.
I was using a standard @@ tag to create an anchor within a page – for example on a page @post.html@, a @@ tag allows the page to be loaded and to have the page automatically scroll to the location of the link when the link to @post.html#comment@ is clicked on. Allowing specific areas of a page to be directly linked to can be very powerful – I have used this in other areas, for example I have dropped the use of the MT standard comment listing template in favour of a single page containing the post itself and the comments, with an anchor linking to the comment region. The thrust of Cheah’s comment and Tantek’s post was that using an @
As this blog has attracted more and more visitors each month, the number of comments I’ve been receiving has also been on the increase. Every now and then one of my threads generates some extremely interesting feedback, and it was starting to get annoying that I couldn’t reference these comments directly. What I really wanted was the ability to link directly to a comment.
A quick look through the Movable Type documentation, and I found details for the @MTCommentID@ tag. Simply put when placed inside an @MTComments@ tag (or in my case “@MTSimpleComments@(Plugin which will print comments and trackbacks in the same listing.)”:http://mt-plugins.org/archives/entry/simplecomments.php) it will print the ID for a comment. It is then a simple matter to create an HTML anchor for that specific comment like so:
" />
In of itself this isn’t terribly useful – I need to look at the source of the page to get the anchor name, and then have to create the link by hand. So I’ve also added a comment permalink, using the following code – again within the @MTComments@ tag:
#" title="Permalink to this comment">Permalink
So, when I next get an interesting post, I can link right to it, and so can anyone else.
_Updated_: I posted more on this subject in “Comment Permalinks revisited”:http://www.magpiebrain.com/archives/000223.html.
“Rocketinfo(Rocketinfo – A Free Personal Web-based RSS News Reader)”:http://demo.rocketinfo.com/desktop/ is a very nice looking online aggregator in a similar vein to “Bloglines”:http://www.bloglines.com/. It certainly looks very polished, but does lack a few features which preclude me from considering it over bloglines:
* No ability to import/export OPML files (this site’s blogroll comes from my bloglines account)
* No desktop notifier
* Cannot save items for later
* No email notification
Brad Choate has announced the latest version of “MT Textile”:http://www.bradchoate.com/mt-plugins/textile, which I use on this site for formatting my posts. The new version includes all kinds of new features, the support for footnotes and creation of search strings for Amazon, imdb and Google being of special interest to me.
I’ll be upgrading to this latest version when I finally get round to upgrading my MT install – but you lot don’t care as I don’t allow Textile formatting for comments 🙂
Those of you amongst the (very) small band of commenters to my blog may of noticed that the comment form wasn’t the nicest around. Most of this was due to the complexities of committing myself to a purely CSS based layout, but it was also due at least in part to me being very lazy. Anyway another excellet article by “Simon Willison(Sitepoint – Simple Tricks for More Usable Forms by Simon Willison)”:http://www.sitepoint.com/article/1273 has encouraged me to clean the comment forms up a bit. The CSS is simpler and the forms look a little better. Feel free to post any comments on the new layout.
I have also decided to put off the upgrade to “MovableType 2.661”:http://www.movabletype.org/news/2004_01.shtml#000882 until Jay Allen has released his next update to “MT Blacklist(MT Blacklist – A Movable Type plugin to eradicate
comment and trackback spam)”:http://www.jayallen.org/projects/mt-blacklist/ – I’d rather upgrade both at once. MT 2.661 includes some spam fighting features – as well as restricting the number of posts that can be made in a certain amount of time, it also uses a redirect link for in comment links, so defeating those spammers who are attempting to increase their Google page rank. Due to the way MT Blacklist works it actually circumvents the comment throttling, but Jay is busy “working on a fix”:http://www.jayallen.org/comment_spam/2004/01/beta_testers_needed.
I have also been toying with the idea of a site redesign again, perhaps this time using colours other than black and white. Part of me thinks that this might be a step too far.
Thanks to my move from online aggregator blo.gs to “Bloglines”:http://www.bloglines.com/ I’ve added a blogroll, giving a sample of my daily reading. Not everything is there, but I’ve cherry picked the most interesting stuff. Bloglines is a similar service to blo.gs – in that it provides an online aggregation service. The difference is that it records which posts you have read (and keeps them synchronized from site to site) and that you actually read the posts within bloglines itself much as you would with a standard desktop aggregator.
del.icio.us seems to be to bookmarks what “blo.gs”:http://blo.gs/ is to blogs. del.icio.us provides an online bookmark manager, which provides simple bookmarklets to add and view your bookmarks, and even allows categorization. Your bookmarks are public, and can even be retrieved via RSS making integration into websites fairly easy – those of you using MovableType for example could use the “RSS feed(MT Plugin Directory – RSS Feed)”:http://mt-plugins.org/archives/entry/rss_feed.php plugin to integrate the RSS as a sidebar. My only minor complaint is that unlike blo.gs is doesn’t seem to have a proper mozilla sidebar setup for it – I might look at creating an XSLT file to style the RSS…