Lab 7: User-Contributed Content
In this lab you will continue the configuration of Drupal, setting up roles, access controls, and permissions. In addition, you will install a WYSIWYG editor and set up a blog.
- Email me your preferred term project domain name (e.g. FirstCRC.org) and IP address. I'll set up the domain name e.g. FirstCRC.calvincs.com, and you can configure the appropriate server to respond to that domain name also for your dev site.
- Before you start, back up your website databases by exporting their contents into files with commands such as
- The remainder of this lab should be done on your lab website, though you'll do similar
things on your dev site as well, as a part of your term project.
Install the Ubuntu package ftpd to enable you to use Drupal's update manager. In order for this to work, the FTP user you log in with must have write permission to the /var/www/html/sites/all directory. Now install the module filter module using the web-based method, i.e. download the zip file into /var/www/sites/all/modules and unzip it. Enable module filter and update manager modules.
- Now you should have a new link, "install new module", available on your module page. Use it to install install ctools and sweaver for styling your website. While you are at it, install the CKEditor module CKEditor module (a WYSIWYG editor). You'll need to use an FTP login that has write permission to the /var/www/sites/all directory. Note: if you can't get this to work, you can always install modules the old way. This might be slightly more convenient.
- Make sure you have Administrator, Editor, and Authenticated User roles set up on your server with appropriate permissions. In the next few days I will be creating three users on your lab web site: hpad, hped, and hpau. I'll also create hpau and hpad users on your dev website. When they have appeared, make the hpad users administrators, the hped user an editor, and leave the hpau users as a simple authenticated user.
- Install the CKEditor module (a WYSIWYG editor).
- Configure roles so that editors and authenticated users can access CKEditor and administrators can administer it.
- Enable the blog module and create a sample blog entry. Make sure it is present on the /blog page.
- Add a link to the blogs in your primary menu.
- Set up permissions so that editors (and administrators) can create and edit their own blog entries.
- Enable sweaver. Use it to customize some aspect of your theme. Then disable it again.
- Install and enable Mollom or reCAPTCHA to control spam.
mysqldump -u root -p drupal_mysite > mysite-todaysdate.sql
It's possible to mess up your web site, so you should make a backup before making significant changes. You can restore your website to an earlier version by deleting the database and restoring an older version. I won't add backup instructions to future labs—instead, you should make it a regular practice.
Similarly, before you upgrade a Drupal version, installing packages, etc. (or after
you have made changes and your site is working the way you want it to), you should do a
git commit. That is,
git add *
I will check your web site directly from the link on the course page. I'll also check that you've given appropriate permissions to the users I create and that you've emailed me a domain name and IP address preference.