A Strange Object of Nostalgia

In the mid-1990s, I spent some time temping as a legal document coder. Those were the days when it was so expensive to scan and OCR documents that it was cheaper to hire armies of temps to read documents and type the names in those documents into a database optimized for searching names. One of the first such databases I learned how to use was the DOS version of Inmagic.

A number of libraries use Inmagic. When the product evolved into the Windows world, the manufacturers made the DOS version available for free, so that libraries with small or zero software budgets could use it.

I have a project where I thought it would be useful to get a quick idea of word frequencies in a text, including names. (More on this project shortly.) I wondered if the Inmagic freeware was still available. It is – click here. Kudos and thanks to its current owners, Lucidea.

It’s surprising how this interface takes me back to that time.

The Bridges of Hennepin County

Much of the work I do for ADV Document Systems is for private companies and therefore not something I can share, but here’s an exception: Electronic Document Information GUI Search (eDIGS), a website that gives access to maps, permits and other public records at the Minnesota Department of Transportation. It is the successor to a site that was in place for many, many years, but which was not easily viewable on tablets or phones, and also a bit hard to support because it required users to have Java installed.

Continue reading The Bridges of Hennepin County

Shortcode for phpinfo

It’s been quite a while since I posted anything on the IT side. Today I’ve been doing some troubleshooting, trying to figure out why I can get the latest version of WordPress installed on a development site but not on the live site. One useful bit of information is, what version of PHP is the site running? There are slightly involved ways to find out, but here was a bit of code I simply had to add to the functions.php file for my theme, then put the [phpinfo] shortcode on a page, display the page, and voilá, all the info I could ever need.

Adding a picture caption in WordPress

For a bit of variety…

Spelling out this process step-by-step both to note it down for myself and in case anyone else out there could use this level of detail.

On this blog, I’m using the Twentyfifteen theme. I’ve installed the Jetpack plugin, which includes the template for the Portfolio.

This is how my portfolio projects looked at the start.

Portfolio image - no caption

I wanted to show the actor’s name and some information about the production. In the WordPress dashboard, I went to Media, clicked on the image, and filled in the Caption field:

Filling in the Caption

Adding the caption is not enough to cause it to display. I had to change the way the WordPress theme was displaying the post. The safe way to make changes to a WordPress theme is to create a child theme for it.

I use FileZilla to manage the files on this site. In FileZilla, I went to the wp-content/themes folder and created a folder for my child theme:

Child Theme Folder

I created two files to put in that folder, functions.php and style.css. These files allow me to change the way the parent theme behaves. Here is functions.php. The “add_action” section at the top is necessary in order to get WordPress to use the styles and scripts in my child theme in preference to those in its parent theme. The highlighted section contains the instructions for formatting the photo and the caption.

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
function twentyfifteen_post_thumbnail() {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {

	if ( is_singular() ) :

	<div class="post-thumbnail">
		<?php the_post_thumbnail(); ?>
		<div class="thumbnail-caption"><?php $caption = get_post(get_post_thumbnail_id())->post_excerpt; echo $caption;?>
 		</div><!-- .post-thumbnail -->
	<?php else : ?>
	<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
			the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
	<?php endif; // End is_singular()

Here is style.css, where I define how I want the “thumbnail-caption” class to look:

.thumbnail-caption {
	font-size: smaller;
	text-align: center;
	font-style: italic;
	padding-left: 10em;
	padding-right: 10em;

I uploaded functions.php and style.css into my child theme folder. Then, back in the WordPress dashboard, I went to Appearance|Themes. My child theme appeared there. I hovered over it and clicked “Activate.” Now the caption appears on the portfolio project page.

Portfolio image with caption