Comment goodies

Another package I’m working on is a set of files that will add all my comment functionality to a WordPress 1.22 installation. This includes the functionality developed by others–live preview (from Chris Davis) and spellchecking (incorporated from Cold Forged) — in addition to my own modifications, such as being able to edit a saved comment. I’m also adding the rich HTMLEdit functionality to the edit page for the saved comments.

I am unsure about some of the other functionality, though. For instance, I won’t be able to provide my individual moderated comments because this requires changes in the admin page. That kind of functionality you’ll get from Wordform when I’m finished with the pre-alpha-beta-newbie-baby 0.0001 release, by the end of this week, or beginning of next.

But I can provide my backend comment spam prevention that, first of all, renames the backend comment posting file to something new; it then checks to see if more than so many comments have been posted in the last hour, and last day (limits that can be modified to your own preferences). If so, throttles kick in and the comments are rejected. This will prevent the problems with “10,000 comments, all at once” problem that has plagued Movable Type so severely.

In addition, I have functionality that will test the age of the post, and if it’s over so many days old (again configurable), it will put the next comment into moderation, and then close the post.

With both of these controls in place, I have very little problem with spam. Well, other than the new breed of spammer that is now running mock weblogs, with hidden links to porn sites and making individual comments, just like a real weblogger.

Would this backend protection be of use, and should I add it to the package?

The comments package is for WordPress 1.22 — the new Floating Clouds theme for 1.3 will have some of this included, automatically. It should be easily configurable, drop in and play, though it will require replacing your existing wp-comments.php page.


Packaged goodies

Per long overdue requests from several people, I’ve finished up a WordPress 1.22 template featuring the ‘floating clouds’ design. Additionally, I created a separate package that just provides the files necessary to do the random background image. You can see the basic floating clouds design at the development site, at I’m not linking this directly, as I will be blowing this site away when finished all my development. You can copy the complete template, or just the background image portion.

To install the complete template, make a backup of your index.php and wp-comments.php file. Then download and unzip the gzip-tar file; no worries if you’re not into the Unix thing– Mac’s Stuffit and Winzip can handle the file format. Just make sure you save the file with Firefox, and not have the browser open it directly — this can be troublesome at times.

From the material I’ve provided, copy the files index.php and wp-comments.php, in addition to the ‘look’ subdirectory, to your main WordPress 1.22 directory. You’ll also want to copy the plugin file, recent-comments.php, to your WordPress plugin directory (it should be wp-content/plugins off the main WordPress installation).

Once the files are in place, go into your admin, and activate the plugin, “Get Recent Comments”. This provides the functionality for getting recent comments in the sidebar, which is not provided in WordPress 1.22.

(If you haven’t upgraded to 1.22, you should do this first — there are security fixes in 1.22 you’ll need.)

After that, open the main index.php file in your browser, and you should have a site that looks like the one mentioned earlier. You can then add items to the sidebar, remove items, and modify the colors and look as you want.

If you’re just interested in the background image functionality, access this file instead and again unzip it, either to your server or your local PC. The file contains several images, which I’ve provided just as test images until you get the background switcher going. After that, you can replace the images with your own. Just make sure to update the photos.txt file to reference your images, not the ones provided.

For each page you want to use the dynamic background, add a link to the clouds.php file, using the following, but changing it for your domain and URL:

<link rel=”stylesheet” media=”screen” href=”” type=”text/css” />

This link should follow any other stylesheet you’re using for your site. When you next access your site, you should start to see the dynamic imaging take effect. If not, check to make sure that the photos.txt and images are in place, and the image files are named correctly in the file.

If you want the image to appear somewhere other than the upper left corner, adjust the CSS in the clouds.php file to whatever you prefer — lower right, upper middle, whatever. Totally up to you.

I achieve the effect I do with my site by adding a vignette to a photograph, in addition to adding some transparency. When using Photoshop, this is achieved by using the Elliptical Marquee tool to create an oval selection on the photo, and then choosing Select and Feather to ’smudge’ the edges. I cut the image and create a new one, with the appropriate background color. I copy the cut image from the original photo, and then adjust the transparency of the pasted image.

However, you don’t have to have Photoshop for this. There are several free and shareware applications that will allow you to add vignetting and transparency to a photo.

Stay tuned for a 1.3 theme based on Floating Clouds. Note that this design will validate as transitional XHTML, as long as the text in the posts is valid.


Cat’s worst enemy

Cats are by nature, brave and fearless creatures. Dignified, too, with a formidable composure. A dog, on the other hand, may be loyal and loving and can learn nifty tricks, but they whine. Hard to have composure when you’re whining.

A dog will whine when you leave and whine when you get home; they whine for a goodie, and whine to go out. If you’re eating something that smells good, or if you’re eating something that doesn’t smell good, or if you’re eating something that has no smell at all — you could be gnawing the draperies–they sit at your feed and whine for a taste.

Not a cat, though. If a cat wants food, they’ll sit at their dish and Look at you. Even if you’re in another room, they’ll sit at their dish and Look at you. You could be out of the bloody country, and right in the middle of a meeting in Japan, when you’ll get this crawly sensation in the back of your neck — that’s your cat, Looking at you.

They’re asleep when you leave the house, and asleep when you get home — except if coming home means food, and then they’ll twirl about your legs, making a nuisance of themselves until you give in and take care of what should be your number one priority: feed the cat.

If a cat wants attention, they’ll either jump up on your lap, or, preferably, your computer keyboard. If you’re cooking, they’ll jump up on the counter; if you’re sewing, they’ll walk in front of the machine. And if you happen to be in bed reading a hard cover book, well, whatever you do, don’t lay on your side, book open on the bed.

If you’re asleep and they want you up, they’ll jump on your stomach. No, i take that back. They take a running start and then leap on your stomach, all four paws landing in the exact same spot. I don’t know about other cat owners, but if I’m asleep and my Zoe wants something, she presses her cold nose against my mouth and then gives me a good lick, right on the lips. If you’ve ever seen what cats do with that tongue of theirs, this isn’t the most pleasant way to wake.

Dogs aim to please, and if you’re unhappy with them, a mild reprimand is enough to send them into dejection until they’re forgiven. When they are forgiven, or when doing their favorite thing (tug-away with your favorite shoe, ride in car with window down, go for walk in woods and roll in dead things), they shake their butt more than a hot disco dancer, and jump about more than a four year old having to pee.

Not a cat, though. No, a cat manages to convey most of their emotional responses through one simple form of communication: the purr. And let me tell you, a purr is a devastating weapon, capable of reducing even the coldest of us to smooshy faced indulgence. When a cat turns on all its formidable charm–wide eyed kitten playfulness, followed by cuddle-some eyes half-closed purring–you melt into a puddle of acquiescent goo.

No, there’s only one thing that will crack the composure of a cat: static electricity. Yup, nothing worse for a cat than a cold, dry climate and a house full of synthetics.