Pages

Wednesday 29 August 2012

Drupal Website Building Tips - Part 6


Upload and download files

Whether a file is available for private or public download depends, of course, whether the page to which it is attached is available privately or publicly. In addition, there are methods for maintaining private download folders (for FTP or other access).

Public files / attachments

In general, files are "attached" to a page. See Uploading files with Drupal for information about changing permissions.
  • Attach a file to an existing page (examplepage):
Drupal -> Administer -> Content Management -> Content -> examplepage -> edit
-> File attachments -> Attach new file: your file to upload -> Attach -> Save

Increase uploaded file size limits

Add a quotation module

Add the Fortune module to Drupal

Fortune is a *nix utility to display quotations from preselected files. Drupal has a plugin to display these quotations from within a webpage. Although a nice module, a disadvantage is that it uses monospace font and currently does not have options to adjust the font type and size. See here for installation details.

Add the Quotes modules to Drupal

cd /etc/drupal/6/all/sites/modules
sudo wget http://ftp.drupal.org/files/projects/quotes-6.x-1.40.tar.gz
sudo tar zxvf quotes-6.x-1.40.tar.gz
sudo rm quotes-6.x-1.40.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Site building -> Modules -> Other -> Quotes (ticked) -> Save configuration
  • Create a Quotes content and import your quotations. You can create a quotation one by one, or a large number of Quotations all at once (from a file, for example). Each quotation is created as an individual content item. The "display in Quote blocks" option determines whether a Quotes block (created in the next step to display a rotation of the quotations) will include the particular quotation(s) created in this step.
Drupal -> Create content -> Quotes
->Name: Quote%id -> Display in quote blocks: (ticked)
I use quotations from the Fortune program, which are in a particular text file format that looks like:
I reject your reality and substitute my own...
%
This is one of those "What the hell am I doing?" moments, over!
%
We got a robot in the water, he's stuffed with tuna and it's just another day here at Mythbusters.
I copy the contents of the text file into the input box.
-> Format: Import Fortune file -> Comment settings: Disabled -> Save
This will create as many content items as are in the Fortune file. If there are hundreds of quotes, you will have hundreds of Quote content items.
  • Configure the Quotes settings so that Quotes can appear as a block:
Drupal -> Administer -> Site configuration -> Quotes
-> Configure blocks -> Name: Quotes -> Add block -> Configure block
-> Update options -> Update every 6 seconds
-> Show block on specific pages -> Show on only the listed pages: choose the pages to display on
-> Save block
  • Add the Quotes Block on your site:
Drupal -> Administer -> Site building -> Blocks -> Quotes:Quotes -> Location

Drupal Website Building Tips - Part 5


Use an SMTP server for email functions

I don't have a mail server on my system. Instead, I use an offsite mail handler that accepts the SMTP/POP3 protocols. Drupal can be configured to route its mail through SMTP/POP3 as well. If you are using SMTP, make sure outbound port 25 is open. If using secure SMTP (i.e. through SSL), then make sure outbound port 465 is open.

Install PHPMailer

  • Install the PHPMailer libraries on Ubuntu:
sudo apt-get install libphp-phpmailer
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/phpmailer-6.x-2.1.tar.gz
sudo tar zxvf phpmailer-6.x-2.1.tar.gz
sudo rm phpmailer-6.x-2.1.tar.gz
  • Copy the necessary files from the libphp-phpmailer Ubuntu package into the module directory:
sudo mkdir /etc/drupal/6/sites/all/modules/phpmailer/libraries
sudo cp /usr/share/php/libphp-phpmailer/class* /etc/drupal/6/sites/all/libraries/phpmailer
Note: If you wish these modules to be available to only one subsite, then install them instead into the /etc/drupal/6/sites/mysite_x/modules folder.
  • Note: You must update after module installation.
Drupal -> Administer -> Modules -> Mail -> select PHPMailer module functions to enable
  • Enter your SMTP settings:
Drupal -> Administer -> Site configuration -> PHPMailer

Add an online store to your website

Drupal has a completely free and powerful online store called Ubercart. Other solutions include Zen Cart and osCommerce.

Set up PayPal Website Payments Standard

  • Establish a bank account at your financial institution to be used exclusively with PayPal. Do not use your regular bank accounts, as PayPal will have access to both deposits and withdrawals from this account. (You can use a savings account, as all transactions between PayPal and the account will be electronic.)
  • There are basically two types of payment schemes for PayPal:
  • Website Payments Standard -- no monthly fee. 2.9% + $0.30 per (attempted) transaction. The customer goes to the PayPal site for payment then returns to the website.
  • Website Payments Pro -- $30 monthly fee. 2.9% + $0.30 per (attempted) transaction (less if significant volume). All transactions are performed through a gateway, without leaving the website.
  • In addition, there is Express Checkout for PayPal registered customers. The customer goes to the PayPal site then returns.
  • Until your needs are greater, Website Payments Standard is the least expensive solution to use. Create a PayPal Premier account. (The Premier account allows you to both buy and sell items.) Verify your email address and bank account. To verify your bank account, use the "Confirm deposits" method. (The instant verification method involves giving your secure online banking information (regarding your bank account) to PayPal, which is strongly advised against.) Verification of your bank account is a 4 day process, in general.

Create a PayPal Donate button

  • While logged in to the PayPal site, create your button(s) for donations (or payment or checkout) through the PayPal website.
PayPal -> Merchant Services -> Create Buttons -> Donate
  • Customise your button(s) as desired. When you "Create button" or "Save changes," the code for the button will be displayed. Copy the PayPal button code.
  • On your Drupal website, create a new block in which to display the newly created button. In this example I will place this new block in the right sidebar.
Drupal -> Administer -> Site building -> Blocks -> Add block ->
  • Block description: PayPal block
  • Block title: Donations
  • Block body: Paste the code from your PayPal button here
  • Input format: Full HTML
  • Customize other settings as desired -> Save block
  • Place the newly created block into the right sidebar:
Drupal -> Administer -> Site building -> Blocks -> PayPal block -> Disabled -> Dropdown: Right sidebar -> Save blocks

Install Ubercart on Drupal

cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/token-6.x-1.12.tar.gz
sudo tar zxvf token-6.x-1.12.tar.gz
sudo rm token-6.x-1.12.tar.gz
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/ubercart-6.x-2.0.tar.gz
sudo tar zxvf ubercart-6.x-2.0.tar.gz
sudo rm ubercart-6.x-2.0.tar.gz
Note: If you wish these modules to be available to only one subsite, then install them instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Ubercart -> select the Ubercart module functions you intend to use
  • PayPal requires cURL. Install the curl-php library in Ubuntu/Kubuntu (see this link for more info):
sudo apt-get install php5-curl
sudo /etc/init.d/apache2 restart
Drupal -> Administer -> Store administration

Setup PayPal with Ubercart

  • Undergoing revisions.
  • Check that a payment has been processed:
Drupal -> Administer -> Store Administration -> Orders -> View by status: Payment received

Trigger functions based on payment

The benefit of using Ubercart in Drupal is that access to website functions can be triggered based on a payment regimen. For example, access to webcam modules (such as videochat or webcams) can be enabled (using the ContentAccess module) after payment is processed by Ubercart through Paypal. This allows consumer-based telemedicine, a very desirable service for physicians.
Ubercart allows actions to be triggered, predicated on conditions being met (such as a PayPal payment notification being received). This can include the startup of other modules.
Drupal -> Administer -> Store administration -> Conditional actions

Add realtime videochat to your website

(This section under construction).
The following modules add videochat to Drupal:

Add BigBlueButton API

  • BigBlueButton is a standalone videoconferencing server. Install the BigBlueButton API that is able to call the BBB server from within Drupal:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/bbb-6.x-1.x-dev.tar.gz
sudo tar zxvf bbb-6.x-1.x-dev.tar.gz
sudo rm bbb-6.x-1.x-dev.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Big Blue Button -> select the Big Blue Button module functions you intend to use
  • Test the BigBlueButton settings:
Drupal -> Site administration -> BigBlueButton Conferencing -> Test connection.
  • Change the URL to the address of your BBB server (e.g. http://mybbbsite.dyndns.org:81/bigbluebutton/) and the Security Salt (found in bigbluebutton.properties on the BBB server in the
/var/lib/tomcat6/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
configuration file, in the setting:
beans.dynamicConferenceService.securitySalt=your_security_salt_number_here
  • Create a new content type named Teleconference:
Drupal -> Administer -> Content management -> Content types -> Add content type
-> Name: Teleconference -> Type: teleconference -> Big Blue Button settings -> Treat this node type as conference: (ticked) -> Show links to join / start a meeting beneath the node: (ticked) -> Display meeting status on node: (ticked) -> Save content type
  • Create a new node of content type Teleconference:
Drupal -> Create content -> Teleconference -> Conference settings -> ...

Add Kaltura video services

  • See these instructions for adding the API for the community edition of Kaltura, a video editor and manager for your website.

Drupal Website Building Tips - Part 4


Embed a video

  • You can easily embed a flash video from YouTube on any page. When creating a web page, make sure "Full HTML" is enabled as an input format:
Drupal -> Create content -> Page (or any content type) -> Input format -> Full HTML
For any YouTube video, the code which allows a video to be embedded on your website is found on the YouTube page in the upper right corner in the "Embed" box. Copy this code snippet.
In the "Body:" section of your Drupal Page (or other content), paste the code snippet and save. The video is now embedded on that page.

Add WYSIWYG editor

Apparently the choices here are FCKEditor, BUEditor, and TinyMCE editor. All require IMCE for image handling.
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/imce-6.x-1.3.tar.gz
sudo tar zxvf imce-6.x-1.3.tar.gz
sudo rm imce-6.x-1.3.tar.gz
  • Install one of the editors, such as BUEditor:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/bueditor-6.x-2.1.tar.gz
sudo tar zxvf bueditor-6.x-2.1.tar.gz
sudo rm bueditor-6.x-2.1.tar.gz
Note: If you wish these modules to be available to only one subsite, then install them instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Drupal -> Administer -> Modules -> Other -> select IMCE and BUEditor module functions to enable
Note: You must update and adjust permissions after module installation.

Update modules

Periodically, added modules are updated for security and functionality reasons. As always, backups are routinely advised before updating. In Drupal, most module updates are accomplished by overwriting old code with new code, not by patches. Therefore, if you have a highly customised installation, perform updates with care.
In this example, I will update Ubercart. Updating a module is essentially the re-installation of the new update, overwriting the old update.
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/ubercart-6.x-2.2.tar.gz
sudo tar zxvf ubercart-6.x-2.2.tar.gz
sudo rm ubercart-6.x-2.2.tar.gz
Note: If a module is available to only one subsite, install the update instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update after module re-installation.

Perform backups

Yeah, you need to do it. See the Drupal 6 backup instructions. Also see this module for customised backups.

Backup and migrate module

  • Install the Backup and migrate module. This module only supports MySQL, so if you are using postgreSQL, do not use it. Also, this module does not work if you intend to perform an upgrade. Do not use it for backup and restore during an upgrade (it can only be used to backup and restore to exactly the same version of Drupal6).
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/backup_migrate-6.x-2.2.tar.gz
sudo tar zxvf backup_migrate-6.x-2.2.tar.gz
sudo rm backup_migrate-6.x-2.2.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Drupal -> Administer -> Site building -> Modules -> Other -> select Backup and migrate module functions to enable
Note: You must update and adjust permissions after module installation.
The module saves manual backups by default to /etc/drupal/6/sites/mysite_x/files/backup_migrate/manual and cron-scheduled backups to /etc/drupal/6/sites/mysite_x/files/backup_migrate/scheduled, but you can (and should) change this:
Drupal -> Administer -> Backup and migrate -> Destinations
  • Perform a Quick backup into the "manual" backup directory:
Drupal -> Administer -> Backup and migrate -> Backup -> Quick Backup -> Backup from Default Database to Manual Backups Directory using Default Settings -> Backup Now

Backup and restore the MySQL database

  • This is an alternative to the Backup and migrate module that is necessary if you wish to backup during a migration of your website. The best way is to backup the original database with a MySQL dump:
mysqldump -u user -p databasename > drupaldatabasebackupfile.sql
or, if on a remote host:
mysqldump -h hostname -u username -p databasename > drupaldatabasebackupfile.sql
Note that the username and password should be the username and password that were used to create the specific database (not the MySQL root username/password).
  • The database should be restored to an empty database in the new site, because if you re-install a new database in the new site and then attempt to restore your old backed-up database on top of it, there is likely to be incompatibilities between the two. Here the username and password are those for the new empty database just created. (It probably is best to make them the same as those of the imported database.)
mysql -u username -p databasename < drupaldatabasebackupfile.sql
Notes: This was successful for me only if backing up and restoring to exactly the same version of Drupal6. I could not back up the database from one version of Drupal6 then restore to an upgraded version of Drupal6, because the scripts of the upgraded version of Drupal6 did not access the database in the same manner. I therefore performed upgrades only after moving the database.

Empty a database

I hesitate to put these instructions here. Be careful. This erases your database. Use it only if you are confident that you have made good backups. I use this only if I have created a database by accident (during the Drupal6 installation process) and wish to erase/empty it.
mysql -u root -p
mysql> DROP DATABASE mysqlexampledatabase;
mysql> quit
If your MySQL superuser name is something other than root, then use that, of course. Don't forget the semicolon ( ; ) at the end of each MySQL command.
Of course, once you erase the database, you must re-create a blank one for use with Drupal6.
sudo dpkg-reconfigure drupal6
Then you can restore the backup (as created above with mysqldump) into the newly recreated (but still empty) database.
mysql -u username -p databasename < drupaldatabasebackupfile.sql

Moving a Drupal6 installation to a new site

  • Install drupal6 on the new site (sudo apt-get install drupal6). When creating the database, use the same values as used on the old site. If you can't remember what they were, look at the /etc/drupal/6/sites/default/dbconfig.php (or similar) file for the old site (which contains the values for the old site).
  • On the new site, rename the newly created folders
  • /etc/drupal/6
  • /usr/share/drupal6
  • /var/lib/drupal6
to
  • /etc/drupal/6.bak
  • /usr/share/drupal6.bak
  • /var/lib/drupal6.bak
  • Copy the /etc/drupal/6, /usr/share/drupal6, and /var/lib/drupal6 folders from the old site to the new site. (This needs to be done as the root user, which can be done with sudo dolphin).
  • Copy the database dumpfile from the old site to the new site.
  • Check the settings.php, dbconfig.php, files and other folder permissions to make sure they match the permissions of the original system. (Sometimes during the copy process the ownership of all files and folders will be set to root.) In particular, make sure that dbconfig.php belongs to the www-data group.
Notes: I have never been successful in performing an upgrade in the middle of this process. I recommend moving the site exactly, and then performing any upgrades after it is moved.

Drupal Website Building Tips - Part 2


Install content creation kit (CCK) and other important modules

  • If you have a multi-site installation, create modules and themes folders within the /etc/drupal/6/sites/mysite_x folder, which will be specific to that site. If you wish to use modules and themes for all your subsites, then create modules and themes folders in the /etc/drupal/6/sites/all folder.
If you install your custom modules and themes in the root installation directory (/usr/share/drupal6), then they will be overwritten every time you do an upgrade, (which may or may not be desirable to you).
  • Although the recommended procedure is to install each module one-by-one (updating and setting the functions for each installed module individually), you may be able to install them all, update once, then set the functions for all the module simultaneously. This will only work if you have increased the PHP memory (as detailed in the previous step).
  • Install the CCK module:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/cck-6.x-2.6.tar.gz
sudo tar zxvf cck-6.x-2.6.tar.gz
sudo rm cck-6.x-2.6.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> CCK -> select CCK module functions to enable
  • Install the Views module:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/views-6.x-2.10.tar.gz
sudo tar zxvf views-6.x-2.10.tar.gz
sudo rm views-6.x-2.10.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Views -> select Views module functions to enable
When you wish to configure the Views properties of a content node, go to:
Drupal -> Administer -> Site Building -> Views -> Enable and Edit the node Views you wish to use
  • Install the Date module:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/date-6.x-2.4.tar.gz
sudo tar zxvf date-6.x-2.4.tar.gz
sudo rm date-6.x-2.4.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Date/Time -> select Date/Time module functions to enable
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/jquery_ui-6.x-1.3.tar.gz
sudo tar zxvf jquery_ui-6.x-1.3.tar.gz
sudo rm jquery_ui-6.x-1.3.tar.gz
cd /etc/drupal/6/sites/all/modules/jquery_ui
sudo wget http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip
sudo unzip jquery.ui-1.6.zip
sudo rm jquery.ui-1.6.zip
sudo cp -r jquery.ui-1.6 jquery.ui
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> User interface -> select jQuery UI module functions to enable
  • Install the Event module:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/event-6.x-2.x-dev.tar.gz
sudo tar zxvf event-6.x-2.x-dev.tar.gz
sudo rm event-6.x-2.x-dev.tar.gz
  • Install a few miscellaneous Event:Datepicker modules (see this thread):
cd /etc/drupal/6/sites/all/modules/event/contrib/datepicker
sudo wget http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/styles/datePicker.css
sudo wget http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/jquery.datePicker.js
sudo wget http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/date.js
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Event -> select Date Picker module functions to enable
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/signup-6.x-1.0-rc6.tar.gz
sudo tar zxvf signup-6.x-1.0-rc6.tar.gz
sudo rm signup-6.x-1.0-rc6.tar.gz
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/calendar-6.x-2.2.tar.gz
sudo tar zxvf calendar-6.x-2.2.tar.gz
sudo rm calendar-6.x-2.2.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Date/Time -> select Calendar module functions to enable
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/advanced_help-6.x-1.2.tar.gz
sudo tar zxvf advanced_help-6.x-1.2.tar.gz
sudo rm advanced_help-6.x-1.2.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Other -> select Advanced Help module functions to enable
  • Install the FeedAPI module (allows iCal feeds into Drupal):
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/feedapi-6.x-1.8.tar.gz
sudo tar zxvf feedapi-6.x-1.8.tar.gz
sudo rm feedapi-6.x-1.8.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Feed API Add-on -> select iCal parser module to enable
  • Install the iCal parser module (parses iCal feeds into Drupal):
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/parser_ical-6.x-1.1.tar.gz
sudo tar zxvf parser_ical-6.x-1.1.tar.gz
sudo rm parser_ical-6.x-1.1.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Feed API Default -> select Feed API module functions to enable
  • Install SimplePie, a module that facilitates RSS feeds through the FeedAPI module:
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/simplepie-6.x-1.0-beta1.tar.gz
sudo tar zxvf simplepie-6.x-1.0-beta1.tar.gz
sudo rm simplepie-6.x-1.0-beta1.tar.gz
cd /etc/drupal/6/sites/all/modules/simplepie/lib
sudo wget http://simplepie.org/downloads/simplepie_1.2.zip
sudo unzip simplepie_1.2.zip
sudo rm simplepie_1.2.zip
sudo cp simplepie_1.2/simplepie.inc .
sudo cp simplepie_1.2/simplepie.inc /etc/drupal/6/sites/all/modules/feedapi/parser_simplepie
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Other (and FeedAPI Default) -> SimplePie module functions to enable
  • (Optional:) Install the dCaldav module (for importing CALDAV server info into Drupal):
cd /etc/drupal/6/sites/all/modules
sudo wget http://www.dcaldav.com/system/files/dcaldav-0.2.1.tar.gz
sudo tar zxvf dcaldav-0.2.1.tar.gz
sudo rm dcaldav-0.2.1.tar.gz
Note: If you wish this module to be available to only one subsite, then install it instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
Drupal -> Administer -> Modules -> Other -> select dCaldav module functions to enable

Install Access Control modules

  • Install the ACL module (an API that allows per-user access controls in Drupal):
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/acl-6.x-1.0.tar.gz
sudo tar zxvf acl-6.x-1.0.tar.gz
sudo rm acl-6.x-1.0.tar.gz
  • Install the Content Access module (gives fine-grained access control over individual content pages):
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/content_access-6.x-1.2.tar.gz
sudo tar zxvf content_access-6.x-1.2.tar.gz
sudo rm content_access-6.x-1.2.tar.gz
  • Install the Forum Access module (gives fine-grained access control over individual forum pages):
cd /etc/drupal/6/sites/all/modules
sudo wget http://ftp.drupal.org/files/projects/forum_access-6.x-1.0.tar.gz
sudo tar zxvf forum_access-6.x-1.0.tar.gz
sudo rm forum_access-6.x-1.0.tar.gz
Note: If you wish these modules to be available to only one subsite, then install them instead into the /etc/drupal/6/sites/mysite_x/modules folder.
Note: You must update and adjust permissions after module installation.
  • Drupal -> Administer -> Modules -> Forum Access -> select ACL, Content Access, and Forum Access module functions to enable -> Rebuild Permissions (follow the prompts)
  • You must enable Access Control for each Content Type:
Drupal -> Administer -> Content Management -> Content types -> Page -> Edit -> Access Control -> Enable per content node access control settings: ticked

Enable permissions for added modules

  • Any time a new module is installed or the configuration of the module is changed, the database must be updated. This is especially important if you are running multiple sites, since configuration files must be created for each subsite. Updates can only be done by an administrator with suitable privileges for that site (usually the original user for the site or subsite):
http://mysite_x.mydomain.org/update.php
  • By default, permissions are turned off for any new modules that you have installed. After installing a new module, go to the permissions page and select permissions for each user role that will be able to access the functions of the new module(s):
Drupal -> Administer -> User management -> Permissions
and tick or un-tick the features that should be available to each class of user.