Wheatgrass

OK, I have have been getting gradually worse at taking care of myself nutritionally. I mean, I want to eat better, live healthy, and take vitamins, but I just don’t. My body continues to crave greasy foods, fat, and sugar. But there is hope on the horizon. I like Jamba Juice and there is one just below my office. I have often been curious about the Wheatgrass shots. I’m sure they are healthy (at least they sound like they are) but it just sounded so digustingly gross. In fact here’s a litte story about how my daughter feels about it:

The whole family went to Jamba Juice the other day on the way back from the farm. They have the fresh wheatgrass growing on the counter for when you order it. As we were making our decsions about what we were getting, my oldest daughter asked what it was for. I told her that they squeeze the juice out of it to make a drink. She responded, “I don’t want to drink grass, daddy.”

I didn’t make her drink any.

So, today, I got a little brave and decided I would give it a shot (no pun intended). They serve a 1 oz and a 2 oz shot. I decided that being a newbie and all to the wheatgrass crowd, I would start off with the 1 oz. They offered a slice of orange with the shot. “How nice,” I thought. So foul that you need a something afterwards to wash it down. I decided I had better go with the orange slice as well.

They cut my grass, put it in the grinder, and poured my shot. It looked like pea green soup. I picked up the cup and figured I would just gulp it down. And you know what? It was not that bad. It was an interesting flavor. Not foul as I had expected, but rather it was sweet in a green kind of a way. I didn’t feel the need to quickly grab and suck down my orange slice to wash it down.

Maybe there is hope for me yet.

Posted in Editorial | Tagged | 2 Comments

WordPress Sidebar Images Hack

In my current theme (a mod of a mod of Kubrick which is becoming less of a mod and taking on a life of its 0wn), I wanted to change the headers in the sidebar to images. This was because I wanted to make use of a typewriter font so the headers would look like this:

sidebar header image

I wanted these headers to be specific only to this theme so that I could still easily and fully switch themes. In doing this, I ran into a couple of small, but interesting “snags” that caused me to have to do a little bit of a hack to the theme. Once I got it working, I was pretty excited so I thought I would share the experience. I will actually discuss the examples on an unmodified version of Kubrick, which is the default theme for WordPress 1.5. This theme is located at /wp-content/themes/default/. I would suggest making a backup of this theme before you dig in to the hack, just in case you want to revert back for some reason.

First, I made the images for the headers I wanted using a font from: Free Typewriter Fonts. For the example, I used Teletype Regular. The headers I needed were:

  • Pages
  • Archives
  • Categories
  • Blogroll
  • Meta

The Archives, Categories, and Meta were easy. I created the image, loaded it into the /images/ folder for my theme, then made some changes to sidebar.php (located in /wp-content/themes/default/. Backup the original file if you want to be able to back out of this.) for the theme.

In sidebar.php, go to line 42 and change it from this:

  • < ?php _e('Archives'); ?>


  • to this:

  • < ?php _e('Archives'); ?>

  • This is what you are going to do for most of these. Basically what you are doing is changing from just writing the word “Archives” putting an image from your themes directory in its place. To be nice, we still go ahead and write “Archives” as the alternate text if the image doesn’t load.

    Next, we will finish the easy ones. Change line 48 from:

  • < ?php _e('Categories'); ?>


  • to this:

  • < ?php _e('Categories'); ?>


  • And line 57 from this:

  • < ?php _e('Meta'); ?>


  • to this:

  • < ?php _e('Meta'); ?>

  • Alright, easy ones out of the way. You’ve only really changed sidebar.php here and by so doing, you are able to switch to another theme and not affect the sidebar headers in that theme. Now for the tricky part.

    To get the “Pages” and “Blogroll”, WordPress uses a function that is part of WordPress and not isolated in the theme. So what we are going to do is copy these functions to sidebar.php and rename them. That way, the original functions are intanct for WordPress to use when you are using some other theme, but when you use your modified theme, you can use the isolated function to load your header images.

    I know that some of you are saying you don’t know php or how to code. It’s ok, this is going to be easy, and when you are done, you’ll feel quite accomplished!

    First, in sidebar.php, line 40, change it from this:
    < ?php wp_list_pages('title_li=

    ' . __('Pages') . '' ); ?>
    to this:
    < ?php wp_list_pages_mytheme('title_li=

    ' . __('Pages') . '' ); ?>

    Go to the folder /wp-includes/ and find a file called template-functions-post.php. If you have an unmodified version of WordPress 1.5.1, you should find this fuction at line 309. It begins with "function wp_list_pages($args = '') { " and ends at line 365 with } (just below $output;). Copy all of this.

    Now go back to your sidebar.php and above

    enter some blank lines. At the very top blank line (don’t leave any extra blank lines or you could cause a header error), put a < ?php and then enter some blank lines and put a ?> In between these tags, paste the function that we just copied.

    Go to the top of the function where is says “wp_list_pages” and change it to “wp_list_pages_mytheme“. You’ve just recreated this function so you can use it only in this theme and modify it without effecting how WordPress will work with other themes.

    Go down about 16 lines in the function to where is says $output .= '


    and change this to:

    $imagedir = get_stylesheet_directory_uri();
    $headerimg = 'Pages';
    $output .= '

    You’re almost home! Now just the Blogroll header is left.

    Now I am realizing I should have given you one little change early on so we could do it by line number, but you probably have the hang of this by now, so look for the line that says:
    < ?php get_links_list(); ?>
    (After I added all those other functions and edits, I found it at line 118. Depending on how many empty lines you added above, you should find it about the same place.)

    Change this to be:
    < ?php get_links_list_mytheme(); ?>

    Now guess what we are going to do? Oh, you are catching on. We have to go get the original function and add it to this page, then rename it. This function is found in: /wp-includes/links.php lines 516 – 567. Add this to the top of your new sidebar.php page just below the < ?php but before the function wp_list_pages_mytheme. Now change the following:
    function get_links_list
    change to:
    function get_links_list_mytheme

    About line 37 you will see a line that says:
    echo '


    Change it to:
    echo '

    That’s it! You are done. (I’ll add the images and the sidebar.php as a zip later for the lazy folks that would rather just “plug-n-play”.) Thanks for reading through my first published WordPress hack. I hope you could follow along and that you found it useful.

    Posted in WordPress | Tagged , , | Leave a comment

    Old Habits Die Hard

    I have been a web developer for some time now, long enough to say that web developers currently entering the job market were probably entering junior high when I began working with web technologies. So most of you are either too young or too new to the Internet to recall anything other than IE as a browser. Hey, I recall back in the day we were all excited about Cello so we could browse on our PCs instead of Unix. Then came Netscape. And I was one of those die hards that didn’t switch to IE for quite some time. But, reluctantly, towards the end of the 90s, I caved in. I have been using IE pretty exclusively ever since (gasp!).

    Sure, I have copies of everything else out there. As a developer, I have to. I have to know how my stuff works in other browsers. But for quite some time, cross browser testing took a back seat to other priorities because there just was very little need. I mean, hey, when 99.9% of your users come to you in IE and the rest in various other flavors, is it cost effective to test in every browser under the sun?

    Get FirefoxAnd then… a quiet revolution began. Firefox. A better browser. Great features. Integrated tools. Extensible plugins and themes. AND proper CSS! Well, could there be anything better? Well, actually yes. Something better would be for people to develop sites that used valid CSS and XHTML that looked better in Firefox than IE. And for quite sometime, they didn’t.

    But now, with exponentially more sites coming online thanks to the blogosphere, we have more use of CSS, and more users preferring Firefox. The quiet revolution is taking hold.

    Then there was me. I knew I should make the switch. But it was so easy to keep going back to the interface I was familiar with. I kept using IE. Why? I don’t know. Just a habit.

    I’m kicking the habit. It’s been tough. But I’m doing it. I’m going to stick with Firefox. And you should too. If you don’t have it, get it. It’s free. Why would you want to use anything else?

    And by the way, if you aren’t familiar with some of the browsers I mentioned early on (Mosaic, Cello, Opera, etc), check out the Web History of Browsers, you might learn something. When I say to my grandchildren, “I used to browse the Internet with Cello” it will be to them the equivalent of my grandparents learning to drive in a Model T or listening to an old Victrola.

    Posted in Web | Tagged , , , | Leave a comment

    Google Maps Again

    Something new that was added to Google Maps that is pretty slick – satellite images. If you’ve used the Google Maps and have not seen this, it is a choice on the upper right side of the maps. You can choose either “maps” or “satellite”. Some areas (like Chicago) you can zoom in all the way and get a pretty good view.

    Try mapping to your home address, then select “satellite”. It’s pretty cool.

    Or, try Googling for your phone number, then select “Google Maps”, then “satellite”.

    Posted in Web | Tagged , , | Leave a comment

    Wikipedia

    A pretty interesting tool for the web researcher is the Wikipedia. Set up as a comprehensive (and then some) encyclopedia in wiki format, you can find information on just about any topic, encyclopedic or otherwise. However, since it is a wiki, accuracy is not guaranteed. (If you’ve never heard of a wiki, that’s ok, not a lot of people have. A wiki is a web document (or series of documents) that are editable by the users at large.)

    Also as part of the Wikipedia project, there are some other useful tools, including Wiktionary, Wikibooks and Wikinews. However, because of its open nature, vandalism and inaccuracy are problems in Wikipedia. You may also wish to read with an open mind, as there is no guarantee that a particular author will have the same political, religious, or philosophical slant as you.

    Visit the Wikipedia here.

    Posted in Web | Tagged , | Leave a comment

    MRFF 2005

    With MRFF 2005 (Midwest Regional Fun Fly) fast approaching (Father’s Day Weekend), I think back to last year’s launch. Last year brought out the whole family: wife, kids, grandparents. This year will be much different as I will be without the family. Advantage: I can do both days for the weekend without the kids complaining that they’re bored or tired. Disadvantage: I plan to do my Level 1 Certification and no one will be there to see it.

    Last year, we flew “Barbie’s Dream Rocket”. Here is an excerpt of some of what I posted over at The Rocketry Forum about the rocket:

    A couple of years ago my oldest daughter, who was almost three at the time, came across a rocket kit in a toy store. She was intrigued to say the least, and I thought that, despite her young age, it might be fun to do together. She is now four and we have been building and flying rockets together since.

    She is a big fan of Barbie and the color pink. Last year, she decided that she wanted a Barbie rocket. I had recently picked up several Estes kits on clearance at Meijer so I thought we could kitbash something together. She kept asking me and asking me, “when can we build the Barbie rocket?” So one night I think we opened up one of the kits to get started. I handed her the body tube. She looked at it, looked at me, wrinked her nose and said, “It’s too small!” I asked what she had in mind. She said, “I want it to be as big as me.”

    So, that weekend we trundled off to Al’s Hobby Shop in Elmhurst to look for a kit. I showed her on the wall what kits we could pick from. She took about 15 minutes or so holding all the bags up to determine if the finished product would be taller than she was. She finally settled on a LOC Forte.

    Barbie's Dream RocketI spent last winter working on this thing. The only thing I wish I’d done different was build a baffle. It came out pretty stunning, I must say. I used a combination of paint – Krylon Pink for the body, the nose cone and fin can are metal flake automotive (which I would’ve used for the body too, but I couldn’t find any pink, the crucial color). The entire rocket was then finished in a metal flake clear gloss.

    The decals were a lucky find. I was shopping at Menard’s one night and happened across these giant sticker sets for kids’ rooms. One set was Barbie. What luck. You can see the giant Barbie in the picture. The rest is covered in Barbie hearts and flowers.

    Last month at what was supposed to be MRFF 2004 (but turned out to be non-MRFF 2004, I don’t know why… also, that’s Midwest Regional Fun Fly for you non Midwesterners.) on Father’s Day was our most recent flight. (The maiden voyage was at an NIRA club launch in May, but I didn’t get any pictures, just some video my wife was ashamed to lay claim to.)

    Barbie's Dream Rocket

    Anyway, I may have to post some pictures of my Level 1 project that will fly at MRFF 2005 (if it’s finished in time).

    Posted in Editorial | Tagged , | Leave a comment

    WordPress Themes

    The abundance of site themes is another reason for the continued popularity of WordPress. If you are design impaired, there are freely downloadable themes available that you can easily manage through the WordPress admin. (In English, for the not so technically inclined: You can change the entire look and feel of your blog with a single click.)

    Good places full of free themes:

    Also, Urban Girhaffe has a good set of tutorials for working on your own theme. He begins by dissecting “Kubrick”, a popular WordPress theme that ships with the default WordPress installation, stripping it of its style and using that as a framework to build your own theme.

    Google Search for WordPress Themes

    Posted in Web, WordPress | Tagged | Leave a comment

    WordPress Plugins

    One of the great things about WordPress is the plethora of plugins available. This is a benefit of working with open source software that has a big following.

    Here are some good places to get started looking for plugins.

    Google Search for WordPress Plugins

    There are some prettey cool plugins out there. Good luck and happy blogging.

    Posted in Web, WordPress | Tagged , | Leave a comment

    The Weather in Space

    Didn’t know there was a weather forecast for space, did you? Check out spaceweather.com for the latest and most complete weather report for… you guessed it! Space.

    Why would this matter, you ask? Sun spots, solar winds, solar flares, and other occurances in space have a profound effect on the earth and its own weather. Sun spot and flare activity have been known to knock satellites and other electronic devices out of commission. Also, in case you are a “chicken little”, there are reports for PHAs (or Potentially Hazardous Asteroids). If you or your friends are planning a trip to planet or celestial object in our solar system, it would probably be a good idea to be aware of solar winds and solar flares. The resulting radiation could be fatal to you without the protection of the Earth’s atmosphere. For skywatchers, we see solar activity in the form of Aurora Borealis (Northern Lights). Spaceweather.com conveniently has an Aurora Report so you’ll know whether you should bother staying up past bedtime or not. There is a plethora of links to related news, space weather, and information that will teach you all you needed to know about the weather outside our atmosphere.

    All in all, a very interesting site with useful information. A must have in your bookmarks (or favorites).

    Posted in Web | Tagged , , | Leave a comment

    WordPress

    Go figure I almost didn’t write about WordPress. I guess I thought because this blog is powered by WordPress, it wouldn’t really need any further notice. But then I thought some more and figured that I may actually have a series of WordPress posts. I’m working on a couple of themes (just mods of Kubrick, actually) and may try my hand at a couple of plugins.

    I’ve been a fan of WordPress since it emerged from being called b2. If you are a blogger, consindering being a blogger, or just like nifty web tools, WordPress is worth a gander. I’ve tested a number of blog tools and found WordPress to be the best, IMO. Now I should say that I only tried free/open source tools so I didn’t consider Moveable Type, which I hear is very nice. And I have more than one place to host my blogs, so I didn’t have to consider the cost of web hosting. If you want totally and completely free, you probably should go to Blogger. It’s not a bad setup and has lots of support (hey, with Google standing behind you, how can you go wrong).

    If reliability of your web host is not a factor, you can probably find a free web host. You’ll need one that has PHP and mySQL available to you. I feel like “you get what you pay for” and if it’s free, don’t expect 1. your site to be up 24/7 with 99.9999% uptime and 2. a lot of support. You should be able to find a web host for about a small blog setup for about $5 – $10 / month. If that’s the case, then I’d say definately consider WordPress. It has become evermore popular since its earlier incarnations. Due to its popularity and the fact that it is open source, there have been a great many improvements and there are a wide variety of plugins available. The ease and availability of themes means that you can make it look like whatever you want with ease.

    The current version, 1.5, continues their tradition of the “5 minute” install. And I would say that if you are even technologically challenged, as long as you can read, you should have no trouble installing WordPress and be blogging in a matter of minutes. (Of course, for those with a weak stomach when it comes to software, you could always find webhost that offers to set it up for you.)

    Version 1.5 available here.

    Posted in WordPress | Tagged , | 1 Comment