Chapter 4. stripShow Comics

Table of Contents

Comic Files
Date-based comic filenames
Custom comic files
Thumbnail files
Adding Comics
The Traditional Method
The Add Comics Page
Comic Metadata

Just like any other WordPress blog, a stripShow archive is made up of posts. These posts are the same as other posts, integrated into the WordPress database. They are just like your blog, the only difference being that they are in a category assigned to comics (or, in multiple-category mode, they are not in a category assigned to blog posts).

Comic Files

stripShow comic posts differ from other blog posts in another way; each comic post needs to be accompanied by a comic file. Usually a graphic, this file is one actual comic strip[1] itself.

However, they don't have to be graphical. A "comic file" in stripShow can be a graphic, or text, or animated Flash video[2]. stripShow supports the following file formats:

  • GIF (.gif)

  • JPEG (.jpg or .jpeg)

  • PNG (.png)

  • Flash (.swf)

  • HTML (.html or .htm)

  • Text (.txt)

These files are stored in the comics directory, as specified on the stripShow Options page.

More than one file can be related to any given comic post. File types can be mixed, so you can have a GIF file followed by an HTML file, followed by a PNG, for example. Image files are enclosed in an <img> tag. HTML and text files are simply copied verbatim.[3]

[Note] Note
Although WordPress contains a built-in system for managing media such as image files, and inserting these files into blog posts, comic files are not manipulated in this way. They remain separate from blog posts.

There are two kinds of files that stripShow will look for: Files with date-based filenames, and files with custom filenames specified by the post itself.

Date-based comic filenames

If the comic post has no comic_file custom field attached, then stripShow looks in the comics directory (as set in Options) for any files that match the specified date format (also set in Options). For example, if the date format is "Ymd," stripShow will find files that begin with dates in that format. The following are all filenames that this format will match:

  • 20080828.gif

  • 20080828a.png

  • 20080101-arbitrary-text.jpg

As you can see, you can append whatever you want to the filename, as long as you retain the extension and the filename begins with a date. If more than one file exists for a given date, then that extra information is used to determine in what order the files should be displayed -- 20080901a.gif comes before 20080901b.gif, for example.

If no files exist that bear the desired date, stripShow will "step backward" one day at a time until it finds one. For example, if the comic's date is September 1, 2008, and stripShow cannot find a file whose name begins with "20080901", but there is a file called 20080831.gif, stripShow will display that file. However, stripShow will only step back ten years, to prevent it from getting into an infinite loop. [4]

Custom comic files

Date-based comic filenames are something of a webcomics tradition, but they have their limitations. What if you want to post two different comics on the same day, for instance?

Beginning with version 2.0, stripShow can take advantage of WordPress's capability to store custom metadata in each post. If you add a custom field called comic_file to a comic post, stripShow will display the file specified rather than a date-based file. Multiple custom fields (all with the same key, comic_file) can be used, so multiple files can be associated with the same date.

[Caution] Caution

Just like date-based comic files, custom files are also displayed in alphabetical order, no matter in what order they're entered into WordPress.

All posts created using stripShow's Add Comic page have a custom_comic field added automatically.

Thumbnail files

stripShow has the ability to automatically scale down comic files for presentation on archive pages. The way it scales these files is governed by settings on the stripShow Options page.

However, you may wish to have a custom thumbnail image that is not just a smaller version of the whole comic -- a single panel, for instance. To use a custom thumbnail, you should create a folder called thumbnails in your comics folder. If stripShow is trying to thumbnailize a particular comic file, it will search in this folder for a file with the same name, and use that file if found.

For example, if your comics directory is wp-content/comics/ and the comic file is 2009-10-05.gif, stripShow will see whether wp-content/comics/thumbnails/2009-10-05.gif exists, and use that file if it does.

At present, there is no way to automatically upload thumbnail files. They will have to be uploaded by hand.



[1] "Strip" is such a passé term, don't you think? This is the internet; comics can be long strips, square blocks, random zigzags... we're working on spheres. So I won't use the word "strip" to mean a comic... uh, except of course for the name of the product. Damn.

[2] Flash support is pretty rudimentary in stripShow; I'm looking into ways to make it more flexible. If you need a particular feature, please let me know.

[3] PHP in these files is not parsed, for security reasons.

[4] Even this ten-year restriction can greatly decrease performance on some webservers. For best results, ensure that all of your comic posts have at least one comic file associated with them.