Acquia Drupal Website, Part 7

Modules

Modules provide a way of adding functions to your Drupal website without having to build them from scratch. Modules have a variety of uses and are contributed by Drupal developers and users. We have already gone through turning off one module that came preinstalled with our Drupal install: the Acquia Connector.

Some modules require you to configure them once they are loaded or enable options you can select from once they are working. Others do things internally and you both never see, interact with, or change the functioning of the operations the modules create.  Just like learning how to use Drupal takes some time and effort, some of the more complex modules can also require you to learn how to use them.

For now I am going to cover loading and turning on some of the modules I will be using. My purpose here it to explain this process and not how to use any of the modules mentioned. At least not yet.

My next step is to turn on a few modules that are currently on my host server They are part of our Acqai Drupal build but are not presently turned on. For this we need to go to:

Site Building> Modules

Core Modules

Scrolling down the page a bit I come to a set of modules that are under a heading “Core – Optional.” These come with every build of Drupal 6 (the version that we are working with). Some of these are already checked off but I am going to implement a few more. For each of the listed modules, I am placing a checkmark in the box that precedes their name.

Blog – this should be self explanatory. Drupal, as a total CMS solution, offers blogging as part of its functions. After the blog module is turned on, whenever we go to the create new content page we will see an option to create a new blog entry. I am not going to get into how to set up or make a blog entry for awhile so hold tight or do some or your own research if you want to learn how to blog with Drupal.

Path – this helps with naming new posts and pages. More on this later.

Ping – a simple module that can be helpful for indexing and alerting others of new material on your site.

I check off these modules and to complete loading them I go to the bottom of the page and click on save configuration.

Other Acquia Drupal Included Modules

You probably noticed there are many other modules listed besides the Core-Optional ones we just selected. These are included with Acquia Drupal and I do want to turn some of these on.

As an aside, any module that you find in the Acquia build of Drupal we have installed are available on the Drupal.org website. Acquia distinguishes itself by putting together a collection of modules in their Drupal package that they think are commonly useful to a lot of different users’ needs. This is helpful but the real value they offer is an excellent support system for helping you to implement and run your Drupal website. You have to pay for this support but since Acquia is run by some of the people that created and maintain Drupal istelf, the value they offer is well worth the price of paying for support.

I am specifically interested in and will be checking off some of the modules found towards the end of the Module page in a section with the heading Other.

Comment Notify – this allows for email notification of new comments. If you have pages on your site where people can leave comments, this will provide an option to allow them to receive an email when new comments are posted.

Mollum – this is a spam filtering system. It can block comment and form spam (you can build forms and contact pages that allow people to send you messages through your website). To get Mollum to work you will need to register for the service and configure the module. More about this later.

Pathauto – this allows for a helpful hand in creating URL names for new content. I use this because I would rather my content have a real name instead of the characters, numbers and node assignments that Drupal would otherwise use for my URLs. As a technical point pathauto does not change how Drupal names new content internally. Pathauto creates what is called an alias and it properly associates the alias with the name Drupal creates and uses.

Token – I can’t claim to understand Token and its derivatives (see the next two modules listed here) but I do know I need this module. It is used by other modules for a variety of reasons, including the just mentioned Pathauto.

Token Actions – see Token above.

TokenSTARTER – see Token above.

Other Modules

There are a few other modules I like to use that are not included with Acquia Drupal. I have to go to find them at Drupal.org, download, unzip, upload to my host, and then turn on these modules to add them into my Drupal build.

Finding Other Modules.

This is pretty simple if you know the name of the Module you need. I go to www.drupal.org and on the sidebar navigation find a link called Modules. From there I find the module search box and click on that link. The new page that opens up has a search box on its sidebar that has a heading “search modules.” This is not the drupal website search box that is positioned just off of the navigation bar across the bottom of the header. I enter my search term, for example Page Title, and it provides a list of modules associated with my search terms.

I can download the Page Title module right from the listing that comes up but I will click on the module name (the text is in large, bold black lettering but it is actually a link to the module home page). You have a number of choices once you arrive at a module’s homepage. You can download the module, find out additional information about how to load and use the module and also find many other module specific resources.

You will see various download options on many module homepages. There may be different stable version for Drupal 5, 6 and there may be a few development versions. The stable version is designated by numbers, symbols and perhaps an x or two. The development versions are designated by ending in “-dev” and they should not initially be loaded onto your  live website. Developmental versions not considered production ready. Once they are stable and appropriate for running on a live site they will be able to shed their -dev ending.

I click on the link to download the latest stable version of Page Title and go through the process of getting it onto my PC, then unzip it into a new directory. You will need to have a program that can unzip a tar.gz file for this to work (search on the internet to find a program that can do this).

Once I have the module unpacked I need to FTP the files to my host server. I logged onto my FTP server, connected to my host and navigated to the /sites. Once there I added a directory called “all” and then created another directory in there called “modules.” This is where I uploaded the Page Title module.

modules

I repeated this for all of the modules I wanted to add. From there I returned to my Site Building> Modules page in my Drupal administration section, where I can now see the new modules I just uploaded to the server.

I am specifically going to get and install the following modules:

Backup Migrate

Comment Mail

Globalredirect

Nodewords (once downloaded to your host server this will show up with the name ” Meta Tags” on the Module page in Drupal)

Page Title

Conclusion

I have turned on a number of modules that I use and find helpful. My reasoning for using each of these varies and I have not addressed what you should or should not use to build your own website. As I learn more, and as Drupal develops, my ideas about what modules I use will change.

Drupal has a lot of great capabilities and I have only just begun to understand its complexity and usefulness. If there are other modules that anyone else thinks are a must for a base install of getting a Drupal website started I would love to hear about this in the comments.

Acquia Drupal Website, Part 6

Site Information Settings

There are a few changes here that will be helpful, including being able to tell Drupal the name of your own custom homepage. This administration page is found at…

Site Configuration> Site Information

The entry on the page is for the Site Name. This is the name that shows up on the header of your site for most themes, including Acquia Marina. You can set up a theme to have a header with a picture behind it, with a logo, and with other text but for now we are going to use the default and let the site name text be our header content. Drupal automatically added in the URL address here but I changed it to “Learn Local History.”

The next line is where you can change your administrative email (as discussed when you first enter an email address when you are installing Drupal through the web interface).

The slogan entry box is for a byline that can show up under your site name text. I did want to add that for my site. For now I added “Learn, Share and Appreciate Your Town’s Unique History.” I may change this later. The slogan will not show up in my header until I work on the theme administration page.

I ignored the mission portion of this page but did add a copyright notice to the “footer message.” I put in the following text: All information © Learnlocalhistory.com 2009

The © part will show up as a copyright symbol.

For the default homepage I entered:

node/2

This is the homepage I created in the previous part of this series. As usual, to finish things off I had to click on the “save configuration” button.

These changes mean that my site now has a homepage that I created myself and the site name that shows up in the header is more in line with what I want to see there.

Acquia Drupal Website, Part 5

Setting Up my Homepage

This following will  leave out an explanation of what is behind a few of the these steps. Bear with me as many of the things you will want to know more about will be explained in later posts. I am doing things this way because when I first started with Drupal it took me awhile to figure out how to get this done. When I typed in my domain name all that come up was the Drupal page that is in place once you have Drupal installed to your website. I really wanted to change this homepage to something I created. It took awhile because each step that took me closer to this was a learning experience. I had to first make a new Drupal Page. I had to publish it. Then I needed to know the node name. And on and on. Each step took me down a path of learning something else about Drupal but it was a slow process. Once I did get my homepage finished and working I felt a lot better about where I was at with learning Drupal. So lets just get this done right away, without all the pain of having to understand it all.

First a page needs to be created. I do this by on the “Create Content” link in the sidebar. This takes me to another page where I click on the first choice, which is “page.”

I enter a title for this page and for now I will just call it “My New Homepage.” In the body section I type in a bunch of text. I then go to the bottom of the page and click on the save button.

Once saved the completed page is loaded. Looking at the URL address I can see that it includes the following (after my domain name): /node/2

This is the information I will need to set this as my homepage. To complete this process we need to go to the next post and work on my “site information” …..(part 6)

Acquia Drupal Website, Part 4

Acquia Drupal Website Housekeeping

The following steps are in no particular order but are some must do steps to get my website ready for use. The site is already live now but has no content other than the generic Acquia Drupal pages that come with the install.

Administrator Pages and Navigation

There are many pages that facilitate the management of your Drupal website. These are called administration pages and they are organized in a hierarchy. If you have never used Drupal before the organization and names of things are likely to be confusing. The reason for this is because there are a lot of functions you can control and each of these needs to have a name so we can easily refer to each thing by a common Drupal name.

There are two ways to access the administration pages. One is to click on the Adminstrator link found in the sidebar. The other is to use the adminstrator menu found at the top of the site. This top menu is a Drupal add on module that is included in Acquia Drupal. It does not show up if you are not logged in as an administrator nor does the menu you see on the sidebar.

My instructions are set up so that you do not need to understand the names and function of everything you are configuring. This is helpful in some regards and unhelpful in others. Why?

You do not want to build my website – you want to build your own. You can see what I have done here but there is some or lots that you want to do differently. You can at least follow my instructions and get a site you can work with up and running. To take things further though you do need to learn more about Drupal. It will do you a lot of good to at least read this document, especially if you have never worked with a Content Management System (CMS) before.

I will be referring to the pages I am making changes with by giving the administration hierarchy of where each page is located. It is important to remember that almost everything you do in Drupal needs to be completed by clicking on a button that saves your changes. If you make a change and navigate away before you click on “save” or whatever similar button is given, you will lose your changes.

Change the Theme to Acquia Marina

This is pretty straightforward.

Site Building> Themes

Select both enabled and default for Acquia Marina. Then go to the bottom of the page and click on “save configuration.”

Shut Off Acquia Notices

There are numerous messages that come up on the administrative pages about Acquia sign-up and connectivity. I want to get rid of this “noise.”

Site Building> Modules

I am specifically interested in the “Acquia Network Connector.”

modules1

The process of shutting off this module needs to be done in two steps. First I uncheck the “Acquia Site Information” box. Since it is dependent on the Acquia Agent it must be shut off first. Next I go to the bottom of this page and click on “save configuration.”

This turns off that function in this module. Then I return to the module again and uncheck “Acquia Agent.” After going to the bottom to save my changes the Acquia agent and its notices are turned off.

New Users Only Added by Adminstrator

I do not want new users to be added by anyone but me.

User Management > User Settings

The first set of choices you see on the page are for controlling how this is set up. I checked “Only site administrators can create new user accounts.” As usual, I have to go to the bottom of the page and click on “save settings.”

If you look at the other options on this page you will begin to see how powerful and comprehensive the controls can be in Drupal. One of the many functions of a CMS it the ability to have many different, and many different kinds, of users. For example registered users can have various levels of permissions set and you can send out email messages to an end user and the administrator when a user signs up. For my purposes, for now, I don’t want to let anyone sign up as a registered user.

Performance Settings

The purpose of tweaking some settings here is to prevent unnecessary bottlenecks when  user is accessing and loading your webpages. All of this is behind the scenes stuff and is a good way to set things up for now. If you have a very large and busy site you will likely have a Drupal pro to help you configure your site so its performance is optimal.

Site Configuration > Performance.

Going through the performance settings page I set Page Caching to normal

perform1

and enable CSS and Javascript optimization

perform2

After making these changes they need to be saved by going to the bottom of the page.

Rather than get into an explanation about what this does, I will mention one of the effects of these settings. All of your CSS files (and there is a CSS file for many different parts of your Drupal site) will be loaded into the cache of any web browser that looks at your website. This goes for your browser too. If you make any changes to the CSS of your site you will not see those changes unless you flush the files form your cache.

You can do this from this page by clicking on the “clear cached data” button. It can also be done by finding this same thing on the administration menu at the top of your website.

clear-cache

These are just a few basic changes for now. What has been accomplished?

  • The website is now locked up a little better. New users cannot be added by anyone but me (user 1, the administrator account).
  • The serving and viewing of the website is improved through tweaking a few simple performance settings.
  • I am now using the Acquia Marina theme.

From here we need to go on to make our own homepage and tweak some of the other settings to change both the look and functioning of the website.

Acquia Drupal Website, Part 3

Internal Drupal Housekeeping

The basic Drupal core installation has two files included that influence how your pages are served and indexed. Both of these are in the root directory of Drupal’s installlation files.

Robots.txt

The robots text file settings allow you to set up rules for how your website’s pages are indexed. This can be done for various reason, including trying to avoid having your content showing up as duplicate content within your site. The basic settings are fine but I do like to add the following rules to my robots text file.

# Additional Rules
Disallow: /node$
Disallow: /user$
Disallow: /*sort=
Disallow: /search$
Disallow: /*/feed$
Disallow: /*/track$
# If you don’t want the bulk of your “recent posts” pages indexed, add this:
Disallow: /tracker?
Disallow: /*size=

To get this done I open up the robots.txt file that is in the root of my installed Drupal files (or the root of the files that are now on your hosting server). I paste in the text I have given above, adding it to the bottom of the page. The document is saved and copied to the host server, replacing the existing copy of the file.

.htaccees

Another file that I modify is .htaccess. It too is located in the root of the install file directory. The purpose of this file is to set controls for address (URL) assignments. The change I make here is to redirect any requests for non-www pages of my website to the www version of that page.

I opened the file in notepad and proceeded as follows:

Find the following section and uncomment the last two lines

# To redirect all users to access the site WITH the ‘www.’ prefix,
# (http://example.com/… will be redirected to http://www.example.com/…)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

changes to…

# To redirect all users to access the site WITH the ‘www.’ prefix,
# (http://example.com/… will be redirected to http://www.example.com/…)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

The last two lines are then modified to substitute my URL address for “example.” For my site the change is…

RewriteCond %{HTTP_HOST} ^learnlocalhistory\.com$ [NC]
RewriteRule ^(.*)$ http://www.learnlocalhistory.com/$1 [L,R=301]

Once completed the file needs to be saved and copied to the root of your Drupal directory.

I can now type learnlocalhistory.com in the address bar of my browser and it will open up the homepage as www.learnlocalhistory.com

As an aside, both of these file changes could be made before the set of Drupal files are uploaded to your host server.

Acquia Drupal Website, Part 2

These directions are just another way of explaining what is found at the Drupal Acquia site.

Domain Name and DNS

My domain name,  learnlocalhistory.com (go here to see the learn local history website), was set up so that the DNS server names listed by my domain name registrar were pointed to my host server. If you need help understanding how to buy a domain name this domain registration explained page might help or you can search the web for a better/different explanation.

Host Server Set Up

I need to do a few things on my host to start the process of setting up Drupal. The host serve I am using has a user interface called Cpanel.  I am not going to go through all the details of CPanel. There are different ways of going about these steps, depending on your user interface or if you use a command line, so I will cover these in a general way.

It is important to record some of the information that results from the host  server set up. You will need to write them down, in a secure place, for future reference and for some of setting up of your Drupal install.

Set Up a New Domain

I need to enter my domain name and set up an ftp user. This is a necessary part of the Cpanel domain creation process. Other ways of doing this may allow you to use an existing FTP user. I needed to record my

  • Ftp username
  • Ftp password
  • the directory location for the domain’s files (this is where I will FTP the Drupal program files)

You will also need to know the URL for accessing your host files, which you will be accessing via a FTP client that you run from your desktop. If you do not know how to FTP to your host server then you have some homework. Contact your hosting company or look through their documentation to figure out what you will need to do.

Set Up a Mysql Database

I created the database and a user that can access the database. The user needs to be assigned “all” privileges (read, write, etc., it is not important for you to understand what this means but it is important that this is done this way). Make note of the

  • database name
  • the username/password for accessing the database.

You will also need to know how to call the Mysql database. This is the location where the database is served from. On some hosts this will simply be “localhost” and on others there will be a URL address (an example of what I have seen in some places would be something like: mysql.learnlocalhistory.com).

As with all this information you are writing down, it is important that these usernames and passwords be kept secure. The user that has all database privileges or FTP access has a lot of control over your site.

Email Address Creation

I set up an email address for this domain. You are not required to have a domain specific address to install Drupal. An email address is required as part of the installation process but it can be from a any domain. You could use a gmail or yahoo email address, for example.

Download Acquia Drupal

Go to the the Acquia website and download the latest build of Acquia Drupal. I chose the full install zip file to download to my windows desktop. The file will need to be unzipped. You may want to change the robots.txt and .htaccess files before you go on to the next step.

FTP Drupal Files to Your Host

You will need to use your FTP client, point it to your host’s FTP server and sign in using the credentials you previously created. The Drupal files need to go into the main directory for your domain. This location was specified when you set up your domain on your host server.

A simply mistake that some people make is to FTP the Drupal directory into their root directory:

directory1

This is wrong. You should install the files so that when you open your main (root) directory of your domain’s website, you see what is inside of the directory that is shown above. What you should FTP and then see in your main directory is:

root-directory

Once you are able to get the FTP transfer underway it is time to go get a cup of coffee. It took at least five minutes for my files to be transferred.

Begin the Drupal Installation

Beginning the Acquia Drupal installation is just like any other Drupal install. Being by typing in this URL: http://example.com/install.php (do replace example.com with your own domain name).

Database Information

This will open a page where you need to enter your database name, database username and password. I entered my information and clicked on the “save and continue” button.

My database is served from “localhost” so I did not need to make any other changes to this page. Click on the “advanced options” link if you need to specify any additional details about your database server. If you open the advanced options you will see a few more entry boxes, one of which allows you to enter the database host server name. Replace the localhost entry with the correct information.

Clicking on the “save and continue” button should bring you to another page that asks for more information. There are two problems I have encountered in that past that may prevent you from moving forward.

There is a file in your Drupal install files that may need to have its permissions changed. The file is: /sites/default/default.settings.php. You have to figure out how to use your FTP client to change the permissions on this file to 755. If you do not know what that means and are having this problem you have some homework to do. If someone has a good resource that explains how to do this, please leave a comment with the URL.

The second potential hangup can happen if you try to cut and paste your database or user information into the entry boxes. For some reason when I try and do this on my computer it does not work. Clear all the entry box information you pasted in and type in all the entries anew.

Site and User Information

The next page of input includes things like your site name, an administrative email address and an adminstrative user.

The email address you enter here will be used as the sender address to any messages your website sends out via Drupal’s normal operations. I used the email account I set up for this domain. Drupal will send an email when things like user registrations, comment posting notifications and other operations are requested. You can change this email address later but you must enter something her to go onto the next step.

If you have an Acquia account you would enter that information here. I do not have an account, at least not yet.

An administrator account must be set up. Try to come up with a fairly complex, and hence secure, password. This user is also what some documentation refers to as user 1. Be sure to write down the user / password information and store it in a secure place.

The last portion of this page involves selecting your time zone, Clean URLS (leave them on) and your decision about update notifications. It is a good idea to keep updated so I would recommend leaving the update settings turned on.

Next I hit the “save and continue” button, some processing takes place, and I am told that Drupal is now installed.

My new Acquia Drupal site is up and running!

Acquia Drupal Website, Part 1

The is the beginning of an N part series about setting up an Acquia Drupal website.  I am using a remote host and my own domain name. My purpose in doing this is to have a record of what I am doing and, if anyone finds this and they find some value in my writing, to provide some help to someone that is in my shoes. These posts will be raw and will even include, most likely, some mistakes. Any mistakes I do make will be cleaned up and noted, at least once I am aware of them and have a solution.

My qualifications coming into this are:

  • I have been using Drupal for a few years but would not consider myself anywhere near proficient with its use. I am not a web programmer but do have some experience building websites using HTML.
  • I am a hack, meaning that my technical skills are scant. I make things work by pure brute force most of the time. Part of what this means is that you should be a bit skeptical of my advice and way of doing things in some cases. I am just doing the best I can to make things work.

If anyone reads this and what I have written strikes you as being wrong, or right, or has some advice to offer about what I have done please leave a comment. It would be great to have some other voices that  alert, entertain or advise anyone that reads about my experience. Hopefully I will not be that embarrassed by any errors of my ways!

It is true that there is more than one way to do a lot of things. Often I find with website work there is the technically correct way, other ways that work but are inelegant, bad ways that work but are dangerous or real difficult (open up security problems or are hard to work with, for instance) and really wrong ways that can or do break stuff.

The website to be

I want to use this new Drupal backed website as an education tool. I have some ideas that will push me way past my limits of what I know how to do. It will be necessary for me to get help with some of the functions I hope to put into place. I may even have to pay for that help, which may or may not come to pass depending on how well the project does. More on this as things develop.

So there you have it. Lets begin.