The Drupal Cookbook (for beginners)
Purpose
I am one of the many Drupal "newbies" who seemed overwhelmed at first. Well, I still am. But I have learned a lot in my first month with Drupal. I'm even answering questions in the forums (actually, I think it's fora.)
With some encouragement from other newbies, I decided to write down what I'm doing to build my sites. (Shoot, at my age, I can't rely on my memory, I have to write it down.) Yes, that's plural. As of this writing I have three sites in production, plus a test site for playing around.
Background
The basis of this book is going to be my efforts to build new test sites on my PC, running Windows. Hopefully by the time I get to that point in this book, I'll have figured out how to transfer the developed sites onto the remote production servers. Pretty much all of this is directly applicable to building a site directly on a web server.
Myths
It is a pure myth that you have to know how to program (especially in PHP) to use Drupal. It doesn't hurt to have some basic knowledge of PHP, HTML, and CSS, but it is not required. Here are some good resources for you:
- W3 Schools - for virtually everything Internet-related.
- The Official PHP Site - the full PHP implementation.
- PHP Builder - some tutorials and code ready-to-use.
Now, to be honest, I have used HTML in this book, and tweaked the CSS on my site a little bit. But I have not used one line of PHP code.
Another common myth is that your learning curve for Drupal is going to be steep and it will take you months, or even years, to get a web site up and running. Hogwash! I had my first, largely static, web site with 36 pages up in less than a week after I installed my first copy of Drupal. Then, because my hosting provider pulled the plug, I got my group's site up in the time it took to get the domain name transferred (about 5 days). That was after about 16 days from starting with Drupal. That site had a lot of static content, but also required a taxonomy-based access control module, a fancier theme, meta tags, photo albums, and a calendar - and it all had to work right away!
You can do it! Yes, YOU.
Using the Drupal Web Site
There are a few things you need to know before you post anything on the Drupal web site:
- Search to see if the subject has already been covered. If it has, then recreating the subject will probably get you negative comments. If you don't understand the responses (I certainly identify with that feeling), don't hesitate to say "I'm a newbie, can you say this in easier to understand terms?"
- You need to get a few basic terms right or you will be flamed.
- Node: This is, in simple terms, a unit of content. It may, for example, be a "page," "story," "book page," or "blog entry."
- Theme: This is the way your site is displayed (or rendered) to the end-user.
- Block: This is a "container" for pieces of content on your displayed page. For example, your navigation menu and log-in are blocks. You may also have "Recent posts," "Sponsor links," or "Who's online."
- Try to completely describe the situation. For example, if a page is not showing up correctly, it could be a browser problem, so make sure you tell the reader what browser you're using. Always mention which release of Drupal you're using (4.7.x, 5.x, etc) and any modules you're using that may be at play. It also wouldn't hurt to know which version of PHP and MySQL you're using.
Typing Convention
Throughout this site, as well as the Drupal site, you will see things like Administer>>Access control>>User management>>Roles. This means click on "Administer" in the navigation menu, then "Access control," then "User management," and then "Roles."
I will occasionally refer to "production" or "live" sites. These terms are pretty much interchangeable. The latter term is more modern and accepted in reference to web sites and means the site that your end-users interact with. The former term is largely synonymous but is a more "traditional" data processing term.
Some Preliminary Advice
This is from a post by ebrad on March 26, 2007, with some minor editing.
I don't know if I could call my sites "great;" it's taken about 9 months to really get a good understanding of how to use Drupal and its modules. This doesn't include learning the API or writing my own modules.
These are some recommendations I would have given myself before I began with Drupal:
- Never try anything for the first time on a live site. Use a test site that uses the same modules and same data (different database). I keep 2 tests sites going at all times.
- Don't try to make the "perfect site" on your first shot. Muddle through for a while until you understand a better way. Stressing over the perfect solution will slow you down.
- Stay away from Views, Category, CCK, and Organic Groups modules until you at least have a little experience under your belt. These modules require a good bit of understanding to master and it might discourage you if you try to dive in too fast. However, over time you will come to realize that these are some of the most powerful and flexible modules out there. [Nancy's note: also stay away from access control (security) modules until later. They can really destroy your site if you don't know what you're doing.]
- Customize one of the default themes before creating your own, the Theme Developer's Guide in the handbook is a big help.
- When you run into a problem with a module, make sure to read the "readme," then do several searches with different terms, only rarely have my problems not already been answered in the forums or in an issues queue.
- To make a site really successful, make it work for the users, not against them. Once you have the basic site set up, get your friends, family, or anyone who will talk to you to look at your site and give honest feedback, or do user testing for a more formal approach (I run a company intranet and I do user testing every couple of months).
- Help out in the forums when you can. It's surprising how explaining something to someone else helps you understand it yourself.
- Go easy on what I call "gadgets" such as useless blocks, images, and graphics that clutter the page. I prefer simplicity and I only place something on the page if it is needed. This of course depends on your application.
Good Luck!
Drupal Is Supposed to be Easy?
Drupal is very powerful and flexible. That means it must have a significant degree of complexity. Do you think the folks at Myspace don't have their terminology or managed to roll out that site in a day? I don't know who told you Drupal was easy, but many people make it harder than it has to be by thinking they need to understand everything at once.
Terminology is necessary in order to properly convey what one is trying to say or ask. If you talk about "that box-like thingy on the right side of my screen" you could be referring to many things. Contrast that with "the Author Information block in the right sidebar" - now you are precise and everyone knows exactly what you mean. You've told them what it is, where it is, and even how it got there and part of how you've styled it.
Start by trying to understand the basic parts of Drupal, don't try to understand everything at once. For example, it is imperative that you know what a node is (look in my book). Then understand what content types are. Learn the basic parts of the rendered page (header, footer, left and right sidebars, and the center, or content areas). Check out the administration pages so you have some idea where things are, even if you don't understand them all today.
It's all fine and good to have "MySpace" as your target, but you are one person with a new tool. The people that put that together are many and using tools that they already were familiar with. (BTW, I find MySpace to be rather illogical.)
Just start by getting something up and visible. Then celebrate that you've done that. Now you're ready to move on to more wonderful things, but do it one step at a time. Don't add tons of modules right away; get comfortable with what you have. Add modules one at a time and get familiar with them - one at a time.
As for making Drupal easier and more logical, you're welcome to submit feature requests or explain why something is not done in the most logical manner. But don't demand it, or threaten to abandon Drupal if you don't get it your way. And certainly don't resort to name calling or derogatory comments.
