MovableBlog: Better way to highlight most recently added?

Nuance 2.0

July 18, 2002

Is there a better way to highlight the most recently added entries in an alphabetically sorted (or any way other than by time) than what I cobbled together at this ungodly hour?

<?php $last_five = array(); <MTEntries lastn="5"> $last_five[] = <$MTEntryID$>; </MTEntries> ?>

<MTCategories>
<MTEntries sort_by="title" sort_order="ascend">

<?php
if (in_array(<$MTEntryID$>, $last_five))
{
?>
<b><$MTEntryBody$></b><br />
<?php
}
else
{ ?>
<$MTEntryBody$><br />
<?php
}
?>

</MTEntries>
</MTCategories>

For an example, see the sidebar here.

A plugin, with a tag like something like <MTIfMostRecent lastn="n"> etc., would be way preferable to using PHP (not that I don't like PHP!).

Posted by Richard at 2:07

Comments

but youz always gotta keep dem php skillz in practice, yo!

(why do I talk like that when I talk geek?)