Welcome to the Geeks & God Static Archive. Read more »

Drupal Basic Setup

3.333335

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Drupal, Drupal, Horray! Today, we continue our adventure into the land of Drupal. We walk you through all of the setup screens, options, and pitfalls of a basic website setup. We talk about the administration settings, user settings, input formats and content types....doesn't that sound exciting?

But, before we do all that, we talk about Big Brother....or, well, at least we talk about how video cameras, picture phones, and the internet are exposing Christians to a world wide audience. We actually decide that we like this exposure (good or bad) because in the end...the truth comes out.

So, kick back, grab some corn, and geek out with us....

Moving Drupal to the root directory?

There are two of us working on the new drupal site. I know on an earlier episode you talked about how its easier to create a subdomain for drupal while your building. Our hosting doesnt allow subdomains so I created a folder called cms and installed drupal there. How much is really involved when we are done with the site and want to move it over in our root directory.
What are some tips that we can apply now as were doing the site that might ease the moving pains?

Couple of things....

First, when you have a chance to look at switching webhosts (like your time to renew comes up) consider switching. Every decent host offers subdomains these days. If it's an in house hosting deal then the server managers should be able to do it with no problem. If they can't it's just a matter of learning how.

The move may or may not be painful. When you develop the site are you using full urls like http://example.com/cms/files/images/someimage.jpg to point to an image in a node? If so then it's a real pain. You have to update each node to the new location. This is true even if you just use /cms/files/images/someimage.jpg to point to the image. This is by far the biggest issue. (can you imagine going through 50 nodes to remove the /cms from the images?)

Doing things on a subdomain means your pointers would be /files/images/someimage.jpg on either the subdomain of the www domain. This is our biggest reason for pointing this out.

In your themes there are ways around this. Use drupal functions like base_path() to get the path to drupal (in your case /cms) and path_to_theme() to get to your themes path. But, this only works here and not for content.

On geeks and god we do it a little bit different. Our images aren't included in the body of the content. We have them uploaded as part of the a CCK field type. This allows us to present them with theme functions and use base_path() and other drupal functions. They aren't dependent on what's in the body area. I realize this is more advanced and it's a little bit to learn (at least it was for me).

This is really why (the main reason) we recommend doing it on a subdomain. Does that make sense?

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Actually...amazingly...some

Actually...amazingly...some of what you said does make since. I thought about some of the same problems while I was doing to site using full urls that are within drupal. What I started doing is I added a image folder called d_images in the root folder (so I know its for drupal related images. Im placing all the images I use for pages in that folder and the links are from there. When the site gets moved over the urls for the images are still the same.

When I went through the control panel and asked my hosting provider (Hostmysite.com) here is the response they gave me. I didnt really understand it, but it sounds like the answer is no. Is that what your getting?

Response from Hostmysite:
When creating a subdomain, we can only point them to either an IP address or a fully qualified domain name. This is why you can not do it in your CP. If you would like to create a subdomain in our DNS pointing it to your accounts IP address and then routing it via your code or a redirect script of some sort that will work. Please let me know if you need anything further.

Yes, You Can

With your host you can do subdomains but it isn't easy nor is it for the faint of heart. If you had drupal at root and wanted your subdomains to be other drupal sites that's easier than what they are saying.

I would suggest checking out another host when the time comes up. You can do it in many hosts control panels. For some reason they have not chosen to have this feature.

To do it their way here is what you would need to do. Have them point subdomain.example.com to your root directory (same place your current domain is). Then, in your root directory have a .htaccess file with this in it:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/new-domain/
RewriteCond %{HTTP_HOST} new-domain.com$
RewriteRule (.*) http://already-hosted-domain.com/new-domain/$1

In this replace /new-domain/ with your subdirectory and new-domain.com with your full subdomain like sub.example.com. And, it should use the files in the other folder for that domain.

Just as a note if you are doing images with your theme they should all be in your theme folder. Then use the drupal functions I said above so drupal can detect the path to them. You can learn more about the use of those functions at http://api.drupal.org

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Yikes! Sounds like more than

Yikes! Sounds like more than I want to do. Ill just tough it out for now. Im going to be asking a ton of questions when it comes time to move it over to root. I hope you guys dont mind. Im going to be a nervous wreck. :)

Backup Backup Backup

Once you learn how to do this stuff it's not that hard.

Before you make the switch my one piece of advice is backup backup backup everything.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Thanks for the reminder. I

Thanks for the reminder. I definitely will back up everything i can think of when its time. Then Ill probably be posting so much in here you might think Im spamming you guys ;)

Allowed html

Hi there - thanks for this. I am unable to listen again just now - due to time constraints and other things but I just wanted to quickly ask - do I remember hearing something about allowable html within posts etc?

If so - where is this!!??

I've looked everywhere (well - everywhere except where it is!)

Also - on a completely different note - do you know anything about internal clocks on PCs (our church isn't on macs yet!). Our projection computer clock keeps resetting and I can't work out why!

Thanks...
A.

--
Andy Hoyland
andy@stjb.org.uk
http://www.stjb.org.uk

If you go under

If you go under home>administer>site configuration thats where you can go to configure site input formats. As I think the G&G duo were stating, You probably only want people who actually work on the site to have full html.

If your creating new content, under the Body field you will see input format. If you want to create something that makes full use of html you will want to click on input format and select Full html. Now you can go crazy with your bad self.

techmate has it right

In the episode (don't remember where) we talked about input formats. Unless otherwise needed it's a good idea have people use filtered html. You can configure what gets filtered out in the settings. Techmate has the link for this.

Computer clocks are a whole different issue. There could be a couple things going on. Either the OS has gone bad and keeps resetting the clock funny of there is a problem on the motherboards clock. The batter could be dead or the board itself hoarked up. Anyone know any other possible causes?

My money is on the motherboard. I have had that happen a couple times.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Questions about Drupal

Hi - this series is great! I want to convert our church site from an old version of phpWebSite to something like Drupal or Joomla. I'm leaning towards Drupal and your podcast is most helpful to me - listening to it in iTunes while I work on my test site - thanks!

Here's my questions:
1) Regarding Filetered HTML - I loaded the TinyMCE module to get WYSIWYG editing (this is what Joomla uses by default.) When I would write a post with newlines in it, they would be gobbled up unless I used Full HTML. Well, I looked at the Administer->Site Configuration->Filtered HTML configuration and it did have the Line Converter checked, and I checked Rearrange which looked like things were in the right order. As a test, I added p and br tags to Allowed HTML tags and then it worked. I guess that TinyMCE must be converting the newlines to 'p' tags and then Drupal is gobbling it. Do you see any problem with this, or is there a better way to do it?

2) Since I've gone further with Joomla than Drupal to date, I'm finding that I like the structure of Drupal better, but I like the presentation features of Joomla much better. There are some beautiful Joomla themes at rocketheme.com but I'm mostly finding rather plain Drupal themes (sorry if great themes exist - I don't mean to offend - I just haven't found them yet!) Is it possible to convert a Joomla theme to Drupal, or do you have suggestions on how to find nice looking themes that also use some Javascript visual features?

I'm sure I'll come up with other questions as I dig deeper into Drupal, but I am really glad to see what you guys are doing to help the Church check this technology out. God bless!

Thanks,
Bob

Answers To Your Questions

Welcome Bob. Hope I can answer your questions well.

1) Drupal looks for \n, \r, or \n\r for new lines. This is basically your enter or return keys, depending on the system you are on. Note: These 3 things are not something you can see. Based on these it does line breaks. TinyMCE does things a little differently. It converts enters and returns into new paragraphs (p tag) and shift enters and returns in the br tag. So, filters need to account for this just like you did. Or, TinyMCE needs to be configured to do line breaks differently. Both are possible.

Hope this technical description was easy enough to understand.

2) You are right that drupal doesn't have nearly as many good looking stock themes. In some ways this is too bad and something that has had been worked lately with themes like garland. But, this does show a difference in path between joomla and drupal. While there are a number of good looking stock themes for drupal and people use them many of the drupal developers believe each site should have it's own theme and look. Something custom to them. So, effort has been put into themes like the zen theme that can be easily modified (and is well documented) and turned into a variety of looks.Custom looks for sites is our philosophy, too.

If you are looking for some good stock designs check out http://www.oswd.org and http://www.openwebdesign.org.

I don't know how easy it is to convert a joomla theme to drupal. I know people have done it but I haven't.

Hope this helps.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Hi Matt, Thanks for your

Hi Matt,
Thanks for your reply to my questions. I will look into the themes that you suggested as a starting point. I'm more a software guy than a designer, so I need a little help in the visual/creative side. I think it would be a good exercise for me to take one of these XHTML/CSS templates and try to plug in the Drupal PHP tags and see if I can make it come alive. Or, maybe I'll just wait until your next episode of the podcast is out. Hey, wouldn't that be a great tutorial - turn a generic template into a Drupal one. What do you think? ;^)

Anyway, I do want to take a shot at a unique custom design. I looked at the Zen template and it seems like I can start with that and get my feet wet.

Thanks again - keep on sending us good stuff. God bless!

Drupal Themes

Hey Bob...welcome to the discussion!

You are 100% correct...stock drupal themes are usually pretty ugly. I see two main reasons for this:

1. Drupal is a 'developer's' CMS. You'll find that the drupal community is packed full of php geeks, but you'll rarely find good designers. That's because drupal offers incredible possibilities in terms of what you can do with modifying the code. Less designers involved means less beautiful themes...and as a designer, myself, I too find this frustrating. My solution has always been: just build your own themes.

2. Joomla is easier to use, involves less coding, and is more popular than drupal. This means that coders don't flock to it...but designers do. This fact yields more beautiful stock themes because there's more designers working on the project, and it's a bigger market for them to work in.

As far as converting themes, I don't see where it can be very difficult. Afterall, CMS themes are simply html and css code. The php doesn't really affect the LOOK of the theme...so, without really looking into it, I can't imagine converting a theme take anything more than stripping out all the Joomla-specific PHP tags, and replacing them with the Drupal-specific tags. The only trick is knowing each system well enough to know which tags correspond to what.

Edit after a few hours of thinking: The more I thought about this last paragraph, the more I'm not sure if it's true. This would definately be true for simple theme layouts...but these days, the more advanced themes rely on php to do some crazy stuff. So, I'm not so sure that the more advanced themes would be easy to convert...possible, just not easy.

-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com

-Rob Feature
Geeks and God Co-Host
www.mustardseedmedia.com

Hi Rob, Yup - I'm sort of in

Hi Rob,
Yup - I'm sort of in the visually challenged camp too. I can usually tell when something looks good, but I have a harder time with how to create a good design from scratch. I'm looking for a starting point to then customize for our church site.

Anyway, I'll stay tuned to the Podcast and look forward to what is to come.

Thanks!
Bob

Find Someone....

Bob - I can be fairly design impaired sometimes. The best I have gotten is to be able to see some good looking templates and make my own based on them. And, I can spot a good one when I see one.

Yet, I don't like the idea of stock themes for most things. There are a few exceptions but I don't think churches should use them.

So, what is one to do? I would see if you can find someone in the congregation with an eye for web design. Then, get them involved. Help them used the gifts God has given them to make a good looking website for you church.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Drupal in subdomain

Hi guys, I have Drupal installed after listening to a couple of your casts. I'm a newbie to web programming and haven't done subdomains before. I setup test.mydomain.net and my Webhost added test directory under my public_html directory. Should I install Drupal in public_html or in public_html/test? If I put it in .../test, I can then just copy to public_html root later and links stay the same since are relative to the root? I have it working in .../test now but am just starting so can easily re-install in a different location if that's better.
Thanks! --Mark

Hosting Differences

Hey Mark...
This is a hosting setup I'm not really familiar with...usually when you add a subdomain, it will add a folder to the same root level that your main domain is on (for example, subdomain.geeksandgod.com would be on the same directory level as geeksandgod.com).

So, the fact that it created a folder called /test (I'm assuming, inside your main domain folder) is what's throwing me off. Anyone have experience with a host that does things this way?

I guess my main question would be: are you sure you created a subdomain and not just a folder? (a subdomain would have to be created in your hosting control panel, you can't just create a folder yourself).

Beyond that, yeah, a subdomain should keep all your files and links connected when moving to the live site because it's a the root level, just like your main domain.

Hope that helps...

-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com

-Rob Feature
Geeks and God Co-Host
www.mustardseedmedia.com

Some Work This Way

Some hosting companies do setup subdomains this way. In that case your best bet is to, also, ask them this same question. They will be able to give you a better answer than we can.

If your main site is at public_html and your subdomain is at public_html/test then when your site is built you should just be able to move the contents from the test folder to the public_html folder and have it work. Though, you may have to tweak your .htacess file if you have issues with clean urls.

But, remember to ask your host. They may be able to provide more details than I can as I don't know your setup and am assuming a lot of things.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Thanks for subdomain help

My site's at Bluehost and I've confirmed in their forums that the subdomain folder contents (hanging off of public_html) can be copied freely to public_html to be visible at the main domain.

I have 4.7.6 installed, but now think I'll make a second subdomain for 5.1 and install there, then delete the 4.7.6 install when 5.1 is running. Sounds like you guys really prefer 5.1, though I haven't had time to hear all the podcasts or read all the comments.

Thanks again for all the help! --Mark

5.x is the way to go

Drupal 5 is the way to go. It faster, in most cases, easier to work in, and is much more cutting edge.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

5.x

Already have it installed and starting to configure.

Blessings, -Mark

How do you like Bluehost?

Mark,

We're looking for a new host for our church and have considered Bluehost, but was wondering what you thought of it? I haven't gotten any feedback from someone who has used it.

Thanks,

Craig

Bluehost vs. HostMonster

If you're considering Bluehost, you might also consider HostMonster, as they're apparently the same company. I'm not really sure what the difference is. It would be great if anyone knows if they could clarify.

Bluehost has worked well

Hi Craig, I've been pleased with Bluehost. This is my first attempt at a website and I find the CPanel easy to use, support has been responsive on the only request I've had, and the forums are pretty active. Drupal 4.7.6 and 5.1 were easy to install. I've done a little MySQL and PHP to get my feet wet and all went well. They also prohibit porn, which as a Christian, I appreciate. And they've been around 5+ years (maybe 10?).
If you do decide to go with it, use the link above and they will credit a small amount to me. No pressure/hype of course, but if you're doing it anyway...
Blessings, -Mark