Archive for the ‘Wordpress’ Category.

Installed Gravatars

Well, that was straightforward. I installed Gravatars in the blog comments.

So now if you want to put your mug shot next to any of your comments on any blog in the world that supports Gravatars, just sign up with Gravatar.com and give them your image.

 

Here’s how I installed Gravatars.

I added 1 line to my comments.php following this already existing line:

<cite><?php comment_author_link() ?></cite> Says:
<?php echo get_avatar( $comment, 50 ); ?>

And I added this to my style.css

.avatar {  
float: right;
}

Done.

Stumbled-upon

Apparently I’ve been stumbled-upon.
They sure like them funnies.

Super-Cache is working fine. Though I’ve gotten a few core dumps today. Figuring out what’s causing that will be a bother….

update 3pm: cores still dumping :-(. Just hit 30,000 views of “Motivational Posters” today. It’s funny how the rest of the site isn’t being visited at all; short attention span theater, eh?

update 9-23-08 10am: I upped the Super Cache settings to Garbage Collection every 5,000 requests, set a few pages to be Directly Cached files (Motivational Posters, The Amazing Power of Makeup, homepage). And there hasn’t been a core since last night. 41,000 hits to Motivational Posters so far today, 2,500 to The Amazing Power of Makeup.

update 9-24-08 2pm: I normally use about 1 gigabyte of web traffic per day. This Stumble-upon has brought that to 150 gigabytes/day and 150 thousand page requests/day for the last 2 days. Dreamhost allows me 7 terabytes/month so I should be fine for bandwidth. My Apache Analog stats says that I’ve had only a couple hundred failed file serves out of the approximately 6 million file requests in the last couple days, which is shows Dreamhost is handling the traffic fine.

Since upping the Super Cache Settings, I’ve gotten just 1 core dump at 23:59 last night. I’m guessing that garbage collection and bad luck conspire to cause a core dump every now and then.

Installed Search Excerpt and Search Reloaded

To make search results on my blog prettier and more useful, I have installed 2 plugins and added a search.php to my theme. The two plugins are Search Excerpt and Search Reloaded.

All this was at the (very good) suggestion of this post.

Spam Karma: so long and thanks for all the fish

Dave, the author of the terrific-fantastic-makes-blog-comments-possible-I’ve-donated-to Spam Karma has decided to call it quits on the project. He’s opened it up as GPL. I certainly hope that someone picks up the slack. Here is Spam Karma GPL edition.

Installed WordPress 2.6, Problems

Slightly prettier.

Google Gears helps mitigate the slowness of all the freaking modal windows they keep putting in. Note I say “helps”. Modal windows are bad for performance. This isn’t a heavyweight application, it’s just moving text around. It should be lightning fast. It used to be. :-(

There are changes to how images are uploaded but still no performance improvements. In version 2.3, it took 1 click and 1 drag to insert an image exactly how you want it, in 2.5 and 2.6, you’ve got to jump through several hoops. See here and here. And there is no word on whether Flexible Upload will be getting an update. If I were the author, I would be tired of making updates.

Annoyances:

When writing a post, the title of the post is automatically set the few seconds after you leave the Title window. That makes it a bother to change the title.

Fucking modal windows while uploading images. In version 2.3 you could upload images while writing the post, then drag the image into place. Now it’s a multi-window, multi-step process. This really pisses me off

You must scroll down to the Categories section at the end of every post. Why isn’t it on the right side of the screen where all of this new useless crap is sitting? (I just noticed that the Press This thingamajig uses the old Categories-on-the-side layout)

Feh.

Followup! Arg! The jerks broke WYSIWYG image layout.

Another Followup: In order to be WordPress 2.6 compatible, I found that my CSS stylesheet has to support alignleft, alignright, and centered. Aparently “align=right” isn’t good enough any more. So I added some image code that I borrowed from the White as Milk 1.8 theme.

So many auto-save post revisions

Yet Another Followup: Lester Chan is correct in saying that Post Revisions in WordPress have very little utility and clutter up the database. This very post already has 16 revisions. In other words, the post you are looking at is taking up more space in the database than my previous 3 weeks of blogging combined. That is not right. (one major reason for all the revisions is that in order to view a preview of a post, you have to Save it first).

I have disabled post revisions with Lester Chan’s instructions.

To turn off this feature, add this following code to wp-config.php:

define('WP_POST_REVISIONS', false);

To change the timing (in seconds) WordPress auto saves a post, add this following code to wp-config.php:

define('AUTOSAVE_INTERVAL', 60);

You can also delete all post revisions by running this query in phpMyAdmin:

DELETE FROM wp_posts WHERE post_type = 'revision';

Be sure to backup your database first before performing any queries in phpMyAdmin.

I changed the autosave to 180 seconds so it wasn’t so irritating and got rid of post revisions. Thanks Lester!

Video Sitemap with FLV Embed

I just set up the video sitemap feature of the terrific WordPress plugin FLV Embed. With it, you and search engines can now find all the videos on my site by going to http://lee.org/blog/videofeed.xml.

Enjoy

PS, I’m a frog.

My WordPress Plugins 6-6-08

Credit where credit is due.
Here are all the Plugins I’m running as of 6-6-08 on this WordPress 2.5.1 install.

  1. Admin Drop Down Menu (v. 2.1 ) by Ozh.
  2. Brian’s Latest Comments (v. 1.5.10 ) by Brian Meidell.
  3. DoFollow (v. 4.0 ) by Kimmo Suominen.
  4. Exec-PHP (v. 4.7 ) by Sören Weber.
  5. Flexible upload (v. 1.13 ) by Antoine Choppin.
  6. FLV Embed (v. 1.1 ) by Yaosan Yeo.
  7. Google XML Sitemaps (v. 3.1 ) by Arne Brachhold.
  8. Permalink Redirect (v. 0.8.4 ) by Scott Yang.
  9. Plugins list (v. 0.2 ) by Davide Benini.
  10. Recent Posts (v. 1.05 ) by Nick Momrik.
  11. Related Posts (v. 2.02 ) by Alexander Malov & Mike Lu.
  12. RSS Footer (v. 0.7.5 ) by Joost de Valk.
  13. Search Everything (v. 4.5 ) by Dan Cameron.
  14. Smart Archives (v. 1.9.2 ) by Justin Blanton.
  15. Spam Karma 2 (v. 2.3 rc3 ) by dr Dave.
  16. Subscribe To Comments (v. 2.1.2 ) by Mark Jaquith.
  17. WordPress.com Stats (v. 1.2.1 ) by Andy Skelton.
  18. WordPress Database Backup (v. 2.1.5 ) by Austin Matzko.
  19. WP-PageNavi (v. 2.30 ) by Lester ‘GaMerZ’ Chan.
  20. WP lightbox JS (v. 0.8 ) by Safirul Alredha.
  21. WP Super Cache (v. 0.6.4 ) by Donncha O Caoimh.

Search and Replace WordPress Plugin

When I switched my permalinks from http://lee.org/blog/archives/… to http://lee.org/blog/… I had several links in my blog with the old “archives” links. Thankfully, the Permalink Redirect plugin redirects hits to those pages with “303” errors. But I still needed to change the 30 or so posts with those old links. Search and Replace WordPress Plugin to the rescue. Of course I backed up my database first but it worked peachy keen, changing links en-mass. Here’s the search-replace strings I used. Doing it this way kept some direct links I had to the “archives” folder intact.

href="http://lee.org/blog/archives/2008 --> href="http://lee.org/blog/2008
href="http://lee.org/blog/archives/2007 --> href="http://lee.org/blog/2007
href="http://lee.org/blog/archives/2006 --> href="http://lee.org/blog/2006
href="http://lee.org/blog/archives/2005 --> href="http://lee.org/blog/2005

etc…

YSlow WordPress Performance Improvements

The YSlow Firefox Addon suggested a few performance boosts for the blog.

This seems to cut 1-2 seconds off loading time. Nice :-)

added <?php flush(); ?>
just after </head>

I put this in my .htaccess file (at the root of lee.org). This helps a lot when revisiting my site :-))
ExpiresActive On
ExpiresByType text/html "access plus 1 week"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/x-Shockwave-Flash "access plus 1 month"

Upgraded to WordPress 2.5

It was a bother…. almost an hour of upgrading, disabling and re-enabling plugins.

And I really don’t grok the Add Media buttons. I only let myself upgrade now because the guy who makes Flexible Upload was kind enough to port his plugin to WP 2.5. It still bugs me that the new upload windows are modal. So now I’ve got to sit around and wait for them to finish until I can continue writing. It used to be that I could add images while I was typing. In addition, since it’s modal, I don’t have a chance to place the images exactly where I want them with my cursor as an insertion point. Instead, I just plunk all the images down into the post and then I can rearrange them.