Tag archives for plugin

Saturday, December 23, 2006

Sticky posts without Adhesive?

Don't pay too much attention to this post. I'm testing out a template-based alternative to Owen Winkler's Adhesive plugin. This post is supposed to sit at the top of the homepage, and stay there. Since it's my current post, that's exactly what it's doing anyway. So the real test will be to see how it behaves when there are more recent posts.

So anyway, pay this post no mind, but be sure to check below for newer posts.

As long as it's sticky anyway, I might as well use it for something.

If you're visiting for the first time, or if you just missed it when it was new, you might want to check out that post where I talk about new sidebar functionality you might not have noticed.

Edit: Yup. Seems to work just ducky. Now as soon as I get around to it, I'll write up something about how to pull this off.

Thursday, November 2, 2006

WTF?

So I've got this super spiffy plugin Search Meter, right? Search Meter keeps totals of the queries people make using the built-in WordPress search feature. Results are tallied over a rolling thirty day period, so I don't have "all-time results," but I always know what people are looking for now.

The top search for the last thirty days? Chocolate cheese. What the hell? I totally don't understand how seemingly so many people can be interested in that. With 54 searches in the past month, there have been more searches for chocolate cheese than for the next four searches combined. (If you're curious, the next four are "none" with 19 [I really don't get that one], "grr" with 14, "debra" with 13, and "Radiohead" with 7 [fuckers].)

So what's up? Is this "the will of the people?" Are you trying to tell me to make this an all chococheese, all the time blog?

Tuesday, October 17, 2006

Yay, new stuff!

I like new stuff. New stuff is good.

  1. New WordPress plugin: Comment Instant Messenger Links. Registered users can now add their AIM and Yahoo! Messenger ids to their profile and those ids will be attached to their comments and will be visible to other registered users. The plugin is available for anyone to download. If you decide to use it on your own blog, I'd appreciate your feedback.

  2. New gravatar option. Have you noticed that gravatars have been unreliable lately? The servers at gravatar.com have been dreadfully slow. When retrieving images, it's not uncommon for the gravatar servers to time out, return an error or return a blank image. On this blog I use a caching system that alleviates that somewhat, but I'm not completely insulated from the problems at gravatar.com.

    If you'd like, you can specify a "local gravatar," which I suppose would be technically just an avatar. For registered users, there's a Gravatar tab in your profile. You can use that tab to specify an avatar that will be used only on this blog. The interface doesn't include an upload, so you must provide the url to the location of an existing image. Supported are GIF, JPG, and PNG. Transparency and animation are also supported. If you make use of this feature, please make your image 50×50.

  3. I was going to make use of this space to pimp a new renter. I opened for bids yesterday and was planning on choosing a new renter this morning. And now Blog Explosion is down. I can't access their site to accept a bid. Bitches.

    Blog Explosion finally came back up and I've now got a new renter.

Saturday, September 2, 2006

New feature, new pretty

I'm more or less constantly tweaking this blog. At least a couple of times a week I try something or other new. Most of the time my tweaks aren't really noteworthy. It's usually the kind of thing where if people notice, they notice. If they don't, oh well.

Today I've a tweak worth talking about.

But first, the pretty. I've added a spiffy drop shadow effect around user gravatars and a default grav for users without. The drop shadow uses a second image and is really nothing more than a CSS trick. Because it's not a plugin and doesn't require PHP, this particular effect will work on any blog (although it would be of limited usefulness on something like Blogger, where styled comments don't have gravatars).

Is anyone interested in seeing the CSS I've used to create this effect? (Somebody say yes. You know I'm going to talk about it soon anyway.)

Second, the new feature. All users now have the ability to edit their own comments within five minutes of submitting them. This feature will work for any user, and will even work if you close and reopen your browser.

So if ever you find yourself reviewing a comment you've just posted and you find a misspelling or whatnot that you'd like to fix, look for the new Edit link in your comment's byline.

To make this new feature a little easier to use, I've also adjusted the comment post redirect. Previously, posting a comment would reload the page with your comment a part of it, leaving you at the top of the page. Now it works a little different. Posting a comment will reload the page and take you to the comment you've just left so you can review it if you choose.

I'd like to ask you all to be my guinea pigs with this. I always have the ability to edit any comment, so I don't see the same things you do. I'd appreciate it if you could let me know if ever the edit link appears a little wonky or if the function doesn't work as expected.

Wednesday, August 23, 2006

I wonder how well that will go over?

The other day I found a new WordPress plugin that caught my eye: Easy Expand. It creates a bit of AJAX to tweak the way WP uses the special <!–more–> tag and it seemed pretty interesting.

So I visited the site only to find the download corrupt. I wanted to leave a comment notifying the author of this but comments are only open to registered users. Registration is open, so I signed up. After logging in I discovered something quite curious. The administrator has blog set so new users are automatically at WP's Author level. Which means that I unexpectedly found myself with the ability to write my own posts on her blog.

I resisted the temptation to write a post like, "You're a tool. Check your security." I left my comment (which was moderated) and went about my day. This morning I had a chipper e-mail response informing me that the corrupt download was fixed. I then told her about the unusually high new user level.

She told me that's exactly what she intended, encouraged me to write as many posts as I please and suggested I read her other posts to learn why. So I did. She's got a grand total of three posts. One is about the plugin and the other two are about making money with Google Adsense.

So I wrote my post about blocking web ads, including Adsense ads, with Firefox. I somehow doubt this is what Ms. Something-or-other had in mind. I'm curious to see if she lets the post stay.

Friday, July 21, 2006

Wow, that was stupid

Hey, guess what? I'm a dumbass!

So I got this new plugin the other day, WP-phpMyAdmin 2.8.2. As the name would suggest (assuming you geek), the plugin is a WordPress implementation of phpMyAdmin. All the power and gooey goodness, and the convenience of a WP admin panel. Cool stuff.

Anyway, I got the plugin installed yesterday and sat down to use it for the first time tonight. I was smart enough to make a full backup of my database before I started fiddling around. With my backup safely stored on my desktop, I dove right in to do all those little things I never get around to adjusting because of the hassle of using cPanel to tweak.

After making a few more changes than I should have, I decided I didn't like the way I'd taken things and went to restore my backup.

And then I couldn't find my backup.

It turns out I accidentally deleted my fresh clean backup while I was still tweaking. I found this out when I inadvertently restored last night's automatic backup. What a dumb ass.

So every database change since 1 a.m. yesterday was lost. I was able to rebuild everything, so nothing was permanently lost. Fortunately, it was kind of a slow day: only one post and about a dozen comments. It's possible that a comment or two was lost in the shuffle somewhere, so if you see something missing, don't think I deleted out of anything other than stupidity.

Lesson learned: make double dog sure I've got a backup before I do something permanent. Other lesson learned: quit being so fucking dumb.

Tuesday, July 18, 2006

Three reasons you should be jealous

  1. The Gawker Media family of blogs (Wonkette, Gizmodo, Defamer, Lifehacker, etc.) a few months ago implemented reader comments. Commenting is currently by invitation only and I've been invited.

    I get to sit at the cool kid's table. Kneel before Zod.

  2. I've written my first WordPress plugin. Read all about it (if you can stomach it) on my plugins page.

  3. My feet are pretty.

    I wear sandals nearly every day in the summer. So I've got very lovely tanlines.

    I have zebra feet. And you don't. Neener neener neener!

Tuesday, July 4, 2006

Must. Have.

Have any of you WordPress users heard of ShortStat? I continuously see that plugin mentioned on "best of" lists. I've tried it out once or twice, but I've been disappointed both times.

See, I could never get it to work and I have no idea why. It just wouldn't track anything. I figured it for a broken plugin and just moved on. It turns out that the original ShortStat plugin doesn't work in WP 2.0.2 and 2.0.3. The developer hasn't bothered to release a new version. And then I found this version. Now I see what everyone was talking about.

ShortStat is fantastic. The amount of information it logs is almost enough to make me ditch my hit counter. (Almost.)

For example, I now know that my RSS feed got 41 hits yesterday. And that 3% of my visitors are from China. And that I get three times as many search engine hits from MSN than I do from Google, in spite of the fact that Google crawls my site more thoroughly, etc., etc.

Cool. I loves me some stats. I also love the fact that my Bush Family Porn script nets me around ten search engine hits a day. However, I do not love the fact that everyone seems to be finding it by searching for "family porn." Not "Bush family porn," just "family porn."

So apparently search engines think I've become one of the internet's premier sources of incest porn. That's a stat I could probably do without, but I guess it's still good to know.

Wednesday, June 7, 2006

Notes on hosting your own blog, part 10

So, last week an update to WordPress was released. The new version, 2.0.3, includes a few minor performance enhancements and bug fixes and one big new feature: nonces. Nonces are some moderately complex technobabble that Owen at Asymptomatic does a pretty good job translating into something resembling layman's terms here. The short version is that nonces are a system for verifying that administrative commands come from the right place.

I read the release notes and was very interested in the new version. So I got all of my little ducks lined up in a row and prepared to upgrade. I downloaded the new installation, made an up-to-the minute backup of my database, and FTP'd a copy of my current install to my hard drive.

I've modified the WP core files a bit, so let's just say that I was using WordPress "2.0.2.fish." I took the new 2.0.3 files and added my mods before uploading them to save me the difficulty of doing it after the files were in place.

I activated the Maintenance Mode plugin to take my blog offline and overwrote my current installation with the new version. After the upload, I ran the one-click database upgrade. All finished, I viewed my blog… and found that for some unfathomable reason all of my content was crammed into the sidebar. The content that should have composed the main column was inexplicably displaying with a width of about half a character.

It was completely unusable.

I wondered, "Why would the theme fail in the new WP? Did the Maintenance Mode plugin mess with the install?" So I deleted my WP install and database, restored my backups, disabled Maintenance Mode and tried again.

No luck. Same problem.

I played around with the templates and found that it was only my custom theme that had a problem. The two themes included with WP worked just fine.

I wondered, "So is it a plugin problem?" I disabled all my plugins and tried the whole thing all over again, only to learn that nothing in my custom theme worked without the plugins the theme used.

Eventually, I mucked around with the blog output enough to learn that there was nothing wrong with my theme, or my plugins, or with the WP update.

The problem is that I'm a dumbass.

It was all in those mods I made to the WP core files. See, it turns out that if a file has two modifications, I better damn well make sure I update both of them, not just one. Some of the code I changed involves how the sidebar displays. I was sloppy when I inserted my changes. Garbage in, garbage out.

So in addition to being reminded yet again of how important it is to pay attention and do things right the first time, I also learned a lesson about using plugin template tags.

Trying to troubleshoot plugins without being able to disable the plugins was a colossal pain in the ass. So I took the time to sort out my template and wrap all plugin calls with function checks. I'm now at a point where I can disable all my plugins and everything will still work. Which is exactly what I need for troubleshooting in the future.

Confused about that function check business? It's simple, yet kind of important, so I'll explain.

The install instructions for a plugin with template features may tell you to insert a line of code like this:

<?php plugin_function('do_something_cool'); ?>

I would strongly recommend you wrap that in a function check, like this:

<?php if (function_exists('plugin_function')) { plugin_function('do_something_cool'); } ?>

The first line of code basically says "do this or else." The second line of code is more like "if you can do this, then do. Otherwise don't worry about it." And that's exactly what one needs to disable a plugin without also removing any matching template tags.
 

It's a good thing that I finally got around to adding those function check wrappers, but it turns out that the whole thing was kind of an exercise in foolishness. Although the new nonce system is cool, WordPress 2.0.3 is no kind of improvement at all. Those nonces don't really work right.

For some reason or another, every edit or delete operation I perform generates an extra warning prompt. And everything I edit suddenly has all single and double quotes escaped. (Like this: \"Let\'s go to John\'s house.\") What a pain in the ass.

Apparently these problems are not unique to me. There's a support thread on the WordPress site where people are talking about it. Mark Jaquith has even developed a plugin to fix it.

But that's a little messed up. Install the new update and then install a third party plugin to get the update to work? That blows. I'd recommend skipping WP 2.0.3 altogether and just waiting for the next revision.

Thursday, March 9, 2006

Notes on hosting your own blog, part 6

The Akismet plugin is a must have for WordPress. A spammer found me the other day and left 250 spam comments. All of those comments were flagged by the internal WordPress spam filters, but those filters still leave something to be desired. For example, each comment is held for moderation, which generates an administrative e-mail for each instance.

I've read good things about Akismet, but hadn't enabled it because it requires a WordPress API key. It's free and simple, but still an extra step that I didn't feel like taking. Now I'm glad I did.

Akismet intelligently analyzes all comments before the internal filters kick in, so all of my spam comments now go to Akismet's own administration panel for moderation. Akismet is worth the effort just to avoid the avalanche of "please moderate" e-mails.