collisionbend.com

Writings, issues and observations from Cleveland, Ohio by Will Kessel

I thought about reposting my old posts into my database along the parameters of my last post last night — a lot. As you read this post, please keep in mind that I was away from my computer whilst cogitating a solution.

I started out by thinking that the simplest method of doing this would be to create an extra field in the database that would hold the original post date, then write a PHP script that would reflect that date rather than the actual post date for that entry. Eventually, therefore, I could just overwrite the post date column when everything was set proper, delete the new column and be done with it.

Then I thought about publishing it as a WordPress hack. Then you’d need an install file that would save the old scripts and replace them with the new scripts that you’d use while reposting the old posts; which begat the need for an uninstall file because when you eventually upgraded WordPress, because WordPress might choke on the upgrade because the database was different than what it was expecting…

I even went so far as to take a sheet of paper and a pen to write the pseudocode for the hack for the better part of an hour.

Eh! Too much to do, to much to worry about, and not an elegant solution for installing what I saw as adding 4 to 8 lines of MySQL statements to the existing scripts. Beyond that, all of that jacking around with the database might have unpredictable — even potentially distastrous — results. It was great thinking about it, though: a thoroughly wonderful mental exercise; I know that I could do it if needs be.

But needs don’t be.

All I really need to do is edit the timestamp. This function is already built into the WordPress “Write” page; I don’t need to do a thing but copy-paste the posts and then change the stamp. This lets me repost the old writings at my own pace — without a disturbance to you, Dear Constant Reader — which is what I was looking for in the first place.

No jumping through hoops.

No writing useless code all night and drinking an overabundance of coffee. (But I love coffee!)

No pulling my hair out — if I could grip it in the first place.

No getting hinky with the database.

No zizzing and dripping like with the tropical fishes.

All that worry for nothing; the answer was right under my nose the whole time. Not that I feel like a fool; not at all: when all else fails, read the owner’s manual. Problem solved.

So it goes.

One Response to “Reading the Owner’s Manual”

  1. Jeff Hess Says:

    Shalom Will,

    Welcome back. I emailed my webgoddess this morning to tell her to read your posts as a cautionary tale. We’re moving

Subscribe to RSS