Using APC and Subversion Checkouts

I am in the process of moving my sites from Slicehost to Linode, as most are aware Slicehost is being phased out for Rackspace Cloud. Anyway, I upgraded my VPS at Linode last night to Debian “Squeeze” and installed APC, which created a problem with the WordPress installations I had there. Basically, I couldn’t access the admin. Through the power of Twitter and the invaluable help of Mark Jaquith, I learned that by default APC doesn’t play nice with files that are checked out via Subversion. I think the root of my problem was a stray apc config for overriding include once, but certainly the subversion issue could have been at play too.

Anyway, a little Googling on the subject, I discovered there’s a configuration option for APC to use ctime instead of the default mtime. Adding apc.stat_ctime=1 is all that is required.

While I’m on the subject of migrating from Slicehost to Linode, Andrew RIley pointed out that someone had written a ruby script to migrate the DNS information for you.

Addendum To be clear, I install WordPress using Subversion and the appropriate tag. My Habari installs are also all Subversion checkouts from trunk.

Clean Home Theme for Habari

It’s always great to see new themes released for Habari, even if they are ports. Florian has ported the WordPress theme Clean Home to Habari. The theme’s name aptly describes the design, a clean, black and white two column design with contrasting red headings. The theme seems to be coded for trunk, that is, using the areas feature. One thing I noticed is that the theme still has some cruft from WP, calling for a dynamic sidebar (widgets) with some text that also references a text widget and and admin options. I of all people can understand though of wanting to get something out before working out all the kinks, so I’m sure he’ll update it as soon as the areas/blocks feature is fleshed out a bit more. I also don’t speak German, so it’s quite possible he references that in the post announcing the release.

Consolidating, Focusing, and Rookie Mistakes

As my online endeavors grow, I find myself with different sites floating around, doing nothing, as I have so many ideas for each site, I wind up not posting to any of them. I originally started Blogging Meta because I thought I wanted to have a personal site, and a site that I could focus on tech related blogging. Well, as I’ve said, neither came to fruition, and I’ve found myself lately feeling as if I had some dual personality that were just spinning their wheels.

So tonight I decided to merge the two sites, and really try to gain some focus. I still have my cooking site, which I still intend to further focus on, but hopefully by committing to using this site again for everything not cooking related, I just might be able to accomplish both.

The rookie mistakes came from the fact that since Habari doesn’t have an importer in place yet to import one Habari install into another, I was faced with the only option of deleting the existing database, which was basically an import from the original WordPress installation, then dumping the bloggingmeta database, doing a quick search and replace for urls, importing that file directly into the database, then re-importing the old wordpress database using the importer plugin. What I failed to do was check what was active in the plugins. I already had the twitter plugin installed, so I’m guessing that it kept the settings from the old site, thus upon import, all the new posts were twittered. Complete…rookie…mistake. Couple with that that I also left the pingback plugin active, it tried to ping all the posts while importing. Another party foul. So not only did I spam Twitter, my import royally failed, so I was faced with doing the whole process over again, albeit this time I deactivated the offending plugins, and the import went off mostly without a hitch. I might have lost a few old posts and/or comments, but all in all, I’m pleased with the outcome considering I’m doing this at 2 a.m. in the morning, and my focus might not be what it should be. I wish I could write it off as having had a few adult beverages, but alas, I would be lying.

Over the next few days I will be doing some tweaking here and there, and shutting down the other site (and doing a 301 redirect). I really like the typography of Ali’s theme, so I most likely will try to find the custom image I had made for the bottom, and trick out a few plugins. At least for now.

Gravatars 2.0 and Skippy’s Gravatars Plugin

I had heard that Gravatar 2.0 had been released, but hadn’t really paid much attention. Today, while doing a little housekeeping around the site, I noticed that none of my gravatars were showing up. After doing a little investigating, I realized it had to do with caching, among other things. First thing I did was dump the cache on my gravatars folder in wp-content. Second, I logged into the gravatar site, and re-associated my gravatar with my email that I use for that account. Still no gravatars, mine, or anyone else’s.

So I looked at the settings on Skippy’s gravatar plugin (which I like as I can set a local gravatar, vs using a default one from the original site), it was set to use caching. I turned that setting off, and voilá, gravatars are showing back up. Hopefully that could help someone else (though, from reading a few blogs, and the comments on the main site, there’s no guarantees the main site will be with fail).

Posting From Ecto

Testing out Ecto, a desktop blogging client. I had only tried MarsEdit, and at the time there was no option for tagging. Now that UTW supports inline tags, this should be a better option.

[tags]ecto, WordPress, UTW[/tags]

WordPress Blank Theme V2beta

While I’m in a blogging flurry, I figured I’d go ahead and share my newest “blank theme”. I do quite a bit of WP work, either converting open source designs, modifying existing site’s design to a WP theme, or custom work, and often have the use for a framework to start. For the past couple of years, I’ve been using my popular Blank Theme, but more and more, I’ve found the markup not to my liking, and as it’s based on Kubrick, a bit outdated code wise. So I’ve cooked up a blank theme from scratch, using much more (hopefully) semantic markup, and a much more streamlined framework. This version currently only has an index, header, footer, sidebar (as an unordered list, which should be widget ready, though I would need to add a function.php file. It also includes a bit of code handy for recent posts), single post, and page template. I also am using Christian Montoya’s comment template instead of Kubricks. I hopefully covered all the elements in the templates in the style sheet, as well as have a few basic global elements set.

Remember, this is a blank theme. It is completely unstyled, and is meant as a framework in which to customize a theme. Also, this is meant for WP >= 2.1.x, as it uses several new template tags.

Update: Download link fixed. (damn typos)

You can download the Blank Theme v2 beta.

I would appreciate any and all feed back, both for missing elements, and suggestions for additions.

Quick WordPress tip: Press it bookmarklet

I’ve used the “Press It” bookmarklet about as long as I’ve used WordPress. When the feature was originally used in 1.5.x, a new window would open up, and you could reference the original site for what you wanted to use for content. In 2.0.x, it takes you from the site to your write post panel, which means I either have to go back and re-open the site, or remember what it was I wanted to use from the site. That is until today. I accidently had some text highlighted on a page when I used the bookmarklet, and when taken to the write post page, the highlighted text was pasted into post panel. Cool! Now I can highlight a blurb for a blockquote, then “Press It”, and simply add the blockquote html tags and finish the post.

Category Archives Plugin

(disclaimer)I’m not a coder, and this is my first attempt, I apologize if this isn’t properly documented or presented.

My very first WordPress Plugin! I’ve dabbled with a lot of areas of WP, but until this post in the support forums, I never really had an idea or need to write one. But after doing some reading, I found that there wasn’t a simple way to accomplish this task. All of WP’s archive features are based on date.

So with the help of alphaoide via #wordpress on IRC, I put together this simple plugin to accomplish the task. It worked fine on my test site, but may need some TLC before being good to go. Basically it outputs categories by name in an h2 tag, then lists post titles with a permalink to the post.

I tested this by creating a Page Template, then inserting the plugin code within the content div of the theme.
The code to insert is
< ?php mb_cat_archive(); ?>
(remove the space between the < and ?, I’m not sure why that is getting reformatted in the post)
I suppose this could be used in a sidebar, however it may create a very long list…
So to summarize, download the file, unzip, and upload to your wp-content/plugins directory.
Activate the plugin in the dashboard. Create the page template, inserting the above code, save, and upload to your themes directory.
Go to Write->Page, and choose the template you uploaded.
The new page should now list your categories with their appropriate posts.
I haven’t looked into how it handles posts with multiple categories, that will be on my todo list, I’m sure, if the plugin proves useful or popular. I’d also like to add some AJAX to hide the posts until you click on the category (that would make it much more sidebar friendly), and the ability to change the h2 tag to whatever one likes.

You can download the file via:
http://www.miklb.com/blog/cat_archive.zip

Thumbnails on Home Page

This little tutorial is intended as a means of providing WordPress users the means of posting a thumbnail image on their home page, and having a full size image on the single page view. This is accomplished using the image uploader built into WordPress, and CSS. If you are intending on using excerpts on the home page, then the addition of Kaf’s Excerpt Reloaded plugin. His plugin allows for the inclusion of tags within the excerpt, something the built in function the_excerpt does not.
The first step is to make sure you have the_content or the_excerpt wrapped in a unique div class. I’m not sure of the exact correct semantics, but I simply call my home page excerpt “home”, and single page div “single”. (Note, depending on your theme, you may or may not need to create a separate class for the single page view. I actually wound up not using single in my theme, as I was able to use the class “primary” from the original code. The objective is to have a parent div to call with the specific class we assign the thumbnail).
Next, when you upload your images via the WP upload, be sure to note the path. Generally speaking, both the created thumbnail and full size image are placed in the same directory. the difference being the thumbnail file is yourimage.thumbnail.jpg. So now that you have uploaded the image, and the thumbnail has been created, it’s time to place both the thumbnail and full size image in your post. We are going to code the image directly, and not use the WYSIWYG or quick tag buttons, as we need to add a class directly to the image. Again, not sure about proper semantics, but I used “big” and small, obviously for the full size and thumbnail, respectively. Note, if you want to also float the image, you can use two classes, simply leave a space between each class. An example would look something like this :
image
Now to create the CSS to hide images on the different pages.
First, to hide the full size image on the main page, we need to add to our style sheet .home .big {display: none}.
Then to hide the thumbnail on the single page view, we add .single .small {display: none}.
That’s it. A couple of simple CSS classes and the built in image upload. A note about the code. Depending on your theme, you may or may not need to create a few more templates. If your theme only has an index.php file, then you’ll need to save a copy of that as single.php then make the changes to that, as outlined.
I’d love some feedback on the semantics of the classes, as that’s still an area I’m learning about, as well as any general feedback about the concept. It works fine for the theme structure I’m using, but if you run into any problems with your theme, please leave a comment, and I’ll do my best to help you make it work.

Happy (Belated) Anniversary to Me!

So, just over a year ago I started blogging. I believe I’ve grown quite a bit in my web knowledge in a short time of actually using a site I’ve started. I tried doing something with just about every free resource out there, it just never “took”. It wasn’t until my friend over at tiny little dots adopted WordPress, and thus I installed it on my newly purchased domain, did the light go on. At once I felt at home. I immediately begin cramming massive amounts of CSS knowledge into my already crowded head. I now can I say I can see myself actually putting food on the table and a roof over my head some day doing this stuff full time. I’ve got a long way to go, and need to particularly see where I “fit in”, but it is quite exciting, a feeling I lost quite some time ago in regards to cooking.

So a hardy thank you to tiny for adopting WP and to trench for my first blogroll link. Also a big thanks to the many people who’ve stopped by and left a comment, it’s always nice to know someones reading the site 🙂

I’m really looking forward to seeing what the next year of doing this brings, what direction things will go, but if the first was any indication, it’s going to be great.

Landzilla- From the Swamp WordPress Theme Updated

I had a client who chose the Landzilla theme, but wanted some color changes. While in the process of doing that, I found the theme used a single index file, with no seperate header, sidebar, footer, etc. So I’ve repackaged the theme with the new colors, a few other changes, as well as a .psd file to insert your own 181 x121 pixel images into the four boxes in the header graphic.
A screenshot can be seen here.

Here’s the download.

Any questions, just leave a comment, I’ll try to help.

Oh, the name, well, Florida is really just one big swamp…

Why I Love Spam Karma…

…and will be hitting Dr Dave’s PayPal later today. The last couple of days, I had noticed I was getting S P A M emails, that seemed legit. But further investigation, revealed that it was bunk. First giveaway was the “Great Site”, but the kicker would be a fishing site commenting on a fishing article. They are searching technorait, or google blog search, and finding keywords and then hitting. So, some what frustrated, I delete, and wonder if Bad Behavior and Spam Karma are working. Low and behold I go to delete some more via SK, and I’m greeted by a message saying it’s not just me with spam getting through, and offering up some solutions, with an assurance that there are more tricks to SK to squash the recent wave of Spammers if it persists. Well worth a trip to Dr. Dave’s site and donate what ever you can, be it a month’s intake of Google Ads, or $10, or more, if you can spare it. I’ve already done so with Bad Behavior, and so should you, especially if you spend any where the time I’ve spent the last two days cleaning 3 blogs of spam. The donation is well worth the time it would save.

Perfect Christmas Gift!

The perfect Christmas Gift! The blogsphere! (That term has been played out, hasn’t it?)Anyway, head over to my WordPress Station and read more about the inexpensive options available. be it a $25 a year blog package, or $60 for a full year (including domain registration), it’s the perfect gift for that hard to buy for teenager, or the geek-wanna-be Aunt.

WordPress and Linkblox

So while doing a design for someone, I came across this site – Linkblox. Among some other flash type widgets, this one presents your links in a compact widget, especially if you have them categorized. What’s nifty about this free widget, is that is uses OPML. While not that familiar with it, a quick poke around the forums, I discovered that the links manager built into WordPress already outputs your links in an OPML file. It’s found in your root WP folder at wp-links-opml.php. The linkblox site simply asks for you to point to a OPML file, your URL, and then outputs a script for you to place in your header and sidebar. One for the header, one for the place you want your widget. So what’s nice, is you can continue to use your “link this” bookmarklet, and keep your blogroll/links in your DB, so if the “linkblox” site disappears, or you decide to stop using it, you still have all your blogroll safely at your site. The advanced customization for the widget gives you quite a bit of color customization, and the site promises this is a work in progress, which is why they are hosting the script, so that can make upgrades seamlessly behind the scenes.