display images conditionally
On my category archive pages, you'll notice that some posts have little icons next to them. These icons indicate whether the blog entry has been commented on, if it has more than 10 comments, if anybody has pinged it with trackback, and if I pinged another blog while posting that entry.
This is all done using the Compare plugin. The Compare plugin allows you to use MT to compare the values of two things and print something if the comparison is true. In this case, I'm checking to see if the values of <$MTEntryCommentCount$>, <$MTEntryTrackbackCount$>, and <MTPingedURLCount$> (a tag from the PingedURLs plugin) are greater than zero and, if so, displaying code for an image. I'm also checking MTEntryCommentCount to see if it's greater than 10 to display a different image.
This is but one of many uses for the Compare plugin, some of which I'll discuss later. It adds a great deal of flexibility to your blog.
Subscribe to this blog's feed