Apr

3

WordPress – Displaying Custom-Formatted Links To Page Children

This is just a quick and easy tip, but it was harder to find the answer to than I would have expected. (…or maybe I just didn't appease the Google Gods correctly when searching.)

If you have a page hierarchy within your WordPress site and you want to display (such as in the sidebar) the immediate children of the current page that you're on, here's the code to do it.

<?php
    // will display the subpages of this top level page
    $children = wp_list_pages("title_li=&child_of=" . $post->ID . "&echo=0");
    if ($children)
    {
        // custom formatting goes here, just print
        // $children when you want to render the link
        echo '<div id="pagelist">' . "\n";
        echo "<ul>\n$children\n</ul>\n";
        echo '</div> <!-- end div id="pagelist" -->' . "\n";
    } // end if test
?>

Please note that this method only lets you custom format the display around the actual link. wp_list_pages() will return the text with the anchor link already wrapped around it. I haven't dug into how to further format the link.

I hope that helps!

Apr

3

Yet Another List Of Recommended WordPress Plugins

I know there have been a zillion and a half posts written about the best plugins for WordPress, but I thought I would throw my hat in the ring and offer up my favorites. Some are the common ones that you'll find on many other lists, but some are ones that I've had to dig for to fulfill a unique need that I had. If you're a WordPress veteran, maybe you'll find a gem in this list that you apply to your site. If you're new to WordPress, you'll likely find many of the plugins on this list that you'll want to add to your site.

Akismet – There's a reason why this plugin comes stock with WordPress. If you allow users to comment on your site, you definitely want to use Askimet to help prevent spam. It's not perfect, but it's really, really good. If you have a very high traffic site, you may want to incorporate some additional spam protection, like a CAPTCHA or some other means, but Askimet does a pretty good job for most needs. The only gotcha is that you need to request an API key from Askimet to use it. The good news is that you can use that key across many WP sites.

All In One SEO Pack – If you want to improve the Search Engine Optimization (SEO) for your site, this plugin provides a lot of enhancements for you. This plugin offers a lot of customization, but, frankly, I mostly leave it as is. I'll fill in the meta description and meta keywords and then leave the rest as is.

Audio Player – I didn't like the default WP hosting functionality for audio files as I wanted to be able to have a small inline player. After a little bit of digging, I found Audio Player and I was quite impressed with the visual customizations that you can do through the admin interface to make it fit with your theme. Be sure to check out this plugin if you want to host playable (not just downloadable) music or podcasts.

Dagon Design Sitemap Generator – While the Google XML Sitemaps plugin generates a sitemap.xml file for search engines to read, it's HTML sitemap is less than desirable. This plugin lets you create a page and then drop a code anywhere in the page to render a customizable, paged sitemap.

Enable Media Replace – Recently, I needed to replace some images on my photography site, 528Digital.com. I was disappointed to learn that my options were to either manually FTP and replace the image (maintaining the same file dimensions and name manually) or to delete the image, upload a new one, and then re-insert that new image into the post. That was unacceptable to me. Thankfully, I ran into this plugin that just adds one little bit of functionality to the Edit mode in managing your media that allows you to replace the file by uploading a new one. It maintains the same references, filename, etc., so you don't have to make any further edits. Just replace and you're done!

Exec-PHP – To be honest, I'm not sure if I can remember an instance when I've used this, except for with PicasaWebScraper, but I like to have it installed for the case when I might need it some day. It allows you to put executable PHP into the body of your posts or pages. This is great when you want to use WP as more of a content management system and you need to inject some dynamic functionality. You should, however, be careful with this plugin if you have non-technical users as they could cause a problem or break some PHP code written by someone else when editing content. EDIT: I recently found that runPHP has some of the features that Exec-PHP lacks, such as enabling for a specific page/post and you can specify access by role.

Google XML Sitemaps – This plugin generates an XML sitemap of your site's content for search engines to read. This helps with content indexing for search engines and you can leverage it using Google's Webmaster Tools to check for broken links.

Improved Include Page – I only used this plugin briefly before I changed my mind on how I wanted to do something, but it allows you to include page content within your theme. For example, you might want a small block of a theme that appears on every page that is editable via the normal page/post editing means, rather than just through manual editing of a text widget.

KB Advanced RSS Widget – WordPress comes with an RSS widget, but the styling/display options are practically non-existent. If you want to be able to style the display of your RSS widget to fit within your theme, you definitely want to try this plugin.

Lightbox 2 – I'm sure you've seen those fancy image popups where the rest of the page looks like you've turned the lights down while a big version of the image you clicked on is displayed in the foreground: that's Lightbox. There are a lot of other plugins and features that can use Lightbox, but you can also use it by itself.

Sociable – If you've ever wanted to add those little icons to a dozen or more different social media sites for users to submit your links, this is the plugin you need. It's highly configurable with many, many different social sites to choose from, and it includes links to email and print the content.

TinyMCE Advanced – I really don't know why this isn't part of the default install of WordPress. Maybe there are other options that people like so they leave it up to you to choose which plugin you want to use, but the default WYSIWYG editor is really insufficient for anything more than basic rich text editing. With this plugin, you get a lot of the missing functionality and a lot of customization to suit your needs.

Unfancy Quote – I really hate curly quotes. You know, the ones that MS Word gives you. WordPress has curly quotes by default so your quoted text “looks like” this "rather than like this". Maybe it's because I'm a programmer, but I pretty much never want curly quotes unless I'm writing a novel, in which case I will use Word. This plugin changes the default rendering of quotes so that they appear as you actually enter them.

Viper's Video Quicktags – Embedding videos into your posts can sometimes be tricky. Viper's Video Quicktags plugin helps make this process easier and it's customizable. This works especially well if you use YouTube a lot. You can even specify the default dimensions of the player, which really helps.

WP-DBManager – I've always been paranoid about losing the data in my blog. I ran into this plugin a year or so ago, which not only regularly backs up your WP install, but it also emails you the file. I've been using this on every WP site since.

WP Super Cache – Super Cache is a bit of a dual-edged sword because if you forget that you're running it, it can cause quite a headache. It caches your WP pages into static content so they can be served much more quickly. This is great if your site hits Digg or gets Slashdotted, but if you're trying to debug a theme tweak or some other change, it can be a huge pain if you forgot to turn it off. The other thing about this plugin is that if you're reading my blog, your site probably doesn't get enough hits for you to really need this. And yes, I know I don't need it either. ;)

Yoast Breadcrumbs – If you want to use breadcrumb navigation on your site, this is the best plugin I've found, and even this needed some behavior modification at the page-render level. I'll probably post up the details of those tweaks at a later date, but this is a really good place to start if you want breadcrumbs. [Edit: Here's the link to the post I mentioned that I would write.]

If you've got any must-have plugins that you'd like to recommend, I'd love to hear about them. Leave a comment with your thoughts, a description, and a link to the plugin if you want to suggest one. Happy WordPressing!

Mar

23

GoDaddy Shared Hosting Multiple-Domain And Subdomain Management

If you use GoDaddy's shared hosting plans that support multiple domains (the Deluxe or Unlimited plans) and you've tried to manage multiple domains and subdomains, then you probably are already familiar with the organizational frustrations that can occur.

In a standard web server environment, each domain and subdomain has it's own directory, usually under a hosting directory, like this:

~/
     myprimarydomain.com/
          www/
               index.html
               ...
          somesubdomain/
               index.html
               ...
     myotherdomain.net/
          www/
               index.html
               ...
          someothersubdomain/
               index.html
               ...

Unfortunately, with the Godaddy shared hosting plans, some domain must be the primary domain and it must live in the root. That is, you'll end up with a directory structure like this.

~/
     footer.php
     header.php
     index.php
     images/
          ...
     javascript/
          ...
     myotherdomain.net/
          index.php
          ...
     picturessubdomainforprimarydomain/
          index.php
          ...
     someotherdomain.org/
          index.php
          ...
     ...

As you can see, this gets pretty muddy when you have the code for a website for your primary domain mixed in with your other domains and subdomains. Unfortunately, there's no way to completely fix this issue with the inexpensive hosting plans. However, you do have a few options to organize your hosting directory.

Option 1 – The "Primary Domain Gets Screwed" Solution

You can setup a domain that you don't care about for the primary hosted domain. Then, just don't put anything in the root and start organizing your domains in folders with subdomains in those folders. With that method, you have to buy an extra domain that you aren't going to use.

Another way you can do this is with a root-level redirect. You can put a single redirect in the root to point the primary domain to its properly nested directory. The problem with this is that you are going to get a long junky URL (after redirect, http://www.mydomain.com/managed_domains/mydomain.com/www/index.php) for the primary domain unless you can get mod_rewrite to work with GoDaddy. I haven't tried this, but I suspect you won't be able to rewrite the URLs in a pretty manner as you aren't allowed access to the Apache httpd.conf file.

Option 2 – The "Try To Keep The www Subdomain Content For Your Primary Domain Well-Organized/Minimal And Manage All Your Other Domains And Subdomains Correctly" Solution

Okay, maybe that solution needs a better name. :)

This is the solution I'm currently using. My kennycarlile.com is my primary hosted domain, so I have to keep my www content in the root. I wanted to organize my other domains (and subdomains for kennycarlile.com), so I put my www.kennycarlile.com content in the root and then created a folder for other domains called "000_other_domains". I chose this name, with leading 0's because that will force it to always (well, in theory) put that directory first in an alphabetical listing of the parent directory.

Within ~/000_other_domains/, I then create a folder for each domain, independent of the subdomain. That is, I have ~/000_other_domains/kennycarlile.com/ as a parent folder for all my other subdomains. For this case where this is for the primary domain, the www directory exists at the root (~/), but all other domains exist in this directory:

~/
     000_other_domains/
          528digital.com/
               www/
          frofrolynx.com/
               www/
          kennycarlile.com/
               demo/
               wiki/
               [www/ does not exist here because this is the
                    primary domain and it must exist at ~/]
          kennycarlile.net/
               gallery/
               www/
          moonfar.com/
               www/
          nwdirtriders.com/
               forum/
               gallery/
               www/
          ...

While you still end up with your primary domain's www directory mixed in the root with the 000_other_domains/ directory, you have the rest of your domain and subdomain structure organized logically.

Option 3 – The "You're Actually Making Money From Your Site So You Can Afford Some Real Hosting" Solution

If you're making money off your site and it's not just a hobby, you can probably splurge for the $35+/month virtual dedicated hosting that allows you to have a lot more control over your Apache configuration. This isn't a really a solution since the issue is trying to fix the shared hosting problem, but I just wanted to point out this option.

Fixing A Poorly Planned Hosting Setup

I hope that helps someone out there. I would have liked to have seen this kind of write up prior to starting to manage my hosting. As it was, I had all of my domains and subdomains in folders at the root (~/) of my hosting directory. To clean this up, I had to move many of my installs. I was worried about breaking/corrupting my applications that GoDaddy had installed for me (WordPress, PHPbb, Twiki, etc.), so on the advice of one of their very helpful and articulate tech support reps, I followed these steps:

  1. Using GoDaddy's File Manager in their hosting tools, create the 000_other_domains/ directory.
  2. Now create a directory for each domain under 000_other_domains/, such as kennycarlile.com/, frofrolynx.com/, etc.
  3. Using the File Manager tool, COPY the improperly placed folder where your subdomain (that includes the implicit ones like www, except for your primary domain, which has to stay at ~/) and rename the copied folder as appropriate. You should now have a directory structure like ~/000_other_domains/frofrolynx.com/www/ where a copy of your frofroynx.com content resides.
  4. In domain management, modify the record for each domain and subdomain (do subdomains first so you can go back and mange the parent domain while you are waiting for the subdomains to take effect, which happens every 30 minutes), so that it points to the NEW location: ~/000_other_domains/frofrolynx.com/www/. Again, this will take ~30 minutes to take effect.
  5. Rename your OLD directory to something like xxx_[foldername] so that you know 100% that you aren't accidentally seeing the old install because the domain change hadn't yet taken effect. This also helps you identify which folders you need to delete later.
  6. Now test your install. For some applications or plugins for applications, you may have to edit config files to point to the new server path, such as changing /home/content/u/s/e/username/html/old_domain_directory/… to /home/content/u/s/e/username/html/000_other_domains/frofrolynx.com/www/…
  7. Once you've been able to correct all the absolute paths to point to the new one, test again.
  8. After a day or two, if you feel confident that everything is working as is, you can delete your xxx_[foldername].

Well, that about covers my experience with trying to fix a poorly-managed (by me) hosting account on GoDaddy's shared hosting. Hopefully that will safe someone else some pain and hassle by learning from my mistakes and experience. Good luck!

Mar

22

New KennyCarlile.com And Aggregation Of KennyCarlile.net

Well, I think I've finally got things tweaked the way I want them enough to announce the re-launch of KennyCarlile.com and the aggregation of KennyCarlile.net into one site. Currently and for the immediate future, KennyCarlile.net will 301 redirect to KennyCarlile.com.

This is a completely original design and implementation from scratch, new logo, and some new content, although there are some sections of the site still thin on content. I hope to be able to fill those out soon. I've also got a handful of blog posts that I've been wanting to write but have put on the back burner because I wanted this new site to be a priority. Unfortunately, when you have a big project that takes a while and you put it ahead of the little stuff…you end up just procrastinating on doing anything.

I'm relieved to have this redesign done as I think it's a lot cleaner and less cartoony than my previous sites. Additionally, I've been wanting to have my professional and personal content all under one site for a while now.

Currently, I'm planning on the redesign of the Western Skies site to be my next big project, then on to Moonfar on Google App Engine. Also, if you haven't been spammed by me about this yet, please check out 528Digital.com to see my new venture in photography (as art, not for hire).

Thanks for stopping by and look for more upcoming blog posts including tips for domain and subdomain management in GoDaddy hosting.

May

3

New Bike Purchase: 2005 Kawasaki KLX110

After really taking to the XR50, Pax has come to realize (along with the rest of us) that he's really too big for his XR50, so we did some Craig's List searching and found a 2005 Kawasaki KLX110. It's in great shape and we got it for a pretty good deal, not amazing, but not bad either.

klx110_4 klx110_3

Paxton has really taken to it. He loves it and he hasn't been intimidated by it at all. I thought the bigger bike might have him intimidated, but he hopped right on it and took off around the seller's yard and he rode around our culdesac for about 30 minutes just grinning the whole time. He's doing great and I can't wait to get him on a track and some trails to see how he likes the new ride. Power-, handling-, suspension-, and ergonomics-wise, this is a much better bike for him.

klx110_2 klx110_1

YouTube Preview Image

I've had quite a bit of fun putzing around on it too. I was going to keep the XR50 and turn it into a pit bike, but now I'm starting to think that this might make a better pit bike once he outgrows it. We'll see. I'm keeping the XR50 for now, at least.