Recent Comments and Trackbacks

For those who may be wondering, I have obtained the 'Recent Comments' and 'Recent Trackbacks' stuff in the sidebar of the homepage using the following template code.

encode_xml is used to guard against quotes, ampersands and the like. encode_ampersands is a plugin that does the same job for URLs, changing & into & in order that the page does not become invalid.

<div class="module-trackbacks module">
<h2 class="module-header">Trackbacks</h2>
<div class="module-content">
<p>Received Pings</p>
<ul class="module-list">
<MTPings lastn="5">
<li id="p<$MTPingID$>">
&raquo; <a href="<$MTPingURL encode_ampersands="1"$>"
title="<$MTPingExcerpt remove_html="1" strip_linefeeds="1"
encode_xml="1"$>"><$MTPingTitle encode_xml="1"$></a> from
<$MTPingBlogName encode_xml="1"$> (<$MTPingDate$>)</li>

<div class="module-comments module">
<h2 class="module-header">Recent Comments</h2>
<div class="module-content">
<ul class="module-list">
<MTComments lastn="5" sort_order="descend">
<li><a href="<MTCommentEntry><$MTEntryPermalink$>#c<$MTCommentID
pad="1"$></MTCommentEntry>" title="<MTCommentEntry><$MTCommentBody
strip_linefeeds="1" remove_html="1"
remove_html="1"$></MTCommentEntry></a> by <$MTCommentAuthorLink
(<$MTCommentDate language="en" format="%a, %d %b %H:%M"$> <$MTBlogTimezone no_colon="1"$>)</li>

With changes like the above, I've changed the MT3.2 default templates a little - but I have tried to keep changes to a minimum, and keep them using the same style tags as the default styles. This is so that I can use the new StyleCatcher with impunity.

Indeed, I have put all of my stylesheet changes into a seperate stylesheet, so, the theory goes, I should just be able to 'drop in' a new base style.

Famous last words.

That isn't quite true, I do have one thing at the top of every stylesheet, and I added this to the default style:

/* Stylesheet generated on <$MTDate format="%B %e, %Y %I:%M %p"$> */

/* This is a cheap hack for an old browser bug */
td.false {font-family: serif;}

The td.false thing is only needed for REALLY old browsers. It is there because when CSS started, one of the big browsers always ignored the first style definition. The 'generated' line is most useful as it lets me quickly see that I have the latest version when I look at the stylesheet in a browser. When changing a stylesheet;, the browser sometimes uses the old version, so it is necessary to load the stylesheet in the browser and hit 'reload' to be sure to use the most up to date one.