Installing Additional Modules and Scripts
In the eighth installment on my blog series on how to create a website, I will be covering installing additional modules and scripts that will be needed to add function to your website. In the last installment I focused on just the basic core modules that came with the Drupal installation and how to enable and where to go to configure the modules. Now that you have all that the basic installation has to give it's time to go out and find some additional functions to add to your site.
As I write this blog there are over 21,000 Drupal modules active on the Drupal site. This doesn't include the countless other custom modules that you can find or have someone write just for your site. Modules like any invention are designed to not only make the users experience better but also to work as tools to make the site's developer's life easier. Sometimes this can be as simple as adding a block to be displayed on your site or it can be something as complicated as adding tearing down the normal way that Drupal displays content and displaying it completely different. As tools modules can make maintaining a site a whole lot easier by taking care of creating site maps, reporting to search engines and other SEO work all automatic. It all comes down to your needs and what will work.
Since this is your first time to Drupal, there are a couple of modules that I'm going to suggest you install right off the bat to make your life much easier. I would suggest downloading the compressed files or "tar.gz" files and store them in a folder that you can remember easily when we start to install them to your site.
- Advance Help - This module allows a wiki style interface for module developers to create help files for their modules in HTML that will display on your site. Also it will display the install and readme files usually buried in the modules folders on your server.
- Module filter - This will change how your list of modules is displayed on the admin module page into an easier user interface with vertical tabs of the module categories and a real time search. This is really helpful when you began to install a large number of modules on your site. Instead of paging down and looking for the module, you just pick the category or search. Saves hours of your time.
- Backup and Migrate - This allows those with permission to download backups of the database straight from the site. This makes it much easier to back up your site and takes the need to do it from your host service's cpanel. There is also additional modules that add other functions you may want.
- Site Verification - With Drupal it can be a difficult to verify site ownership needed to submit to Google and Bing. This module will do all the heavy lifting. Just enter the information or code and it will put it where it needs to be.
- Google Analytics - Like the Site Verification module it plugs in all the Google Analytics verification by simply entering your verification number.
- XML Sitemap - Creates sitemaps that conform to the sitemaps.org specification and makes submitting your site to search engines a great deal easier and more effective.
- ShareThis - Adds customized blocks with social sharing buttons from the sharethis site. Which allows visitors to easily share your content on social networks like Facebook, Twitter, LinkedIn, Google +, Pinterest, etc...
- BookMadeSimple - If you plan on using the Book module to orginize your content it is very useful because it allows you to add content types other than the Book Content Type to books.
- WYSIWYG - Allows you to add WYSIWYG interface to your text editors. Which allows you to have test forms with buttons to change font, font color, add links, table, etc... without having to enter codes. There are also a number of modules that will additional functions.
- Media - One of my favorite Drupal module. It allows you to organize media content, add media content to text areas using a button with the WYSIWYG filter, embed media form other sites into your site and add media from an easy to use library of media files already uploaded to your site.
Often modules work together to add additional functions to a module or require some of the basic functions of the other module to work correctly This includes a few of the modules listed above. Don't worry Drupal will keep track of this for you and not allow you to enable modules until all the required modules are enabled. Below is a list of the more common base modules that other modules will need to work.
- Chaos tool suite (ctools) - Great improves the user interface when working with other modules and is required by a number of other modules.
- Libraries - Allows access to libraries of scripts outside of Drupal and is required by a number of modules and themes.
- Panels - Panels allows pieces of content to be displayed differently than that set by the theme. This site relies greatly on panels to display sub-menus and content in tiles. I would also suggest when installing panels to install Panelizer and install Panels In-Place Editor which adds a much easier user interface.
- Views - Views allows you to group and display content based on type, terms, date, etc.. and then display in a number of different ways. For example, let's say that you want to create a news feed of just a blog. You can create a view that filters and collects only contact created with the blog content type. Then you can create a block, page or rss feed of only that content type. With additional views modules you can then have it display in grids, slideshows, tables and countless other ways.
Enough suggestions, let's move on to actually installing and configuring a module. I decided to use WYSIWYG as an example because it is one of the modules that relies on an external script to work. Due to the fact that often modules require additional code that can't be distributed with the module code, you have to download the code from elsewhere and add it to you site's files so the module can use the code. WYSIWYG requires an editor code that will need to be placed in the correct folder for the module to work. I've also included a gallery at the bottom of the step by steps:
- Navigate to your admin Module page using the admin tool bar and click on the link "Install New Module".
- Drupal gives you two way in which to upload modules to your site. You can either enter the url location of the compressed file or download the compressed file and then upload it to the site. Either way next click on the "Install" button. This will cause Drupal to upload and exstract the contents to the site/all/module folder for your site.
- When it's done the page will reload and you will be greeted with the message "Installation was completed successfully." highlighted in green. Below that message you have a few options, "Install another module" will reopen the page to install another module, "Enable newly added modules" will return you to the module page and "Administration pages" will take you to the main admin page. Since we want to enable and configure the module we want to click on "Enable newly added Modules" and return to the module page.
- When the page loads you want to locate the WYSIWYG module on the list. It wil be located below the core module group under "User Interface". Check the box to the left of the module's name in the "Enabled" Colomn. Then click on the "Save configuration" button.
- When the page reloads you will be greeted with the message "The configuration options have been saved.:The configuration options have been saved." in a green box at the top of the page. Page down and find the module again and click on the Configure link to the right of the module name.
- This will open the modules configuration page and in this case there isn't much you can do right now because you need to add a script to your libary folder. Below will be a list of different Editor codes to choose from. Personally I like the CKEditor. click on the download link.
- Now here sometimes things can get tricky. Sometimes the edition of the code isn't the same as that used by the module and won't work. It's important to pay attention to what version the module is going to need to work. Choose the correct version and then download the compressed file to your computer. In this case it is the older version 22.214.171.124. Sometimes you have to download a number of versions before getting the right one.
- Now you want to back page to the configuration page again. Notice that next to the editor name there is a file location. I would suggest keeping this window open or write down that file location.
- Now I want you to think back to how you installed Drupal in the fist place because it's kind of the same. Installing additional scripts is about the only time you will have to do this once Drupal is up and going. You will need to sign on to your host services cpanel again and open the file manager. When you extracted the Drupal files it created a number of folders. One of those was the site folder. In the site folder you will find the settings.php, files that you upload to your site, and modules and themes that you install using Drupal. You want to open the site folder and then the all folder. Since this is the first time you have done this there should only be two folders, "Module" and "Themes". You will need to create a new folder called "libraries".
- Open the location in your files manager "your sites root/sites/all"
- Click on "New Folder" button
- Enter libraries into the "New folder name" form
- click on the Create New Folder" button.
- Open the new "libraries" folder you created and upload the compressed CKEditor and extract it's contents into the folder. Make sure to verify the file location as stated on the configure page for the module.
- Return to the module configure page and reload the page. You will notice that you now have an interface at the top of the page to add the editor to your text formats. Choose your newly installed editor and click on the "save" button.
- When the page reloads, you will notce that a couple links appear to the right of the Text Format that you added your editor to. "Edit" will allow you to configure the format including in this case what buttons will appear on the toolbar. "Delete" will remove the editor from the text format. Click on "Edit".
- When the page opens you will have a number of tabs that can be expanded to adjust the way the editor will look, the functions it will have and how the content will display. The main this you want to adjust is "Buttons and Plugins". Here you can check off what buttons and options you want to be in the toolbar when adding text to your content. When you are done click on The "Save" Button.
At this point the module is installed and configured but it is always a good idea to double check that it is working correctly and there are no other issues. To do that go to your status report page. You can get there by clicking on the "Reports" link in the admin toolbar and then clicking on the "Status report" link.
In the next installment I will finish up with adding themes and working with the block module.