Categories
Technology

YAM—Yet Another Modification

One more modification. Since I do make updates to a weblog posting — to add new information, make corrections, whatever — I made these easier to spot.

First, I’m now highlighting the change, putting a box around it with a different color of background. In addition, I pulled my old MT tag-based recent entry list and replaced it with a PHP/MySql application that lists the ten most recently modified weblog postings, regardless of whether this modification is a new entry, or a modification to an older one.

This list, which is between the Recent Comments and the Recent Trackbacks, should help you keep up with all my fast fingered, quick typing, multi-faceted, many changeable weblog posting entries. It’s part of my strategy to bubble-up changes to the top.

Champagne development and caviar schemes.

Of course, I realize that I’m violating one of the sacred rules of weblogging: thou shalt not edit. Oh, but it’s so fun! I could use this list in addition to the traditional MT Recent Entries listing, but for now I’ll just stay with the recent modified list.

I’ll probably get back to non-tech posts in a bit. Right now, I’m having a little bit of fun playing around here, in this my toy box. However, I feel a Mark Twain post hovering near my mind.

Code: Change database, blog-id, user, and password, as well as your own archive location and archive file format. Do not change the status or you’ll end up with the draft posts as well as the published ones. Could be embarrassing.

 

<?php

$link = mysql_connect(“localhost”, “user“, “password“)
or die(“database errors”);
mysql_select_db (“database“);

$query = “SELECT entry_id, entry_title, entry_modified_on from mt_entry where entry_blog_id = 2 and entry_status = 2 ORDER BY entry_modified_on desc limit 10″;

$result = mysql_query($query) or die(“database errors”);

while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
$input = $line[0];
$input = str_pad($input, 6, “0”, STR_PAD_LEFT);
printf(“<a href=’http://weblog.burningbird.net/fires/%s.htm‘>%s</a><br />”,
$input, $line[1]);
}

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);
?>

Print Friendly, PDF & Email