Invisible Window launches WOW!
Posted on March 29, 2007
Filed Under Projects, Web development
In a joint project with the fine folks over at JoMotion, Invisible Window just launched a sub-site for WOW! a internet, cable, and phone provider in the upper mid-west. The new site www.wowusnow.com solicits video commercials from WOW!’s existing customer base, so if you live in Illinois, Indiana, Michigan, or Ohio and video is your thing, pop on over to the site. The winner will receive all kinds of prizes in addition to their commercial being used on the air.
Widgets? How to make your theme Widget Friendly.
Posted on March 21, 2007
Filed Under Web development, Wordpress
What are Widgets anyway? I asked myself this question quite a few times while searching through various Wordpress blogs and continually seeing them referenced. It turns out that in a nutshell Widgets are little pieces of code that modify your default Wordpress sidebar. Bloggers have been modifying their sidebars since discovering Wordpress, but with Widgets this can be done easier, quicker and without ever touching a line of code. Want to display the latest three posts in your side bar - not a problem. Want to list all of your static pages, simple as well. All of this functionality is yours once you install one simple plugin. Oh and did I mention that you can do all of this without ever touching a line of code - I did, didn’t I?
First off you are going to need to install the plugin cleverly it’s called WordPress Widgets. Download and unzip the Plugin then install it . There is good documentation included with the Plugin and you should read that, but we all hate reading documentation so…
Make a directory called widgets in /wp-content/plugins/ then copy the 4 files from the plugin (delicious.php, gsearch.php, widgets.php, and rss.png) into that folder. Now activate Wordpress Widgets by going to your Wordpress admin -> Plugins and clicking the “Activate” button located next to “Wordpress Widgets”.
When I installed widgets, I was already using a Wordpress Theme that was safe for widgets. There are a ton of “widget friendly” themes out there, but if you happen to not be using one of them fear not, you can make your theme widget friendly. In the plugin zip there are two folders (classic and default) they each have a functions.php and sidebar.php file in them. If you are using defualt or classic for your theme - just uploading these two files will make your theme widget friendly but if you have modified your files in any way (like by including pages or manually hacking at the code) you will have to re-do your modification. If you are using some other non-widget-friendly theme, these two files will serve as the basis for your customization.
First off you will need to create (or edit if you already have one) a functions.php file in your themes directory (/wp-content/themes/your theme name/). Add this code to functions.php:
< ?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '', // Removes
‘before_title’ => ‘
‘, // Replaces
‘after_title’ => ‘
‘, // Replaces
));?>
Then within sidebar.php place the following code:
< ?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
after
- That’s about it - upload your new side bar and functions file and you should be good. Rumor has it that in future Wordpress releases, Widgets will be part of the core functionality. After using Widgets for a while, it’s easy to see why.
Wordpress 102
Posted on March 13, 2007
Filed Under Web development, Wordpress
This is the second in a series of lessons about how to use Wordpress as a full-featured Content Management System. The first post, Wordpress 101, of this two-part lesson is located here. Wordpress 102 will continue on where that one left off and we will address:
- How to utilize unique pages, with a unique layout
- How to include “pages” in other areas of your template
- How to make a portfolio with thumbnails and full size images
- Customizing the Templates
In the last tutorial, we discussed how to set your home page as a unique page - and how to rename and link to your blog. Chances are good that if you are going to run an entire site through Wordpress, there will be more to it than just home and blog. What we need to look at now is how to create a “Page” and how to link to it in our navigation.
You’re going to need your favorite text editor again, we’re going to create a new template. Open page.php which should be located in (/wp-content/themes/YourTheme) add the following code at the top.
/*
Template Name: About
*/
?>
Save this page as about.php and upload it to your server.
Next, log into your Wordpress admin section and click on “write” then “write page”. Give it a title (let’s call this one “about us” and fill in some content). In the side bar you will see “Page Templates” click on this and select “About”. Now your “about us” page is using this new template - you can modify this template to your liking.
Now not to get too deep into template modification, but what if you wanted to put a little bit about yourself in the side bar of your about us page? Now you could certainly open about.php (that we just created) and insert your html code, save, and upload. That would work, but it kind of defeats the purpose of a CMS, which is to have all of your site’s content update able via the CMS and not by editing files.
A nifty little plugin called Improved Include Page will take care of this for us. First download the plugin and install it - there is great information on how to install this plugin (and how to use it for that matter) on the download page. So we won’t go into the specifics here.
Got it installed? Good, let’s keep going…
Yet again we are going to start with making a new page in the admin. Create a page, make the headline your name and in the body just type your contact information. Save your changes. For our purposes, we will need edit sidebar.php (the Wordpress Codex has great information on modifying sidebar.php), again this can be found in your theme (/wp-content/themes/YourTheme) directory. Now go to “Manage” and click on “Pages” - the first column has each page’s unique id. Copy (or write down if your old school) the ID of the page you just created (it will be in the column labeled ID). Also make note of the ID of your about us page. Got those two numbers? Good, let’s open sidebar.php in the text editor. At the bottom of the file just inside the tag place the following code.
if(is_page('8')) if(function_exists('iinclude_page')) iinclude_page(12,'displayTitle=true&titleBefore=
‘);
?>Where I have the number 12 you need the ID of your new page (page snippet) that has your contact information. Where I have the number 8 you will need the ID of your about us page (parent page).
What is this code saying? OK, let’s take a look.
if(is_page('8'))
says if this page has the ID of “8″ then do the stuff that’s to the right (more on these conditional statements within Wordpress can be found on the Codex).
This code
if(function_exists('iinclude_page')) iinclude_page(12,'displayTitle=true&titleBefore=
‘);
Says if we have the function “iinclude_page” (which we do, cause we installed the plugin) include page ID 12The rest of the stuff is formatting - and if you care to delve into that, it’s all explained on the plugin download page. If you browse your site now, you should have your contact information included in the sidebar of only your about page. Cool huh?
These two pieces of information should allow you to accomplish 99% of the things you’ll want to do with your site. If you’re anything like me, though, you’re scratching your head wondering about that other 1%. So let’s look at one of those “other” things that a site might need. For my purposes, I also needed a portfolio (so that’s what we’ll address here).
I looked and looked for an “easy” way (that is to say plugin, widget etc) of doing this, but every time I started heading down a path, I would dead end into something that didn’t sit well with me. When things like that happen, it’s time to open the text editor and do it on our own. My idea was to have small images displayed in the sidebar that would link to a page containing a larger image and a description of the project. Since it wouldn’t be appropriate on all pages, I only wanted this to happen in the “portfolio” section. Now admittedly the rest of this is kind of a hack as it will require using a mix of FTP/code editor/wp-admin to update this section, but it works and sometimes that is the most important thing. Now someone who wanted to spend time with this could definitely turn this into a Plugin or a Widget - and if that someone is you, please let me know. With that being said, let’s hack!
First, let’s create a new page template for everything in our “Portfolio” section. Crack open your text editor and open your about.php file (provided you have done this tutorial from the start, you should have this file, if not - just read above and create a portfolio.php file). In the top of the file where it says:
/*
Template Name: About
*/
?>
Change to
/*
Template Name: Portfolio
*/
?>
Save this file as portfolio.php, upload (/wp-content/templates/your template name/portfolio.php) and voilla, a new template is born. Now let’s go to the admin section and create a page using this template. Eventually, you’ll probably want images and all kinds of cool things in your portfolio, but for now, just create a page, type some content in it - assign it’s page parent as “Portfolio” (after all, portfolio pages should be in the portfolio section) and lastly, but VERY IMPORTANT make the page slug the name of this page/client ie “clientname” (no spaces - no caps - that’s the important part) - more on that in a bit. Save this file and publish it.
We’re going to create a new sidebar include file that will only be used on our portfolio.php template. This will allow all pages with in our “Portfolio” section to use the same sidebar - which will be a different sidebar from the sidebar used for the rest of our pages. Open up your sidebar.php file (located in /wp-content/themes/your theme name/sidebar.php) and replace the code that is in it with the following (basically this code reads through everything in a directory - outputs all of the files contained within it to an array then echoes out that array):
Save this file as portfolioSidebar.php and upload it to your themes directory (you know the link by now, right?). In order for this to work, we need to tell our Portfolio template to use this sidebar and not the “normal” one. So open portfolio.php in your editor again.
look for this code:
and replace it with this (thanks again to the Wordpress Codes for this little bit of knowledge):
Save portfolio.php and upload it - now your Portfolio section has a unique side bar. Don’t look at it yet though, cause we’re not done. If you stop here, you will get an error message.
Our files should be good now, and we’ve created some content for the page - let’s get to making the image show up and having it link to that page. Open your FTP application, create a new directory in /wp-content/templates/your template name/
called “portfolio” this is where you are going to upload the thumbnail images that you want displayed in your side bar. Now make a thumbnail image and upload it (you’re on your own here) - name it as you slugged the page above (this is IMPORTANT - the slug and file name MUST match) ie clientname.jpg. That is it - if you view your site now and go to your portfolio section, you should see images in your new side bar and those images should link to their pages.
I think that wraps it up for Wordpress 102. Please let us know if you have ideas for a Wordpress 103 and happy blogging!
Media Temple - nice recovery!
Posted on March 13, 2007
Filed Under Media Temple
At 10:20 local time this morning, I was working on some content for the site when I suddenly couldn’t post…the site seemed to be down. We host with Media Temple and their blog had the following post:
Web, Email and FTP segments unavailable on (gs) GRID.Cl
Incident Tracker status: HIGH view incidents »
Web, Email and FTP segments unavailable on (gs) GRID.Cluster.1
Web, Email and FTP segments unavailable on (gs) GRID.Cluster.1
Tuesday, March 13th, 2007 at 8:29 amAs of 9:20am this morning, web, email and ftp segments on (gs) GRID.Cluster.1 are unavailable. Our systems engineers are currently working as quickly as possible to resolve this issue.
We sincerely apologize for this inconvenience.
Thank you for your patience and understanding.
30 min later - all back up and running. Good Job MT! And for any of you out there that might have noticed the site was down, our apologies.
UPDATE: the server went up and down and up and down for a few more hours - i would like to switch to “ok recovery”.
Invisible Window’s Top 10 Web Development Applications
Posted on March 2, 2007
Filed Under Projects, Web development, Wordpress
I realize that top 10 lists are all the rage, and that is all fine and good. Typically this is not the type of post I would write, but after purchasing a new application called CSSEdit this afternoon and playing with it this evening, I am inspired, so here we go:
Invisible Window’s Top 10 Mac Applications for building standards compliant web sites.
TextMate (macromates.com) The opening sentence on TextMate’s site puts it pretty perfectly “TextMate brings Apple’s approach to operating systems into the world of text editors.” One of the hardest things about Switching to a Mac was finding a good editor for writing (X)HTML and PHP code. TextMate has all of the features I was looking for, including custom color coding and a project viewer. At €39 (~$50) it’s not the cheapest editor out there, but In my opinion is one of the best.
Photoshop (adobe.com/products/photoshop/) From creating designs to cutting up design comps to optimizing and editing images - I am really un-aware of any application that competes with Photoshop. It is the industry standard, has been for years, and doesn’t have a real competitor. At $650 it is not cheap, but most developers will agree, bite the bullet - this is one application you’re going to use.
CSSEdit (macrabbit.com/cssedit/) This application inspired this post. Traditionally the job of editing CSS (or most any file type) fell to the text editor - developers have successfully edited CSS with text editors like TextMate for years. CSSEdit takes a different approach in that it was designed with one thing in mind - to edit CSS. CSSEdit does this perfectly and has many features that make building standards driven web sites much easier. One of the most helpful features is the ability to preview the page you are editing and see which declarations affect a highlighted area. Go buy CSSEdit, it will be one of the best $29.00 you’ve ever spent.
Transmit (panic.com/transmit/) The nature of building web sites is that eventually, you’ll have to move files to a server (otherwise it’s really hard for the world to view your work). In order to do that, you’ll have to have a FTP application. Transmit has a slick user interface and works flawlessly. You can buy Transmit for $29.95.
Firefox (mozilla.com/en-US/firefox/) Truth be told, in order to build a proper site, you’re going to have to look at your work in quite a few browsers (on at least 2 OSs). Through use and surfing, you’ll pick a favorite to use for your “normal” browsing, for me, that browser is Firefox, although I also have Camino, Flock, and Safari loaded on the Mac - and have a PC so that I can view sites in IE. One of the nicest things about browsers (other than bringing us the web) is that they can be downloaded for free!
Adium (adiumx.com/) Web developers tends to be a collaborative lot - email works - but IM works faster. The problem with IM is that every different service has a different application and everyone I need to stay in contact with tends to be on a different service from everyone else. In the past, this meant many different clients all open - all taking up valuable desktop space. By supporting all major IM services (aside from Skype) in one handy application, Adium simply rules. Oh yeah, and it’s free.
Terminal (/Applications/Utilities/Terminal.app) I am old-school, I’ve been developing websites since Vi was standard. Sometimes it’s just quicker to do something on the server rather than mess with FTP, edit, re-FTP etc. Terminal is built right into the Mac framework (and rumor has it that Leopard’s terminal will feature tabbed sessions).
Flash (adobe.com/products/flash/flashpro/) Being a fan of standards compliant web development, full on flash sites are not my cup of tea, but often times using flash as a supplement really enhances a site. Originally developed by Macromedia, Adobe now distributes Flash. Adobe is synonymous with two things, excellent quality and big price tags - Flash will set you back nearly $700 - yikes!
HyperEdit (tumultco.com/HyperEdit/) HyperEdit is a great text editor and could easily satisfy all the needs of a savy web developer. I stumbled upon HyperEdit after using TextMate for quite a while and was un-willing to switch. So what puts this ap on the list? HyperEdit has a PHP compiler which allows testing and de-bugging of PHP code without the need to transfer a file to the server. HyperEdit is a great time saver. You’ll quickly recover the $19.95 it sets ya back.
iTunes (apple.com/itunes/) So strictly speaking iTunes won’t help you build a website. But who wants to develop in silence? iTunes is a great ap, and we all know that.
