Google Chrome – Full Screen Kiosk Mode

Here are steps for running Google Chrome in full screen Kiosk Mode on a Windows PC:

1. Right click on your Desktop and go to New > Shortcut

2. Browse to the chrome.exe file (depending on your set up, it might be found here: username\AppData\Local\Google\Chrome\Application\chrome.exe) and click Next

3. Type a name for the shortcut (ie “Chrome Kiosk Mode”) and click Finish

4. Right click on the new shortcut on your Desktop and go to Properties

5. At the end of your Target replace chrome.exe with “chrome.exe –kiosk http:// [enter URL here]” and click OK

6. Double-click the shortcut on your Desktop and it will launch the full screen Kiosk

7. To quit the Kiosk, press Alt + F4 on your keyboard.

Awesome WordPress Feature of the Day: Add Theme Support

This has become one of my favorite features when I build a new WordPress theme. It seems like such a simple thing, but when I started coding my themes with this function in mind everything melds together so nicely.

My favorite new function in WordPress is Add Theme Support.

As a developer, one of my favorite things to do is write reusable code. I love when I start a theme and find it needs some bit of functionality that I wrote for something else, if all i need to do is include a file and make a couple strategic edit my job just got easier. Here is a quick example. Imagine you have a custom post type for events ( just an example, I have no code to back this up, sucks I know). If you create your event post type in a class, you can use the current_theme_supports method to check and see if you need it, and your class does the rest!

if(current_theme_supports('event-post-type')){
add_action("init", "jmh_event_post_init");
}
function jmh_event_post_init() {
global $event_class;
$event_class = new event_post_class();
}

So if you build a lot of themes, set up a single folder with an init file. include all your files there, organize it, then your functions PHP will just need to start off with a couple things:

add_theme_support('event-post-type');
require_once('your init php file');

Speed Up & Improve iPhoto ’09 Performance

Okay, since I updated to iPhoto ’09 (yes, I realize it’s currently 2010), I noticed a huge lag in performance upon opening the application.  Not only would it take long to load, but once the interface came up, if you tried to click around with your mouse, the rainbow wheel of death would start spinning.  Nobody likes that.  Follow these steps to improve and speed up iPhoto performance:

  1. Option + Command click the iPhoto application
  2. A box will pop up entitled: Rebuild Photo Library
  3. Check “Reclaim unused disk space from databases”
  4. Click “Rebuild”
  5. Checking any of the other ones doesn’t hurt either, it actually speeds it up even more.  Give it a try!

Also, if anyone has any additional advice or tips, please feel free to share.

Enable Multi-Site in WordPress

WordPress merging with WordPress MU makes an awesome software package even better. The issue now is, how do you turn on the multi-site functionality? If you are like me and find yourself forgetting that one line of code needed to kick off the setup of multi-site within WordPress. Then you made it to the right place, because for your benefit and mine I have taken the time to write down the steps involved. The first step is to install WordPress so be sure to head over to WordPress.org for the latest version and then do a standard install of WordPress. Once you have WordPress up and running you can enable multi-site in just a few quick steps.

1. Add the following to the wp-config.php

/**   MULTI-SITE SETUP   */
define('WP_ALLOW_MULTISITE', true);

2. Navigate to Tools > Network and choose your install type

You will have to choose what kind of network you want to run. Your choices are either Sub-directory setup or a Sub-domain setup. These choices affect how the addresses of your sites look.

Sub-directory
This configuration means that all your blogs/sites created within WordPress are extensions of your domain. So if you were using the domain myawesomesite.com then your blogs/sites within WordPress would all have domains like:
myawesomesite.com/siteone
myawesomesite.com/sitetwo

Sub-domain
This configuration does require some extra DNS work meaning you will need to setup a wildcard DNS record. With this setup each new blog/site in WordPress becomes it’s own sub-domain of the top level domain that was used to install WordPress. So if you installed WordPress on the url myawesomesite.com each new site’s domain would look like:
siteone.myawesomesite.com
sitetwo.myawesomesite.com

Once you have chosen the setup you want to run enter your network details and hit install.

3. Finish up the network install

There are a few things that you need to do manually to finish the install.

Create the blogs.dir directory
Create a new directory in the wp-content folder called blogs.dir, this directory will be where all your sites uploaded content is stored.

Edit wp-config.php
WordPress will generate some new settings for you to add to your config file. These settings are specific to your network. For the myawesomesite.com setup they would like this:

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'myawesomesite.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

Edit or create the .htaccess file
If you already have a .htaccess file setup then you will just want to edit the area the contains WordPress rules. If you don’t have a .htaccess file go ahead and create one. Now all you have to do is copy in the settings provided by WordPress, save the file and you are done. This is an example of the code generated by WordPress:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

4. Remove the Tools > Network menu option

Once you have your network setup you can remove the menu option simple by commenting out the enable multi-site option in your wp-config.php file.

/**   MULTI-SITE SETUP   */
//define('WP_ALLOW_MULTISITE', true);

Organize your dock by adding spacers in Snow Leopard

There is nothing like a shiny new mac and if you are like me, then you start with a fresh install rather then cloning your old machine. Since the dock on the new machine was not setup the way I like it a had to make a few changes and one of them is to add separators between applications. I do this to group like applications together. So to get started the first thing you will need to do is open Terminal on your Mac.

This is what my dock currently looks like.

Terminal can be found in: Applications > Utilities

To add a separator to the left side of the dock

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

To add a separator to the right side of the dock

defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'

Each time you run one of the commands above it will create a new separator but you need to restart the dock to see them. To do this just type this into Terminal:

killall Dock

Backblaze Icon Missing from Menu Bar in Snow Leopard

Long story short, Backblaze is awesome!  Up until I lost my Backblaze icon from the menu bar in Mac OSX Snow Leopard.  I researched online a little and couldn’t find an easy method of fixing the issue.  With that nifty little icon missing, I worried if it were working at all – all those precious photos, video and digital memories gone?

By going into the Backblaze settings in your System Preferences, you can select the check box next to “Show Backblaze icon in the menu bar.”  However, every time I checked the box, the icon would not come back.  And upon return to the preferences, the box remained unchecked.  A mystery?  Yes, indeed.

Therefore, I contacted customer support and they gave me a quick and easy solution that made my day.  Try the following steps below to fix the mysteriously missing Backblaze icon from the menu bar in Snow Leopard.

  1. Click on the Finder
  2. Press Command + Shift + G
  3. Enter /Library/Backblaze in the text field and press “Go”
  4. Right click on the folder “bzdata” and Get Info (or press command + i)
  5. Change the permissions, so that all users have “Read & Write” permissions.
  6. Then click the gear icon and select “Apply to enclosed items..”
  7. If the Backblaze icon doesn’t show up on the menu bar, follow steps 1-3 again and this time double click “bzbmenu” and this will place the icon in the right spot.

First Impressions: Genesis Theme Framework

Lately I’ve been doing a lot more work with WordPress, and it’s given me the opportunity to work on lots of different themes and theme frameworks. Given the choice I would much rather start a new theme from scratch. Of course “from scratch” means using one of the many starter themes people have put together, recently my favorite being BLANK from the Digging into WordPress Theme Clubhouse. However when working in a production environment I’ve found it beneficial to find a framework and stick with it. That way projects get done faster, everyone uses the same codebase, and clients all get a similar experience.

Enter the Genesis Framework from StudioPress. As soon as I got a look at how the framework is built I was instantly impressed. First, it has several great features that are helpful to both developers and users. It offers automatic updates, great security, customizable theme settings, custom widgets, plenty of layout options, and the list goes on. There are a lot of frameworks out there that give you similar things, but Genesis has some really cool features for developers too.

For starters, the theme is fully compatible with all the new features in WordPress 3.0. StudioPress was quick to add those features for their users, and that kind of dedication to their product is a huge value. Another great value for developers is the themes construction. They have built Genesis to be a starting point for child themes, allowing for radically different sites without having to do the same edits to the main theme over and over again. To help make a child theme as customizable as it needs to be in order to be successful, they have built in plenty of hooks to do whatever you need. If you want to add a widgetized area above the footer, it’s easy. You need an add area above the content, it can be done. Anything you can think of you can do. Proof of this is easy enough to find, since from what I can tell every theme that StudioPress has available is a child theme of Genesis.

On top of all this, StudioPress has an active community of users and developers on their forums that can offer help to any problems people come up with. I think anyone who really uses WordPress knows how important an active community can be.

To wrap this up, I can simplify my first impressions into one word : awesome. I’m really looking forward to building some cool stuff on top of this theme framework, and when I do i’ll be back writing a post about it.

Displaying custom post types on your WordPress blog homepage

So you have created a great new custom post type in WordPress 3.0 but it doesn’t show on your homepage. To add your new post type to the homepage you could use the following code in your functions.php. As you can see this code sets all the post types you would like to have displayed by using the pre_get_posts filter. I think using the filter would be great but currently it breaks the new menu’s in WordPress 3.0.

add_filter( 'pre_get_posts', 'my_get_posts' );

function my_get_posts( $query ) {
	if ( is_home() )
		$query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote', 'attachment' ) );

	return $query;
}

So to add your custom post types into the your blog homepage you can put this code just before the WordPress post loop. The following code adds in the post types you would like to use and also checks to make sure your paging still works.

array( 'post', 'linkpost'),'paged'=>$paged ) );
}
?>

if you want to read more about the first piece of code you can check it out on Justin Tadlock’s blog.

WordPress Hosting

Think2Loud had been on shared hosting for just under two years, before I finally decided to take the leap and set up my own server. A few months ago I was reading a blog post by WooThemes about their new hosting setup. After reading about their insane hosting setup, I started doing a little research on VPS.net and came across a great article on Yoast.com about WordPress hosting. So going by what WooThemes had recently setup and what Yoast recommend, I moved Think2Loud to a VPS.net Cloud Server. I couldn’t be happier with the results. Not only does VPS.net have a great product for hosting WordPress but they are also extremely helpful and quick to respond to questions. So if you are looking for new hosting, be sure to check out a VPS.net Cloud Server.

VPS.net WordPress Hosting

Think2Loud doesn’t yet need the power that Yoast.com is running on. I got a VPS.net Cloud Server with the following setup on it, and what’s more, I did it all on my own. Yoast mentions in their WordPress article that if you buy 6 nodes or more, VPS.net will set you up with exactly what they have. Since Think2Loud currently only has about 15K visits a month, I couldn’t justify that much power. With some help from the VPS.net forums and following Yoast’s setup list, this is what I have running:

  • 1 Cloud Server at VPS.net, (2 nodes at the moment, tried 1 and there was just not enough RAM)
  • Centos with CPanel in the Atlanta cloud
  • replaced Apache with LiteSpeed (this really is easy )
  • installed APC so I could do database and output caching with the W3 Total Cache plugin
  • and of course a CDN. I went with MaxCDN because they were the best deal I could find

Pretty simple, right? Now there are a few things that I would like to share with you about VPS.net and the setup they have. I couldn’t find this info anywhere on the web but you may find it valuable. I know it made my day once I signed up and got started.

  • CPanel and WHM are monthly add-ons and VPS.net does the licensing.
  • LiteSpeed is also a monthly add-on and has a CPanel module. VPS.net also takes care of the license.
  • TThere is a small fee for there snapshot service. (Get it! you can never have too many backups).
  • I also setup Rsync on my server with the help of VPS.net. Again, there is a small fee, but it backs up everything.

That’s it! With just a little work, you can have one lean, mean, WordPress hosting machine. Be sure to check out the WordPress hosting article over at Yoast.com, and I would like to thank them for pointing me to a great hosting service.

How to see if a Post in WordPress has an Excerpt

On the single post page for our posts, we wanted to display the excerpt only if one had been entered. Since the built-in WordPress function to get the excerpt for a post will automatically generate one for you, we couldn’t just put the function in our post loop like what was done below.


	
>

Doing this causes the intro of the post to show twice, once from the auto-generated excerpt and once in the post content. To fix this, we added a quick check to the post loop. Simply replacing the_excerpt function in the post loop with this little piece of code removed the double intro.

post_excerpt) ) {
		//We have a excerpt so print it
		the_excerpt();
	} 
?>