Feeding your WordPress posts to Facebook

The RSS supported built into WordPress makes it easy to write a post in one place and have it appear in other places like FaceBook and Twitter. FaceBook automatically generates multiple RSS feeds based on categories and/or tags, so you can get as fancy with this as you want. For example, you can create a tag “FaceBook” and then have only those posts tagged “FaceBook” appear on your FaceBook.

To enable your WordPress posts to appear in you FaceBook stream, simply configure Account -> Application Settings -> Notes and select “Import my blog” on facebook and point it to your WordPress blog URL. If you just list the blog URL you will get all posts. Alternatively you can use the URL to a specific category or tag.

To keep the size of the post fed to FaceBook reasonable, set your WordPress reading settings “For each article in a feed, show:” to “Summary”.

WordPress 3.0 TwentyTen Child Theme Header Image

The new Twenty Ten theme for WordPress 3.0 provides support for uploading custom header images. Uploaded images are cropped to 940 x 198 pixels. So your options are:

  1. Ensure that your header image size is 940 x 198 pixels.
  2. Modify the Twenty Ten theme to change this size
  3. Create a child theme which overrides the size

I’m going to show you how to do option 3: change the Twenty Ten theme header image size. “Creating a child theme is the way of the future” (I think that Yoda said that, but I’m not sure).

The Twenty Ten header image size is defined in the functions.php function twentyten_setup(). The WordPress team has thoughtfully provided filters to simplify overriding the default height and width:

// The height and width of your custom header.
// You can hook into the theme's own filters to 
// change these.
// Add a filter to twentyten_header_image_width
// and twentyten_header_image_height to change these values.
define( 'HEADER_IMAGE_WIDTH', 
   apply_filters( 'twentyten_header_image_width', 940 ) );
define( 'HEADER_IMAGE_HEIGHT', 
   apply_filters( 'twentyten_header_image_height', 198 ) );

You can define filters named “twentyten_header_image_width” and “twentyten_header_image_height” which will override the default values of 940 and/or 198.

To create filters which override these values, create a functions.php file in your child theme and add the following lines:

add_filter('twentyten_header_image_height','my_header_height');
add_filter('twentyten_header_image_width','my_header_width');
function my_header_height($size){
   return 300;
}
function my_header_width($size){
   return 900;
}

In this case I am ignoring the default sizes that are passed into the filter and simply setting them to the values that I want (900×300).
Be sure to change the prefix ‘my_’ to something more appropriate and unique to your child theme to avoid possible naming conflicts.

That’s all it takes! Use the Appearance -> Header control panel to upload a new header image now. The control panel should now display the size that you set with these filters, and the new size reflected on the website.

Now having said that, I subsequently decided that I want different sizes and layouts for the front and other pages, so I ultimately modified the header.php file. Don’t judge me.

WordPress 3.0 RC3

WordPress 3.0 RC3 was released yesterday.

Once of the very cool new features being added to WordPress 3.0 is support for child themes. This capability will allow a web developer to create a new theme by overriding the settings of an existing (or parent) theme.

Combined with the new Twenty Ten default theme, this is going to make the creation of WordPress themes easier and less error-prone. The new Twenty Ten theme contains a lot of comments explaining how to derive a new theme from it.

This blog is using a new theme created this way. I’ll explain how each of the changes is made as I go along.

Note to Safari users: the new develop menu in 5.0 allows you to use Safari for web development in a manner similar to that previously requiring Firefox.  Check it out.

Dreamweaver CS5

I’ve been looking at the updated Dreamweaver CS5. I had been using Dreamweaver CS3 about 2 years ago, and abandoned it because of the problems it created with my custom PHP coding.

Well it appears that during CS4 and now CS5 Adobe has fixed a lot of those problems and added features specifically targeted for power coders like myself.

Perhaps the most interesting new feature is the support for working in CMS environments like WordPress and Joomla. I like to code extensions and themes for these environments, so this is a big plus for me.

There is a 30 day free trial, so over the next month I’m going to be giving it a whirl.

Lynda.com has a full tutorial on using Dreamweaver CS5, so I’ll be working through that also.

Joomla Security

I found some good tips on Joomla security at HotJoomlaTemplates.com:

  • Keep your Joomla core up-to-date.
  • Keep all your Joomla extensions (components, modules, plugins, templates) up-to-date as well. Follow extensions’ websites and upgrade each extension as soon as new version is realized.
  • Uninstall all extensions that you don’t need.
  • Delete superadministrator’s account with ID=62, if it exists in your Joomla user manager.
  • Change default username of your superadministrator’s account from “admin” to something else.
  • Use passwords that are combination of lowercase and uppercase letters, numbers and special characters.
  • Don’t CHMOD files on your server to 777. Use 644 instead. When your need to change some files, CHMOD them to 775 and, once you’re done, back them to 644. Use FTP software to CHMOD files.
  • When installing Joomla, use DB prefix different from default (jos_). If your current website uses this prefix, you still can change it using phpMyAdmin in your hosting control panel.
  • Even if you follow all above instructions, your website still can be hacked. Chances are less, but certainly not 0%. Check with your hosting provider if they make regular server backups. Check if site restoration is included in price. Check how many times you are allowed to make site restorations per month/year. Check how much time you should wait for site restoration.

Adding Website Workshops Forum

I’m looking into selection of a forum (bulletin board) for use with Build a Website Workshops as well as for my WordPress plugin. For Workshops I want something that integrates nicely with Joomla! but I may choose something different for my WordPress plugins since it needs to integrate nicely with WordPress 🙂
At first glance, Joo!BB looks attractive. However, forum.joomla.org uses phpBB. I’m guessing that this might be because they selected phpBB long ago, and it doesn’t make sense to switch even if there are better options now.
I’m going to try installing joo!BB on my BuildAWebsiteWorkshops.com site and see how it works.

Website Workshops

We’re heading off in a new direction regarding my job. God has been tugging at me to do something “different” but it wasn’t until this week that He’s told me what that is.

I’ve been thinking that I need to help small churches, and maybe small, struggling businesses to setup their website. I’ve also felt that God would show me how I can do this without sacrificing making a living and supporting my family. These two things appear to work against each other though.

I had thought at first that I could help others as a website consultant. But doing the math, I think I would need to charge $80 to $120 per hour. This is pretty much on the lower side of the pay scale for website consulting. Medium to large businesses can afford this, but I can’t see how I can help poor struggling churches and businesses this way.

I woke up the other night worrying about this, and prayed to God asking Him to show me how this was going to work. The answer came almost immediately. I’m going to start running “Website Workshops”. I’m already planning on doing something similar for the folks at my church. I’ll be teaching them how to edit the church’s web pages. Each team leader will need to maintain their own team pages.

I’m going to start offering workshops to individuals and small businesses that want to create and manage their own websites. Attendees will need to bring their laptop computer with them, and I’ll walk them through each step in creating and maintaining it. When the attendees leave my workshop, they will have a working, simple website and the knowledge on how to maintain it.

I expect to be able to do this in a half day session, but might extend it to a full day if I am underestimating things. I’m not settled on a price yet, but I’m thinking either $99 or $199 for a half day session. Every time I tell folks about this I get a very positive response, and a comments like “Ok! I’m your first customer.” I have a lot of first customers 🙂

So I’m not really job hunting anymore. I’m trying to get “Ron Lisle d/b/a Website Workshops” going. I’ll be having some free, trial workshops at the church over the next month, and hope to have real, paying workshops running by the end of March. This approach is going to allow me to work from home, eventually running workshops 2 days a month.

God is amazing. I knew that He had something really great planned for me, and I have been hanging in there waiting for Him to show me. I am so excited about this new venture. My head is still spinning. There are still those nagging doubts in the back of my head, but I’m trying to just pray those away.

God is awesome!

Web Design Consulting

After much prayer and discussions with friends and family I have decided to hang up the web design shingle. I’ll be looking at specializing on websites for small churches with limited budgets. It isn’t at all clear at this point how I will support my family, but this is the direction that I think God is leading me.

I created a website awhile back to try to help other churches with this, so I will be focusing even more on this effort. It occurred to me last night that I should include a section on open source tools also: Gimp and KompoZer for starters.

Installing Win 7 in Boot Camp

This morning I replaced my Macbook Pro’s internal optical drive. Back when it went out, I opted to be cheap and use an external drive at about half the cost of replacing the internal drive. Since then I had tried to install Windows 7 into Boot Camp using the external drive, and kept running into problems. I had attributed the problems to the optical drive being external. Now with the fixed internal drive I gave it another try.

I’ve been running Windows 7 under Parallels for awhile now. Parallels allows installation using the raw .iso file, so this was easy.

I’ve also upgraded my Macbook Pro’s internal hard disk to 500G, so I thought I’d recreate my boot camp partition since I have plenty of space now.

It turns out that the problems that I’ve been having were not caused by the external drive, but by the .iso format used by MS (this is an MSDN image). So after searching around a bit, I came across various instructions for fixing it. All of the instructions I found however required a Windows system, which I currently do not have.

I have a Parallels Windows simulator on my Mac, so I considered running the instructions in Parallels. I also found some blogs commenting that this approach had worked. However, while searching this it occurred to me that if running things within Parallels worked ok, then why did I need to bother installing boot camp, which is really quite inconvenient anyways.

The only real reason that I have for wanting to run boot camp is to get better performance for running my C&C style games. So I decided to reinstall them into an XP Parallels session and see how the performance compared to running the Mac version of the games (which isn’t very good). The results were quite good. I can run the PC version of C&C3 KR full screen at 1680 x 1050 with medium rendering settings without audio hiccups or obvious video glitches.

So I deleted my boot camp partition and will simply use Parallels 5 for running Windows XP and Windows 7. I also have a Ubuntu session. I’m a happy camper.

Back from the Holidays

The past few weeks I’ve been studying and working with WordPress and Joomla!

I’ve brought up our church and band websites on the latest WordPress, and am somewhat unhappy with the user experience that is presented to other authors (eg. my wife). This prompted me to take a look at Joomla! Lynda.com provides a tutorial on it, so I went through it. There is a steeper learning curve on Joomla! but it appears to be much better suited to supporting multiple, less skilled authors. There doesn’t appear to be as much information available (yet) on how to create and modify templates and plugins, but I’m diving in anyways.

I going to convert my BuildAChurchWebsite website to Joomla! and see how that works.