<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>pingVision</title>
  <subtitle>Interactive Design + Development for Drupal websites</subtitle>
  <link rel="alternate" type="text/html" href="http://pingv.com/blog/rad/200707/birth-drupal-user"/>
  <link rel="self" type="application/atom+xml" href="http://pingv.com/node/3685/atom/feed"/>
  <id>http://pingv.com/node/3685/atom/feed</id>
  <updated>2007-07-23T16:12:30-05:00</updated>
  <entry>
    <title>Birth of a Drupal User</title>
    <link rel="alternate" type="text/html" href="http://pingv.com/blog/rad/200707/birth-drupal-user" />
    <id>http://pingv.com/blog/rad/200707/birth-drupal-user</id>
    <published>2007-07-23T15:09:59-05:00</published>
    <updated>2007-07-23T16:12:30-05:00</updated>
    <author>
      <name>Rad</name>
    </author>
    <category term="Drupal" />
    <category term="theming" />
    <content type="html"><![CDATA[ <p>Why Drupal?</p>
<p>I've been learning PHP and MySQL for almost two years. Every time I began to feel I was learning a lot, I'd be humbled by a whole new category of things to learn: OOP, security concerns, etc. I wanted to use open source products wherever I could, but was frustrated with the understanding that most of my programmer friends gave me: It's usually faster to write something yourself, than to modify someone else's existing work. The time spent dissecting and becoming familiar with work that wasn't yours was not worthwhile for single project use. It only made sense to learn someone else's code if you knew it was solid, and you were going to deploy it again in the future.</p>
<p>I looked into pre-written e-commerce, CMS, blog applications, and more. They were all written by different people and all had different "feels." To combine the functionalities of these disparate pieces and make them look and function well together on one site would require an even more massive investment, and quite a bit of customization. In looking for solutions to these requirements I was introduced to Drupal, Joomla, and other solutions that went way beyond just a CMS. I slowly realized I'd found what I was looking for: A single knowledge investment that would pay dividends over and over again. You know the coding styles and methods, you know its capabilities, you can customize it in so many ways that an end user would never guess that two sites were using the same framework. I researched the various options and decided that Drupal was my best bet. There are plenty of CMS comparison sites and heavily opinionated write-ups that compare Drupal to Joomla and other solutions, from people more knowledgeable than I am, so I won't rehash any of that here. I will say that the more I learn about Drupal and its competitors, the happier I am that I chose Drupal.</p>
<p>How to Begin</p>
<p>I re-tiled my bathroom about a week ago and had never done any tiling before. Along with the tiles and the needed tools, I bought a book on tiling. Several days later, I was ripping up the old floor, paying attention to the layers and how it had been put together, thinking about direction, where to begin, and what obstacles i might face. After week and ten trips to the hardware store, I was done, quite happy with the way it looked, but had never opened the book. I learned from taking the old floor apart, just like I'd originally learned html, and later, CSS. That's how I wanted to learn Drupal.</p>
<p>Since we're each coming to Drupal with a different knowledge base, let me me first tell you where I stood. I had a solid base of css knowledge, was a proficient hand coder of html, and had a modest knowledge of php and mysql.</p>
<p>Learning Drupal's Capabilities</p>
<p>I began going to <a href="http://groups.drupal.org/node/4396">Drupal meet-ups</a> hosted by <a href="http://pingv.com">PingVision</a> and <a href="http://www.denveropenmedia.org/">Denver Open Media</a> and subscribed to a bunch of lists for the various aspects of Drupal I was most interested in. I felt lucky to be in Denver and have access to the great meet-ups. I hadn't even installed Drupal when I went to my first meet-up, but began absorbing the vocabulary and building up my understanding of the architecture on a superficial level. After installing Drupal (version 5) and getting it working, I went through the tutorial in the book <strong>"Building Online Communities With Drupal, phpBB, and WordPress."</strong> This only showed me what the core install could do, and didn't get into any customization or what contributed (non-core) modules could do. It was also written for 4.7, but the only difference I noted at that low level was that I had to poke around the admin navigation menu a bit, as some items had been moved or renamed. This book helped me in understanding Drupal from an end-user perspective and is great for that, or for someone who will only be customizing the site from the user interface. If you come from a coding background, or want a stronger reference book, <strong>Pro Drupal Development</strong> is a better choice, however, it doesn't read as easily as <strong>Building Online Communities</strong>.</p>
<p>Theming in Drupal</p>
<p>Like when I first installed windows 3.1 waaay back when, and since Drupal doesn't have minesweeper, the first thing I wanted to do was change the appearance. Despite the great look of the default themes, I wanted to be able to make my own look, and to be able to port designs from existing sites. Chapter 8 of the book <strong>"Pro Drupal Development"</strong> covers theming briefly, but enough to get you going. I focused on only the basics: page.tpl.php, which controls the html shell, and style.css, the style sheet. After downloading a design from <a href="http://oswd.org">Open Source Web Design</a>, I renamed the index page to "page.tpl.php" and stuck it in a new folder I'd made in the /sites/all/themes folder along with the style sheet, which I renamed style.css. After just a couple of minutes of inserting some PHP calls and renaming the style sheet, I was surprised to already be done. My instinct was to create the new theme in the /themes folder, but Drupal best practice says that you stay away from modifying files outside the sites folder. This can make the difference between a simple drop-in update and a huge headache at update time.</p>
<p>Outside the world of tutorials, theming can get quite a bit more complex. When I compared what I had just built to other Drupal sites, I noticed that tabs were missing on some admin pages, along with other things I maybe didn't even know were missing.</p>
<p>In my first attempt at theming, I had inserted several lines of PHP into my html file, but missed out on tabs and several important Drupal functions. To make sure I got everything I needed, my next practice site was made by taking an existing page.tpl.php from a strong theme, and modifying only my CSS (from yet another oswd.org design) to fit the ids and classes skeleton that existed in page.tpl.php, leaving it untouched. For the most part, I just had to figure out the structure and rename my selectors to fit. I used the Zen theme. From the <a href="http://drupal.org/project/zen">Zen theme page</a>:</p>
<blockquote><p>"Zen is the ultimate starting theme for Drupal 5. If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has LOTs of documentation in the form of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php)."</p>
<p>"The idea behind the Zen theme is to have a very flexible standards-compliant and (relatively) semantically correct XHTML theme that can be highly modified through CSS."</p></blockquote>
<p>Using page.tpl.php from the Zen theme created a much more powerful page, calling the "t function" (which allows for translations and localization,) tabs, and more.</p>
<p>Next installment: The Wide World of Modules.</p>
     ]]></content>
  </entry>
</feed>
