Spring Additions

While out looking for cool hacks to add to my blog, I came across the girlie matters MT tricks page. I was struck by the entry counts next to the category and monthly archive links, and quickly guessed that the same code that lists the number of comments in an entry was responsible. I was right, and now have that feature on my site.

A bit later I ended up at the movable blog where I found some php code
for date archives that works pretty well. It highlights the current month if in a monthly (or in my case, due to shared templates, also daily) archive, and also makes it just plain text; not a link.

I implemented that feature on this site, and then added a similar thing to my category listings. Cool stuff; I like it!!

I can’t escape the code I modified well enough to post it here, so will try it as a comment. There’s one known bug; categories w/spaces fail.

1 thought on “Spring Additions”

  1. Here’s the category archive code, with a bug fix provided by the original author ( changed the original <$MTArchiveCategory$> to be
    <$MTArchiveTitle dirify=”1″$> )

    <MTArchiveList archive_type=”Category”>

    <?php
    if (!eregi(“<$MTArchiveTitle dirify=”1″$>”, $_SERVER[‘PHP_SELF’]))
    print “<a href=”<$MTArchiveLink$>”><$MTArchiveTitle$>
    (<$MTArchiveCount$>)</a>”;
    else print “<span class=”redback”><$MTArchiveTitle$>
    (<$MTArchiveCount$>)</span>”;
    ?>
    <br />
    </MTArchiveList>
    </p>

Comments are closed.