Monthly Archives: November 2007

Powerful WordPress Include Hacks

14
Filed under Web and Tech Helps, WordPress

Customizing WordPress to function as a full-blown Content Managed System is really not that difficult. If one takes a little time and does some research you can extend it in some pretty nifty directions.

One simple and powerful function is to use an if statement to test a condition for a specific page and then include a file if it is true. This enables you to post a graphic or have a block of text show-up in locations on the page that are not defined explicitly within a sidebar for instance.

First example, the simple conditional include file

If I wanted a button, block of text or any other feature to show-up just in the sidebar, header or any other part of the page, I could slip-in this short piece of code:

<?php if (is_page(‘portfolio’))
{include(‘wp-includes/includedfile.php’); } ?>

The first line "is_page" is followed by " ‘portfolio’ " which delineates the page on which it should show-up. If I wanted it to show on the home page, it should simply be "is_home()". The path "wp-includes" is where I decided to stick the included file and "includedfile.php" would be renamed to a relevant file name for its purpose. The file would be a standard php file format, which can be as simple as a text file. This example assumes that you are using a permalink structure such as simple /%postname%/ as apposed to a number ID.

Second example, include file for a section of your site

 If we decide to get a little more estute and have a multi-tiered site with sub-pages, we can have the sub or child pages of the Portfolio page include a file. This could be a breadcrumb navigation or an image for instance.

<?php global $post;
if ($post->post_parent == 33 )
 {include(‘wp-includes/includedfile.php’); } ?>

In this example the parent page is necessarily delineated by the page ID even if you are using a different permalink structure. The "==" asks a question in an integer format meaning it’s asking a mathematical question; is the parent’s ID 33? If the answer is yes, then include the file, if not then ignore. (The page parent is assigned to the page when writing or editing the page in the right-hand column).

These are just a few quick examples of how to extend a template a bit with some very basic php code. For those very new to coding, this may be a bit cryptic, but if you need some help or have any questions fire away as I’m always glad to help.

Gotta Tell You About My Tele

8
Filed under Just for Fun

Today, while wondering in a guitar shop to pick-up a 4th string for my acoustic guitar, a beautiful red metallic telecaster look-alike flew into my hands. OK, so it didn’t happen exactly that way. But once I got my hands on this beauty I knew my long desired dream for a red metallic Tele had come to fruition. Technically it’s a Samick Signature Guitar but for all practical purposes it’s built to be a very nice Fender Telecaster for a much cheaper price.

For those of you non-guitar playing friends who don’t salivate over music instruments like I do, the telecaster is a legendary guitar. And in my mind, a metallic red Telecaster with white pick guard is the quintessential classic rock guitar. In fact it was the telecaster that popularized the instrument.

Recently in Fastcompany’s October issue on Masters of Design there’s a great quote in the print edition from David Lubars, BBDO on the Telecaster. He said, "I love Strats and Rickenbackers and Les Pauls, but there’s something so reductionist and beautiful about a Tele – in looks and sound."

I couldn’t have said it better myself. I absolutely love this well designed classic instrument. Even playing it unamplified produces a beautiful sound. Telecasters are the no-frills electric guitar but the sound they produces is so classic and so perfect for the various genre of music I tend to play.

For one who’s played guitar for almost 25 years, I’ve actually shown quite a bit of restraint from going hog wild with guitar collecting. In fact the last electric guitar I owned was a black Peavy which I sold twenty years ago. I still own my second guitar, a twelve string Yamaha and a very nice nylon string guitar from Spain.

I really have few regrets in life and those are the guitars and pick-up trucks I’ve sold. I have a feeling this new friend will be with me for many years to come.

 

Powered by ScribeFire.

Thanksgiving, We Have Much to Give Thanks

6
Filed under Just for Fun

I enjoy holidays. The break from work is always welcomed time with family and friends and of course great food. But holidays remind us of  our history and the blessings of our present life. Thanksgiving is perhaps my favorite holiday as it seems to have stayed true to it’s roots.

There is certainly many folk who enjoy the afternoon football game, while nothing wrong with it, little is truly related to thankfulness. Black Friday follows after but that I attribute to Christmas which is so off course from it’s original intent.

Ah, but Thanksgiving, the day when no gifts are exchanged except the gift of one another and good food and drink. How splendid a holiday to stop and reflect on all the many blessings we’ve been given.

Some things I’m truly thankful for:

  1. My very lovely and patient wife. I’m very blessed to have her.
  2. Three beautiful, smart and imaginative daughters. They are working on developing a thanksgiving video which I’ll post when it’s completed.
  3. I have great sources of income. On a global scale I’m incredibly wealthy with *half the world living on less than two dollars a day.
  4. I can read. *Almost a billion people around the globe aren’t literate.
  5. Clean water to drink and clean air to breathe. *Over a billion people don’t have access to clean water.
  6. Reliable transport. Our two vehicles with a collective mileage of 300,000 are running well.
  7. A new home computer network that gives working from home a new meaning and competition for computer time a reprieve.
  8. The fresh northerner that blew in last night just in time for Thanksgiving. I love Texas weather that way. It will be back in the seventies within a week.
  9. Vacation days to turn an extended weekend into a Fall break.
  10. Great family experiences this year in the mountains of Colorado and New Mexico, at the beach along the Texas coastline and numerous jaunts through the Texas Hill Country.

This list could be ten fold, but I’ll spare you from wading through it. What are things you are thankful for?

*(Stats taken from globalissues.org)

Powered by ScribeFire.

WordPress, Much More than Blogging Software

9
Filed under Web and Tech Helps, WordPress, new website

More and more in real world development projects I’m finding WordPress to be a robust Content Management System that is very configurable for developing small to mid-size websites. The functionality and extensibility of WordPress is ever increasing for rolling your own CMS.

In addition to my continued development of ets-lindgren.com, the main website for ETS-Lindgren, I’ve been a busy beaver at work on some key projects. In October we launched a new marketing initiative for WiMAX Radiated Performance Testing (WiMAXRPT) which entailed a website and flash video launched from conception to production in a couple of weeks using a WordPress platform at wimaxrpt.com.

A Prime Example of a WordPress Project

As a freelance project, I’ve been tasked to revamp the site onedayacademy.com. The current site as of this posting is quite common to many web 1.0 sites, created with online tools with static information to distribute information:

The initial visual prototype starts with a stream-lined, clean and reductionist approach. While the end result may go through some cosmetic adjustments, this basic design gives me the basic architecture and layout to start the development process.

When I started into this project, I by-passed WordPress. My initial research was centered on Drupal, Joomla and other CMS platforms. As I delved more into the scope requirements of the site and potential extensibility of WordPress, WordPress emerged as the leading contender for the project.

I’m certain there are many developers who would argue otherwise. But here are a few key factors in my decision:

  1. I know WordPress very well. While you could call it a cop-out, given my short time-line it looks to be a solid choice for the development of this specific site.
  2. WordPressMU. WordPressMU is a very powerful install of WordPress that allows a non-techie admin to setup new users and blogs on the fly. This was a critical requirement for the site. Being an academic environment, it allows all faculty members to have their own website/blog.
  3. The WordPress community is impressive. I’m blown away by the rapid development of new plug-ins and functions being rolled daily in the community. The developer community is a huge factor in selecting any CMS platform.

So there you have it. I’ll be blogging some of the step-by-step processes to developing this site as I go along. This may prove instructive for some and certainly handy as one persons process for developing a project.

What are your development experiences with WordPress or other CMS platforms?

Powered by ScribeFire.

Old Friends, New Friends

8
Filed under Just for Fun

It’s amazing how an inanimate object can become such a familiar friend. Yesterday I had the realization that coffee and I need to part ways for good. In the last couple of weeks I have had a few cups. It was part an experiment and part just enjoyment of the drink. The addiction, if it’s still there, did not feel intense. At this point, it’s not an agonizing reality, but rather just a reality; I am no longer a coffee drinker. I’ll spare you the gory details, but my body does better without it. So, so long my morning, get me up early friend.

Another old friend that I’ve recently made the re-acquaintance is the song "Blackbird" by the Beatles. I mentioned it in Appeasing the Meme Gods post as one of the songs I’m learning. Finally, I’m just starting to get to the point of singing and playing the song at the same time. Now, when it comes to guitar, I’m no Eric Clapton, but besides just enjoying the song, technically it is a real challenging and educational experience learning to play the tune. The song spans twelve frets and forces one to become very nimble with both hands. It’s an intricate piece for an old guitar strumm’n fool such as myself.

A new friend will be arriving this week, which I’m sure you’ll be hearing more about. It’s a pretty young thing packed with power:

My new friend comes with a Core 2 Duo CPU which can be upgraded to a Quad Core Processor, firewire connection, upgradeable memory capacity to 8GB, a 160GB HD, speakers, 19" monitor, video and sound cards that can handle multi-media.

Our Dell that has served us well is getting a new set of parts to spiff it up and give it several more years of good service. All total, our home computing environment will have the performance and capacity to handle the computing and entertainment demands of a homeschooling and techie environment.

The total outlay for both systems is a little over $1,700. With quality parts and service, thanks is due to a trusted friend that does quality work as I mentioned in my computer purchase decision.

When you think of old and new friends, what comes to your mind?

Powered by ScribeFire.

Design Tastes Good

4
Filed under Just for Fun, design

Waffle MakerI love eating waffles. They are by far my favorite breakfast food. After going through several waffle makers, we took the plunge a few years back and purchased this little model and could not be happier. It’s a Villaware we picked-up at Williams-Sonoma and we’ve been in breakfast heaven since. Constructed of heavy medal parts, non-stick surface and a built-in alarm to alert you when those tasty, golden brown creations are ready; it’s a dream to use. This appliance is well-built in every way.

Whether in architecture or web design, there’s a long-standing debate over form vs. function. Is it really one or the other? The collective whole becomes the measuring stick. Take this waffle iron for instance. Surely the sleek style and chrome finish make it an attractive purchase. But the heavy construction adds a sense of confidence that this puppy will serve us well for a good long while.

This reality affects your and my life on a daily basis. Do you shop Wal-Mart or Target more often and why? Wal-Mart has traditionally been the cheapest but, which is more stylish? Which store would you rather walk into? Does style affect your purchasing decisions? If you knew you could spend far less and get the same product at Wal-Mart would you?

Marketing is everywhere because it is so effective. In reality, we do judge a book by it’s cover. In fact, we purchase items quite often due to their packaging. We are just wired that way.

 I love design. It just tastes good. When I get in my 1995 Toyota Camry with over 180,000 miles on it and cruise to work like it just rolled off the lot, I enjoy the design of the fine machine. It’s as smooth a ride as ever.

Like a well-prepared meal that is a feast to the eyes and nourishment to the body, design tastes good. It’s hard to describe but you know it when you see it.

What comes to your mind when you think of a deliciously designed product or possession?