Drupal 6 modules

Notes on various Drupal 6 modules.

Also see Drupal 6 custom content type for info about modules related to content types.

My notes on Drupal 7 modules could also be useful because modules may not have changed significantly between releases. I don’t add information to this page much any more as I mostly work on D7.

Index

Essential Modules

When I say “essential modules” I mean those modules that will be installed on most web sites.

User protect

User protect

  1. Install and enable as usual.
  2. Administer -> User management -> User Protect.
  3. By default, users with ‘administer user’ permission bypass all protections i.e. can still edit/delete anything/anyone. To prevent this, untick everything under ‘Administrator bypass default’ in the ‘Protection defaults’ tab -> ‘Administrator bypass defaults’ section.
  4. Also check out permissions in Administer -> User management -> Permissions -> ‘userprotect module’ section.

Important note: In order to protect a user from deletion (by visiting user/X/delete directly) and/or OpenID edits (by visiting user/X/openid directly), you must enable the ‘delete’ and/or ‘openid’ protection specifically. Enabling ‘all account edits’ does not enable these protections!

Token

Token

Required by Pathauto module (and many others).

Pathauto

Auto remove node IDs from URLs. Note that the core Path module allows users to rename paths, but doesn’t do it automatically.

Pathauto

  1. Enable clean URLs at Administer -> Site configuration -> Clean URLs.
  2. Enable Path module.
  3. Install Token module.
  4. Install Pathauto module.
  5. Configure URL aliases to set the default path pattern for Nodes to content/[menupath-raw], via Administer -> Site building -> URL aliases, ‘Automated alias settings’ tab, ‘Node paths’ section.
  6. To have UTF-8 characters translated into ASCII (as per URL spec requirements), turn on transliteration. You’ll need a file that tells the module how to transliterate, e.g. sites/all/modules/pathauto/i18n-ascii.txt.
  7. Before saving the configuration, generate all aliases by ticking ‘Bulk generate aliases for nodes that are not aliased’ and the similar bulk generation checkboxes in the ‘User contact form paths’, ‘Taxonomy term paths’ and ‘User paths’ sections.

Note: If you don’t have any taxonomy vocabularies yet, you will get an error on bulk update of taxonomy term paths:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) LIMIT 0, 50’ at line 1 query: SELECT tid, vid, name, description, src, dst FROM term_data LEFT JOIN url_alias ON CONCAT(‘taxonomy/term/’, CAST(tid AS CHAR)) = src WHERE src IS NULL AND vid <> 0 ) LIMIT 0, 50 in /home/bn/f3/dev/webapps/drupal/f3drupal/sites/all/modules/pathauto/pathauto_taxonomy.inc on line 84.

Just ignore it.

Auto-generate all aliases

If you want to auto-create all aliases using Pathauto, but you installed it after Path has already been used to create aliases that are used (i.e. linked to) on your site, then you can prevent the existing aliases being deleted by Pathauto:

  1. Administer -> Site building -> URL aliases, ‘Automated alias settings’ tab -> ‘General settings’ section.
  2. Set ‘Create a new alias. Leave the existing alias functioning.’ in the ‘Update action’ part.
  3. Create or recreate the aliases. See below.

Configure alias formats

You can configure the paths generated via Administer -> Site building -> URL aliases, ‘Automated alias settings’ tab. I’ve been unable to find a page that lists all available tokens (e.g. [title-raw]), but some of those available can be found in sites/all/modules/token/token_node.inc. Note that the “raw” version of tokens should be used otherwise there may be problems. Raw tokens can contain user-submitted data, unfiltered by Drupal, but pathauto filters them.

To have the path reflect the content hierarchy (as achieved via the menu), set the ‘Default path pattern’ in ‘Node path settings’ to content/[menupath-raw].

After changing the settings, recreate the aliases as described below.

Create aliases for pages that don’t yet have them

  1. Administer -> Site building -> URL aliases -> Automated alias settings -> Node paths.
  2. Tick ‘Bulk generate aliases for nodes that are not aliased’.
  3. If required, do the same for taxonomy term paths and user paths.
  4. Save.

Recreate pathauto URL aliases

Delete all aliases via Administer -> Site building -> URL aliases, ‘Delete aliases’ tab, then create them as described above.

Alternatively you could re-save any existing content to have path aliases auto generated, but this is obviously time consuming with many nodes.

XML sitemap

XML sitemap

To create an XML sitemap that abides by the sitemaps.org spec.

  1. Install as normal.
  2. Enable ‘XML Sitemap’, ‘XML sitemap engines’, ‘XML sitemap node’, ‘XML sitemap taxonomy’, ‘XML sitemap user’. ‘XML Sitemap menu’ is not required.
  3. Administer -> Site configuration -> XML sitemap, Setting tab.
  4. Expand ‘Taxonomy’ section, click on the taxonomies you’d like to include in the map and set Inclusion to ‘Included’ in their ‘XML Sitemap’ section.
  5. Do the same for the appropriate content types in the ‘Content’ section.
  6. To generate the sitemap, run cron.php or ‘Rebuild links’ via Administer -> Site configuration -> XML sitemap.
  7. The sitemap should be available at /sitemap.xml.
  8. Administer -> Site configuration -> XML sitemap, Search Engines tab.
  9. Tick all engines and save.

Note: Do not generate sitemap items for the user profile pages unless anonymous users have permission to view them.

i18n

  1. Enable ‘XML Sitemap Internationalization’ submodule if you’ve a multi-language site.
  2. For some reason, the default sitemap won’t work. To fix this, edit then immediately save the default sitemap (this will set its language to the default, e.g. English). The URLs /sitemap.xml and /en/sitemap.xml should now both work.
  3. Add other sitemaps for each language.

Menu Breadcrumb

Uses menu hierarchy to generate breadcrumb (admin breadcrumb will still work).

  1. Install and enable as usual.
  2. Configuration can be done via Administer -> Site configuration -> Menu breadcrumb.
  3. One option that may be worth ticking is ‘Hide the breadcrumb if the breadcrumb only contains the link to the front page’.

Note: The breadcrumbs won’t show unless the theme supports it. Check the theme settings at Administer -> Site building -> Themes.

Gotchas

  • If you want the menu breadcrumbs to work with a view, you have to give the view a menu item via the view config, even if you then go on to disable it via menu config and add another item deeper in the menu.
  • It doesn’t work properly when a page has a menu item in multiple menus - I think the first menu will be used for the breadcrumb.

Menu block

Enables you to create blocks that output different types of menus, configurable by source, start point, depth, expanding behaviour etc.

  1. Install as normal.
  2. Administer -> Site building -> Blocks, ‘Add menu block’ tab.

Conditional Stylesheets

Conditional Stylesheets

Allows conditional stylesheets to be specified in theme.info file, e.g…

conditional-stylesheets[if lt IE 7][all][] = ie6_and_below.css

Core module. Provides a basic search box that after initial search offers advanced options for e.g. searching within a particular taxonomy. Indexing is done via cron.

  1. Enable ‘Search’ module as normal.
  2. Administer -> Site configuration -> Search settings.
  3. Configure access to basic/advanced search via Administer -> User management -> Roles.

Customisation

Can we customise advance search?

Search configuration

Search configuration

To configure the advanced search form.

  1. Enable as normal.
  2. Enable access in ‘search_config module’ section of Administer -> User management -> Roles.
  3. There should now be an ‘Advanced search configuration’ section at Administer -> Site configuration -> Search settings.
  4. Node types excluded from search index should also be excluded from search form.

Better Formats

Better Formats

Allows you to set different default input formats/filters, by role, for nodes, comments or blocks.

  1. Install as normal.
  2. To be on the safe side, it’s probably best to have site default filter as whichever has most filtering / least markup control, then allow use of other filters via the defaults, as follow.
  3. Set defaults via Administer -> Site configuration -> Input formats, Defaults tab.
  4. Roles are matched in the order they appear in the defaults list, so be sure to drag custom roles above the Authenticated user role, otherwise the filter default for logged-in users will always be that set for Authenticated user.

WYSIWYG

Note: This module did not work properly with YUI - all buttons were displayed on the left regardless of settings and there was no image uploading. Not tried any other editors. See YUI Editor module notes below.

Wysiwyg

To set up a number of possible WYSIWYG editors.

  1. Install the module as normal.
  2. Administer -> Site configuration -> Wysiwyg. Download chosen editor and extract into directory listed in instructions on that page.
  3. Select your editor for Filtered and Full HTML.
  4. Click Edit link to edit editor settings.

For YUI…

  1. Add buttons to the editor via Buttons and Plugins. Best not to add any that create fonts or mess with colouring.
  2. Filtered HTML only allows <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>, so ensure chosen buttons will only output those.
  3. Editor appearance -> Button allignment: centre.
  4. Cleanup and output -> Force cleanup on standard paste.

For FCKeditor…

  1. Add buttons to the editor via Buttons and Plugins.
  2. Enable ‘Force cleanup on standard paste’ in ‘Cleanup and output’ section, to prevent user pasting in dodgy content.

IMCE

IMCE

For image uploading with some WYSIWYG editors that don’t provide it (e.g. FCKeditor).

  1. Install module as normal.
  2. Administer -> Site configuration -> IMCE.
  3. Set profile for authenticated users to ‘Sample profile’ (or create a custom one).
  4. You can set add/edit/delete/resize/thumbnail permission on different directories, using placeholders to e.g. limit a user to their own directory (sites/default/files/u%uid).

Install IMCE Wysiwyg API bridge module for easy integration with FCKeditor or TinyMCE.

IMCE Wysiwyg bridge

IMCE Wysiwyg bridge

This adds an IMCE button option to the button config for FCKeditor (tested) and TinyMCE (apparently).

IMCE mkdir

IMCE Mkdir

Allow users to create subfolders.

Custom Permissions

Custom Permissions

Adds granularity to ‘Administer site configuration’ permission, to allow e.g. permission to administer site information without permission to access any other site configuration.

  1. Install and enable ‘Site Configuration Permissions’ (at the time of writing, the module is going through a name change).
  2. Administer -> Site configuration -> Site Configuration Permissions. You’ll see a whole load of permissions have been added.
  3. To grant administer site information without anything else…
    1. Administer -> User management -> Permissions, ‘config_perms module’ section.
    2. Grant ‘dispay site configuration menu’ and ‘administer site information’.

Access Control

Probably the neatest solution is Taxonomy Access Control, because normal content and forums can be associated with taxonomies and it allows defaults (unlike TAC Lite).

Another option is a combination of Content Access for content types (unsetting all access control for forum posts) and Forum Access for forums, though they are administered in slightly different ways.

Core private downloads

This serves all files through Drupal so it can apply whatever access mechanisms apply to the nodes to which the files are linked.

  1. Administer -> Site configuration -> File system.
  2. Set Private download mechanism. All files will now be served via /system/files/ instead of via /sites/default/files/, allowing Drupal to control access.

To prevent files being accessed via direct link to /sites/default/files/…

Either:

  1. Move files directory out of the drupal root so that Apache can’t serve them (see Setting private download method tutorial).
  2. Set ‘File system path’ accordingly (via Administer -> Site configuration -> File system).

Or:

  1. Set the following in /sites/default/files/.htaccess:

    Order deny,allow
    Deny from all
    

Core permissions

Permissions reference

View own

View own

Splits the view/edit/delete permissions into ‘view/edit/delete own content’ and ‘view/edit/delete any content’, particularly useful when combined with CCK and Views modules to create custom databases of user-submitted data.

Note: You will probably have to rebuild permissions via Administer -> Content management -> Post settings.

Content Access

Content Access

This adds an ‘Access Control’ tab to a content type’s edit page (Administer -> Content management -> Content types, ‘edit’ link for a content type) so that you can configure access control by role for each content type. The permissions available are the same as normal, so only view/edit/delete. You can also set permissions on a per-node basis.

This module is not good at assigning different access permissions to different groups of nodes - you can only do it for all nodes of a particular type (e.g. all pages) or for each node of a particular type (e.g. each individual page). For a site where some pages are public and others private, you’d prevent anonymous users viewing the Page content type, then give them permission to view particular pages.

For forums, the modules can only control access to forum topics, because only topics are nodes but other entities are not (categories and forums are achieved via taxonomy vocabulary terms). To achieve access control over forums at the category/forum level, you can use the Forum Access module.

Block Access

Block Access

Adds fine grained permissions for administering blocks.

  1. Install and enable as usual.
  2. Grant ‘Administer blocks’ permission at Administer -> User management -> Permissions. This is required in order to view the block admin page.
  3. Global permissions that apply to all blocks can be found at Administer -> User management -> Permissions, ‘block_access module settings’ section.
  4. Permissions over all blocks created by a particular module can be found at Administer -> Site building -> Blocks, ‘Block Access Settings’ tab.
  5. To allow a role to edit a particular block, edit the block and select the role under the ‘Role specific view settings’ and ‘Role specific config spec’ sections. Note: The view permission is required to view the block in the block admin page. It does not control whether the block is visible on the site.
  6. The ‘Role specific config spec settings’ grants access to change the block-specific settings, e.g. the content of a block.

Bugs

  • There seems to be an oddity whereby setting block-specific permissions for the first time will also set the Block Access Settings, so the permissions will apply to all blocks of the same types. To get around this, just remove the changes from the Block Access Settings and update the block-specific permissions again. From there on in the block-specific permissions should no longer be applied to the Block Access Settings.

Forum Access

Forum Access

Requires ACL module: ACL

  1. Install ACL module then forum access module as normal.
  2. Access control setting will be available when you edit a container/forum via Administer -> Content management -> Forums, edit container/forum link.
  3. If using the Content Access module, deselect all of its access control settings for the forum topic node type via Administer -> Content management -> Form topic, ‘Access Control’ tab.

Taxonomy Access Control (TAC)

Taxonomy Access Control

Using Taxonomy Access Control module:

Allows you to control access via taxonomies, hence very flexible.

  1. Install the module as usual.
  2. Administer -> User management -> Taxonomy access permissions.
  3. Edit a role.
  4. Each action view/update/delete/create/list has access controls - Allow, Ignore, Deny.
  5. Add a new category for a role (e.g. and set access controls.
  6. Perhaps best to set the global default category for anonymous and authenticated users to deny and for other roles to ignore. That way all roles will inherit deny by default.

Note that when a user has access to create content be sure to have TAC allow them to create the appropriate vocabulary terms. In the case of forum topics, if the user can create a topic they must also be able to create the terms that define the topic’s forum (and its container). Permission to list forum vocab terms will determine whether they can see the particular forums or not.

Note also that the global default settings apply to any content that’s created without association with a taxonomy vocab, e.g. by modules like Content Profile. So for example if you’ve got a taxonomy set up for access control of nodes you may have problems accessing any nodes created by modules which don’t apply any vocab terms if you set the default for the vocab to deny access. The only way around this is to set to default to allow then override for all other relevant vocabs.

Taxonomy Access Control Lite

Taxonomy Access Control Lite

Allows you to control access via taxonomies, but not as powerful as TAC and critically doesn’t allow you to set defaults for missing/new vocabulary terms.

  1. Install and enable as usual.
  2. Create and access control “scheme” by going to Administer -> User management -> Access control by taxonomy. Choose a vocabulary for a scheme and save.
  3. Click the scheme’s tab to edit it. Choose the permissions to assign and the vocabulary terms by role and save the scheme.

E.g. You could create a vocabulary called “Forum Privacy” with terms “public”, “members”, “editor” and “admin”, then create schemes to assign view, edit and delete permissions to those terms.

The major downside to this module is that there is no “all” option when selecting terms, so you have to edit the schemes every time a new term is created (e.g. when you create a new forum).

Data import

Table Wizard

Table Wizard

Requires Schema and Views.

  1. Install as normal (and the Schema and Views modules).
  2. Administer -> Content management -> Table Wizard.
  3. TODO

Schema

Schema

Required by Table Wizard.

Additional modules

Secure Pages

Secure Pages

Force SSL when creating or editing content, viewing user details, or administering the site.

Editable blocks

Editable blocks

Allows editable blocks to be created, the contents of which can be edited by users without full ‘administer blocks’ permission.

  1. Install and enable as normal.
  2. Grant at least ‘edit editable blocks’.
  3. Create a new editable block.
  4. The user (with edit permission) can now edit the block via the ‘edit’ link that appears by the block when they’re logged in.

Backup and Migrate

Backup and Migrate Files

Has the capability of dumping the database periodically, allowing automated backups to be taken from shared hosting via FTP.

Filefield Sources

Filefield Sources

Useful to link IMCE with image/file fields.

  1. Install and enable as normal.
  2. Content management -> Content types -> manage fields (for the desired content type) -> Configure (the desired field).
  3. ‘File sources’ section, select IMCE as source.

Filefield Paths

Filefield paths

Allows you to use node tokens for the upload path of file upload fields.

  1. Install and enable as normal.
  2. Content management -> Content types -> manage fields (for the desired content type) -> Configure (the desired field).
  3. In the File Path Settings section, you’ll have a list of file name replacement patterns, which should now include node tokens.

Imagefield Tokens

ImageField Tokens

Requires Filefield Paths.

Allows you to use node tokens for the image alt and title (where image is created by file field). E.g. For an image you could allow user defined alt text and set its default to use the [title] token.

  1. Install and enable Filefiels Paths, then Imagefield Tokens, as normal.
  2. Node tokens will be available for image alt and title.

NOTE: This can’t be used with Link Checker as it links to the home page if the node ID isn’t found, hence link checker can’t detect broken links.

MultiLink

  1. Install and enable the module as normal. Can also enable MultiLink Redirect for i18n support.
  2. Configure a filter at Administer -> Site configuration -> Input filters and enable MultiLink filter.

You should now be able to use the following shortcuts in your node body:

[123:$] to link to node 123 using its title.
[123:foo bar] to link to node 123 using the words "foo bar".

CKEditor

CKEditor

CKEditor Link

Adds support to CKEditor for linking to nodes.

  1. Install and enable as normal.
  2. Edit the CKEditor config at [drupal]/sites/all/libraries/ckeditor/config.js:

    CKEDITOR.editorConfig = function( config )
    {
      ...
    
      // For CKEditor Link module.
      if (Drupal.settings.ckeditor_link) {
        config.extraPlugins += (config.extraPlugins) ? ',drupal_path' : 'drupal_path';
        CKEDITOR.plugins.addExternal('drupal_path', Drupal.settings.ckeditor_link.module_path + '/plugins/link/');
      }
       
    };
    
  3. Give roles permission to use it via Administer -> User configuration -> Permissions by granting ‘access ckeditor link’ in the ‘ckeditor_link module’ section.
  4. Configure relevant input filters at Administer -> Site configuration -> Input formats and enable the CKEditor Link Filter.
  5. Edit WYSIWYG settings for the relevant input filter at Administer -> Site configuration -> WYSIWYG and enable its CKEditor Link button (Link also has to be enabled).

You should now get a Drupal option for Link Type when you create a link using the editor. It generates links like <a href=”/node/1”>foo</a> then replaces the /node/1 with the actual clean URL on display.

Only down side is that by default it uses the URL as link text, instead of node title.

Link Checker

  1. Install and enable as normal.
  2. Grant the appropriate permissions via Administer -> User configuration -> Permissions, ‘linkchecker module’ section.
  3. Select the things you’d like to scan at Administer -> Site configuration -> Link checker.
  4. After cron has run a report will be available at Reports -> Broken links.

Upload

Upload

Allows editors to attach files to their content.

  1. Give all roles (including anonymous users) permission to ‘view uploaded files’ at Administer -> User management -> Permissions.
  2. Give editors permission to ‘upload files’.

Profile Category Weights

Profile Category Weights

Lets you change the order of profile categories.

  1. Install as normal.
  2. Administer -> Site configuration -> Profile Category Weight.

Protect Critical Users

Note: User Protect module is better, essential for Drupal 6, and can do the same things as this module anyway.

Protect Critical Users

Prevents user id 0 (anonymous user), id 1 (admin) and current user being deleted.

Important: The users can still be edited, which means passwords can still be changed, so non admin can gain admin access if they can administer users! Use the User Protect module to protect edits as well as deletes.

  1. Install and enable as usual.

NOTE: Do not use this for now - it wasn’t working properly last time I tried.

Menu Subtree Permissions

Grants users ability to add content to a particular menu without full blown menu admin access. It only works on manually created menus, not default Drupal menus (see menu notes below).

  1. Administer -> Site building -> Menus.
  2. Select a menu, edit it, then in the ‘Menu Sub-tree Permissions’ section choose the role it’s available to and save.

Note that you no longer have to grant the user permission to ‘administer menu’ as you would without this module (see menu notes below).

Caveats

  • Regardless of how many menus you set available to a role, the only one that will show when creating content is the one selected as default menu for content in Administer -> Site building -> Menus -> Settings tab.
  • It only works when you create new content - editing content does not allow you to change its menu settings.

Menu Admin per Menu

Adds “administer ‘menuname’ menu items” to the permissions page, so that users can add nodes to some menus but not others.

  1. Administer -> User management -> Permissions.
  2. Grant access to ‘access administration pages’.
  3. Grant access to the appropriate menus in the ‘menu_admin_per_menu module’ section.

WYSIWYG Filter

Allows you to create filters to get rid of any nasty markup output by the WYSIWYG editor.

  1. Install.
  2. Create new filter or edit an existing one at Administer -> Site configuration -> Input formats. Tick ‘WYSIWYG Filter’ option and save.
  3. Configure the filter (via its ‘Configure’ tab). The following ‘HTML elements and attributes’ seem good for use with the Full HTML input format using most CKEditor buttons:

    a[href|name|title],
    img[!src|!alt|style],
    -p[style],
    -div[class],
    br,-h2,-h3,-h4,-h5,-h6,-em,-strong,-strike,-sup,-sub,-address,-pre,-cite,-code,-blockquote,-ul,-ol,-li,-dl,-dt,-dd,-span,
    -table[align|border|cellpadding|cellspacing|style|summary],-tr,-td,-th[scope],-thead,-tbody,-captiona[!href],
    
  4. The format is a comma-separated whitelist of tags with their allowed attributes. - specifies that empty elements should be removed. ! specifies an attribute must be included. An attribute’s presence indicates it’s allowed.
  5. Allow whatever styles you need in the ‘Style properties’ section. The following seem good for use with the Full HTML input format using most CKEditor buttons (and the f3 customisations):

    margin,margin-left,height,width,float
    
  6. Set allowed classes (and ids and URLs) in the ‘Advanced rules’ section. This is necessary is allowing a class on div tags for YAML’s ‘float_right’ and ‘float_left’ styling.
  7. Add the site’s domain to the whitelist in ‘Spam link deterrent settings’ section.
  8. Rearrange it to be above HTML corrector (not sure why - it’s in the installation instructions).
  9. Add editor to filter via Administer -> Site configuration -> Wysiwyg.

Embedded Media Field

Embedded Media Field

Allows you to add fields to your content types for referencing third party media sources, e.g. flickr, youtube.

Node Picker

Node Picker

Add a button to WYSIWYG which allows you to easily insert a link to existing nodes. Can filter by node name and content type.

Poor Man’s Cron

Poor Man’s Cron

For use if cron is not available on the server. Calls the maintenance page via AJAX. Requires regular visitors to the site.

  1. Install as normal.
  2. To configure how often cron will run, change the setting at the bottom of Administer -> Site configuration -> Site information.

Locale, Content Translation, i18n and Language Icons

The Locale and Content Translation modules are built in. They allow you to translate the Drupal UI and content. They don’t however have any support for multi-lingual menus, block and other features. For that, install the i18n module package, which will add a number of modules for translating different Drupal artifacts. The Language Icons module changes the language switch block to use icons.

  1. Enable Content Translation and Locale modules.
  2. Download translation from http://drupal.org/project/translations and extract into root directory. This will create ‘translations’ directories all over the place.
  3. Enable language from Administer -> Site Configuration -> Languages -> Add Language.
  4. Change language negotiation to ‘Path prefix with language fallback’ in Administer -> Site configuration -> Languages -> Configure tab.
  5. Active the Language switcher block by placing it in e.g. the header. Administer -> Site building -> Blocks.
  6. Enable content translation for each content type by editing it from Administer -> Content management -> Content types and choosing ‘Enabled, with translation’ in the Workflow section.

For the advanced capabilities offered by i18n module:

  1. Install the i18n module and enable at least ‘Content type translation’, ‘Internationalization’, ‘Menu translation’, ‘Taxonomy translation’ and their dependencies. A ‘Multilingual system’ tab will be added to Administer -> Site configuration -> Languages, but the defaults are good.
  2. Install the ‘Language Icons’ module to include flags in the language switch.
  3. Administer -> Site configuration -> Languages, Configure tab, Icons sub-tab to configure icons - their path, size and how they are used in the language switcher block (e.g. flags and text, flags only, etc).

URL aliases

By default, the default language doesn’t use a prefix for its URL alias. If you’d like the default language to use a prefix, for consistency:

  1. Administer -> Site configuration -> Languages.
  2. Edit the default language.
  3. Set its path prefix.

Gotchas

If you are on a page that doesn’t have a translation, then use the language switcher block to switch languages, the same page will still be shown (though the menus will probably changes).

To get around that either use the Translation 404 module or write a custom module (which I’ve done - ‘f3 Translation Not Found’ module).

Translation 404

Translation 404

Provides a custom 404 page for when a translation isn’t found (as opposed to the default, whereby the same page will still be shown though the menus may change).

  1. Install as normal.

Bug: The default behaviour is to load the module’s translation404-page.tpl.php, which shows a message for all languages. Though it doesn’t seem to have a variable available to it that gives the current language, I believe you can use the global $language variable to determine language and show a language-specific message. However, the module seems to have a bug that prevents the template being overridden in your theme. See Can’t override template.

So, instead, can create a custom module that uses hook_nodeapi to redirect and display a message if a translation isn’t available. I’ve done this as the ‘f3 Translation Not Found’ module.

Forums

Forums

Must add a menu item pointing to ‘forum’ in order to get a link to the forums.

Comments serve as replies.

Permissions for authenticated users should allow creation of forum topics at least. Will also need permission to create comments.

YUI Editor

  1. Install YUI and YUI Editor module.
  2. Download latest YUI supported by the module and extract to sites/default/files/lib/yui-x.x.x, where x.x.x is the latest version supported, e.g. yui-2.6.0 at the time of writing. Available YUI Downloads
  3. Set location of YUI library at Administer -> Site configuration -> YUI Common Settings. Ignore the note to enter the path as files/lib - it should be the full path from drupal root e.g. sites/default/files/lib/yui-2.6.0.
  4. Edit default editor profile at Administer -> Site configuration -> YUI editor settings.
  5. Choose a role and enable ‘Resize’, ‘Use P tags’, ‘Image upload’ and ‘Coder button’.
  6. Use ‘Custom’ button profile and remove controls for font, font size, font colour, background colour and underline (because links are underlined).
  7. Grant permission for role to use editor. Administer -> User management -> Permissions, ‘Access YUI and ‘access yui editor’.

For image uploading (if not already set up):

  1. Enable Upload module. Upload
  2. Give user permission to ‘upload files’ and ‘view uploaded files’ at Administer -> User management -> Permissions.

Create a page using Full HTML. Note that using Filtered HTML will prevent images and other filtered content from showing. To disable Filtered HTML:

  1. Administer -> Site configuration -> Input formats.
  2. Select Full HTML as default and ‘set default format’.
  3. Configure Filtered HTML and remove all roles.
  4. Configure Full HTML, add all desired roles.
  5. Optionally enable ‘HTML corrector’ and ‘URL filter’ are enabled.

Advertisment

  1. Install as usual.
  2. Enable “sub”-modules ‘Ad’, ‘Ad report’, ‘Image Ad’, ‘Ad click filter’ and any others you require.
  3. Set limit on image size and dimensions via Administer -> Site building -> Ad, Settings tab -> Image Ad tab.
  4. Grant ‘show advertisments’ permission for all roles that need to view ads via Administer -> User management -> Permissions.
  5. Create a new ad via Create content -> Advertisment.
  6. Display ads in blocks via Administer -> Site building -> Blocks.

Note: One “out of the boxes” options for creating auto rotating ads:

  1. Use the Views Slideshow module, if you’re prepared to have all images pre-loaded and switch via javascript & css.

Instead, I created a module which could rotate any block via AJAX, then set it to load the block provided by the Advertisement module (with output set to Raw and otherwise configured to show only the linked ad image).

Views Slideshow

Views Slideshow

  1. Install as normal. Module can be found in ‘Views’ section of Administer -> Site building -> Modules.
  2. Create new view as normal via Administer -> Site building -> Views.
  3. Set Style to ‘Slideshow’.

Note: If you’d like the first “slide” to be randomly selected, add ‘Global: Random’ to view’s Sort Criteria.

Also see ‘Create rotating adverts’ below.

Taxonomy Menu

Taxonomy Menu

Allows you to create menus from taxonomies.

Note that this is superior to the default menu handling of taxonomies, which can only list nodes that have a particular vocabulary term - you can’t make a menu that links to all terms within a vocabulary (e.g. If you’ve a ‘sections’ taxonomy you can’t link to all sections).

  1. Install the module as usual, enabling at least ‘Taxonomy Menu’.
  2. A new ‘Taxonomy menu’ section will have been added to a vocabulary’s edit page in Administer -> Content management -> Taxonomy.

To create site sections:

  1. Create a menu for the sections via Administer -> Site building -> Menus.
  2. Set the menu to display somewhere via Administer -> Site building -> Blocks.
  3. Create a new vocabulary called “Sections” via Administer -> Site building -> Taxonomy.
  4. Choose the content types that can be in the sections.
  5. Set the vocabulary’s menu to ‘Sections’ and deselect ‘Item for Vocabulary’ (‘Auto Expand Menu Item’ should be selected by default).
  6. Add a term for each section e.g. ‘Section One’, ‘Section Two’, etc.
  7. Create some new content, choosing a section.

By default, a section menu item will link to the taxonomy term, which will show a summary of all content associated with the term. To have a single node as the section landing page:

  1. TODO

Nodecarousel

Nodecarousel

Can display a node of a particular type in a block and rotate via AJAX (i.e. doesn’t load all nodes into markup).

Trigger

Trigger: Assign actions to system events

A core module. Allows you to perform basic actions (available at Administer -> Site configuration -> Actions), e.g. emailing someone, when a system event occurs. The events are very high level (e.g. node created) so the Rules module is far more useful.

Rules

Rules

Allows you to trigger actions via custom rules for system events.

Note: Rules 6.x-1.0 required Tokens > 27/08/2008 e.g. 6.x-1.12 (i.e. not the 6.x-1.11 version from Drupal 6.11).

  1. Install module as usual, enabling ‘Rules’, ‘Rules Administration UI’ and ‘Rules Scheduler’ “sub”-modules.
  2. Administer -> Rules -> Triggered rules.
  3. Add a new rule, giving it a descriptive label and choosing the event e.g. Node: After saving new content.
  4. Add a condition e.g. Node: Content has type: Page.
  5. The icon on the right of the condition can be used to add AND/OR logic.
  6. Add an action e.g. System: Send a mail to all users of a role.
  7. You can use tokens e.g. [node:title] in the email message.

Note that a rule based on user role will not be triggered if the role is created via the Auto Assign Role module via Automatic Role Assignment.

Flag

Flag

TODO

Meta tags

Nodewords

Allows you to set meta tags for nodes (e.g. keywords and description).

  1. Install and enable at least Nodewords and ‘Nodewords - basic meta tags’.
  2. Configure at Administer -> Content management -> Meta tags.
  3. Grant permission to users to use the available metatags via Administer -> User management -> Permissions, ‘nodewords_basic module’ section.
  4. To enable/disable for particular content type, see the ‘Allow editing of meta tags’ option in the workflow settings for a content type when edited via Administer -> Content management -> Content types.

Filter By Node Type

Adds checkboxes to each node type (Administer -> Content Types) which allows you to choose which input filters are available.

TODO

Filter By Content ?

Doesn’t seem to exist, e.g. if you add a comment (i.e. reply) to a forum topic, you’ll get a choice of input filters according to your role settings. Would be nice if you could configure the available filters like you can with the Filter By Node Type module.

TODO

Devel module

Includes a Theme Developer component that helps find out the function/hook used for different parts of the UI.

BUG: When Theme Developer is enabled, jquery is broken on the page to add/edit a new content type (Administer -> Content Management -> Content types -> type -> Add/Edit), preventing the various settings menus expanding.

TODO

Mass Contact

Mass Contact

Allows contact form to send email to everyone in a set of roles.

  1. Install as normal.
  2. The form itself can be found at /mass_contact.
  3. Administer -> Site building -> Mass Contact form.
  4. Add a category for a collection of roles via the ‘Add category’ tab.
  5. Email settings are in ‘Settings’ tab.
  6. May want to disable ‘Allow sender to override BCC setting’, ‘Save a copy as a node by default’ and ‘Allow sender to override node copy setting’.
  7. The module creates various permissions, including ones to set which categories are available. Administer -> User management -> Permissions, ‘mass_contact module’ section.
  8. The permissions define which categories can be selected by the user, hence which people they can contact.
  9. Enable (and rename) the mass contact menu item in the navigation menu via Administer -> Site building -> Menus.

Note: There can be problems assigning permissions to a category which has a single quote in its name.

Auto Assign Role

Auto Assign Role

Automatically assign roles when a user registers and optionally give the user a choice of roles.

  1. Install as normal.
  2. Administer -> User management -> Auto assign role.
  3. Allow user to choose role on registration and configure wording in the ‘User Role Assignment’ section.

Drawbacks

  • Can not prevent ‘authenticated user’ being one of the choices, despite the fact it’s automatically added to every user.

Note: At time of writing (23/06/2009) I believe the dev version 6.x-1.x-dev of this module hides ‘authenticated user’ (6.x-1.0-beta3 doesn’t).

Dev version

  1. Install as normal.
  2. Administer -> User management -> Auto assign role.
  3. Allow user to choose role on registration and configure wording in the ‘Allow User to Choose’ section.

Apply for role

Apply for role

Allow user to apply for roles when they register and presumably later.

  1. Install as normal.
  2. Configure how user is presented with choice of role at Administer -> Site configuration -> Apply for role administration.
  3. After a user registers, they are not automatically assigned the role. Instead, you have to view “role applications” via Administer -> User management -> Manage role applications.

Drawbacks

  • Can not configure wording.
  • User not automatically given the role but instead has to be administrated via a different interface.

Location

Location

  1. Install the module and enable Location in the ‘Location’ section and Location CCK in the ‘CCK’ section.
  2. Administer -> Site configuration -> Location to select country.
  3. There should now be a Location field type available to CCK.
  4. Add the field to a form, then configure.
  5. ‘Locative information’ section -> ‘Collection settings’ to add/remove location related fields (e.g. street, city, etc).

Pros

  • Location data is exposed to Views via its own group.
  • You can reorder location fields for each content type that uses them.
  • Links to a google map are auto-created for some countries (though not all configured with a map by default).

Cons

  • County/province offers auto-completion when country is chosen. However, you can’t choose a county/province that isn’t on the module’s list because validation will fail. Values stored in sites/all/modules/location/supported/location.uk.inc. This appears to be very similar to the file used by the Addresses module.
  • You can not limit the countries available in the countries field, though you can change the default selection.
  • It doesn’t gracefully degrade well in the sense that you don’t get a select box but have to type in the field value without any validation of the value entered.
  • It can’t work with the Conditional Fields module.

Addresses

Addresses

  1. Install and enable Addresses and Addresses-CCK (in the ‘Other’ section).
  2. Administer -> Site configuration -> Addresses to select country.
  3. There should now be an Address field type available to CCK.
  4. Add the field to a form, then configure ‘Global settings’ section for address details to show (e.g. street, city, etc).

Pros

  • You can limit the countries available in the countries field.
  • Address data is exposed to Views via CCK fields.

Cons

  • County/province changes to a dropdown of available options once country has been selected. However this does not allow you to choose a county/province that’s not in the dropdown because validation will fail. Values stored in sites/all/modules/addresses/countries/uk.inc. This appears to be very similar to the file used by the Location module.
  • If you don’t enter any address details it defaults to the UK, showing an hcard as such, and you can’t change the default format to be blank.
  • You can’t reorder address fields for each content type, though you can on a site-wide basis.
  • You can’t seem to use address (CCK) fields as sort criteria for Views, though they are available as filters!
  • It doesn’t validate the e.g. State/Province field and doesn’t seem to complain if it’s set as required but no value is given.
  • If Javascript is disabled it shows province as code rather than full name.
  • It doesn’t work with the Conditional Fields module.

Hierarchical Select

Hierarchical Select

Note fully ported to Drupal 6 at time of writing (28/06/2009). Most importantly, it isn’t integrated into CCK yet (via Content Taxonomy module).

  1. Install as normal and enable ‘Hierarchical Select’ and ‘Hierarchical Select Taxonomy’.
  2. You should now have various hierarchical select options when you edit a taxonomy’s vocabulary at Administer -> Taxonomy -> edit vocabulary.
  3. Select the option to ‘Use the Hierarchical Select form element for this vocabulary’.

Now, when you create/edit a content type associated with the taxonomy the hierarchical select widget should be used for selecting taxonomy terms.

Content Taxonomy

Content Taxonomy

For a CCK field that can pull content from a taxonomy.

Note that I haven’t found a use for this because taxonomy terms available to a new content type anyway, without the use of a custom field. Could prove useful when it has a larger/better set of display widgets available.

  1. Install as normal and enable ‘Content Taxonomy’ and others (‘Content Taxonomy Autocomplete’, ‘Content Taxonomy Options’). If Taxonomy Manager module is installed can also enable ‘Content Taxonomy Tree’.
  2. Not progressed any further.

Administer Users by Role

Administer Users by Role

Allows users with ‘administer users’ permission and a role (specified in ‘Access control’) to edit and/or delete other users with a specified role.

  1. Install module as normal.
  2. Grant a role permission to ‘administer users’ in the ‘users module’ section of Administer -> User management -> Permissions.
  3. Grant the role permission to ‘edit/delete users with role XXX’ in the ‘administerusersbyrole module’ section.
  4. Users in that role should now be able to edit/delete users with role XXX. They will not be able to change those user’s roles, for obvious reasons (for that see the Role Delegation module).

MAJOR flaws

Does not apply role-based restriction on the administration of users who are only in the ‘authenticated users’ group, hence all authenticated users can be administered by any role granted permission using this module regardless of which roles they should have control over. As soon as a user is added to a role the problem goes away.

Another flaw is that the user can see all the list of all other users. They only get ‘access denied’ when attempting an operation they’ve not been granted access to. One (inadequate) workaround is to create a custom view that lists all users in whatever roles, but this doesn’t stop access to the users list via direct input of URL.

Role Delegation

Role Delegation

Grant some roles the authority to assign selected roles to users, without them needing the administer permissions permission.

  1. Install the module as normal.
  2. Allow roles to assign roles via Administer -> User management -> Permissions, ‘role_delegation module’ section.

Content Management Filter

Content Management Filter

As possible way to remove the need for assigning ‘administer nodes’ permission in order to allow users to view the node creation pages (which defeats the points because it grants permission on all content types).

Taxonomy Delegate

Taxonomy Delegate

Allow non admin roles to administer certain vocabularies within a taxonomy (without having access to all of them, as the ‘administer taxonomy’ permission grants).

  1. Install the module as normal.
  2. Administer -> Site configuration -> Taxonomy Delegate and hide fields that could undermine security (e.g. related terms).
  3. There should be a new ‘Delegation’ section on a vocabulary’s edit page at Administer -> Content management -> Taxonomy, which allows you to choose which roles may administer the vocabulary.
  4. An item in the navigation menu (called ‘Administer My Categories’ by default) will show up to any roles that have been delegated vocabularies.
  5. A ‘Delegation’ tab on the taxonomy page shows an overview of all delegations for all vocabularies.
  6. The roles do NOT need ‘administer taxonomy’ permission.

MAJOR flaw in v 6.x-1.3

Users in a role will only see their taxonomies if at least one of the other taxonomies is granted to ‘authenticated users’. Worse, this results in anonymous users also getting the ‘Administer My Categories’ menu item, though there are no vocabularies listed on the page. This has been fixed in v 6.x.1.x-dev, see Avoid unnecessary database hit when logged out.

User Read-Only

User Read-Only

For read only profile fields.

  1. Install as normal.
  2. Allow/deny different roles the ability to see/edit the account/profile fields via Administer -> User management -> User ReadOnly.

MAJOR flaw

This does not actually prevent the user editing their profile because there is nothing server-side to prevent them submitting a modified form with all the edits they want - the module just adds a hidden field for each disabled one. You can circumvent a “resctricted” field in one of two ways.

  1. Remove the hidden field then enable and edit the original field.
  2. Edit the hidden field.

See Security problems.

Content Profile

Content Profile

  1. Install as normal and enable ‘Content Profile’ and ‘Content Profile User Registration’.
  2. Every existing content type should have a new option to use the type as a content profile and a new tab to configure settings.
  3. There should be a new content type called Profile. We could edit that, but to avoid later confusion with permissions terminology, create a new content type called ‘Peronsal Details’.
  4. Blank out the ‘Body field label’ from the ‘Submission form settings’ section.
  5. Set ‘Use this content type as a content profile for users’ in the ‘Content Profile’ section.
  6. On the ‘Content profile’ tab, set ‘Use on Registration’ in the ‘User Registration’ section and hide the title field.
  7. Normal content permissions apply via Administer -> User management -> Permissions.
  8. Only ‘access content’ permission is needed to allow the user to create their profiles on registration.
  9. Grant ‘edit own personal_details content’ so that the user can edit the profile when they edit their account.
  10. Grant ‘create personal_details content’ so that any new content profile types show up on the account edit page for existing users. This has the disadvantage that the profiles will also be available via the ‘Create content’ link (though it will only edit their existing profiles, it won’t create new ones). Could use the Menu Per Role module to get around this.
  11. Finer grained permission over fields can be achieved using other modules, e.g. ‘Content Permissions’ CCK “sub”-module.

Watch out for the profiles missing from ‘My account’ view. Check permission related settings, e.g. Taxonomy Access Control. Remember to rebuild permissions via Content management -> Post settings -> Rebuild permissions.

Bugs

  • Even if the profile node’s title is being hidden on registration, it still shows up when the user edits the profile after registration.
  • If you set the ‘Use on administrative user creation form’ for the content type (‘Content Profile’ tab when editing the type) then the profile’s fields will show when an admin creates a user. However, it doesn’t work as of v6.x-1.0-beta4 with the message “This user already has a content profile of this type”.

Potential problem

If you create a new content profile content type, any existing users won’t have that profile associated with them. To give them the profile you’d have to create a new node of that profile content type and change its author to the user, but this isn’t possible if the user admin doesn’t have permission to change a node’s author. One solution is to use the Override Node Options module to grant them permission to change the author for only profile content types.

Create view of user data including their content profiles

  1. Create the view as normal, adding whichever user fields you’d like to show.
  2. Add a relationship to ‘Node: Content Profile’.
  3. For the relationship settings, if there is a relationship dropdown (which there will be if a relationship already exists in the view) keep it as ‘Do not use a relationship’ because we don’t want to create a relationship that goes via an existing relationship.
  4. Give it a descriptive label.
  5. Select the content type and save.
  6. All fields from the selected content profile type should now be available to add as with any other field.

Note: If you add multiple fields from a relationship at the same time you may get “Column ‘nid’ in field list is ambiguous” errors. This is because each field needs to be edited to specify which relationship to use. The error will go away once this is done.

Override Node Options

Override Node Options

Allows node file/authoring/publishing options to be granted to users without ‘administer node’ permission on nodes they can edit.

  1. Install as normal and enable.
  2. Set whether file/authoring/publishing options are collapsable via Administer -> Site configuration -> Override node options.
  3. Set which fields are accessible via Administer -> User management -> Permissions, ‘override_node_options module’ section.

Taxonomy Hide

Taxonomy Hide

Hide certain taxonomy terms from view or group them by vocabulary.

Mime Mail

Mime Mail

An email module that can send attachments (which default Drupal mail functionality can’t do).

  1. Install and enable as normal.
  2. It provides the following method:

    mimemail($sender, $recipient, $subject, $body, $plaintext = NULL, $headers=array(), $text = NULL, $attachments = array(), $mailkey = '');
    

    Attachments is a 2D array, e.g…

    $attachments = array(
      array('filepath' => $module_path .'/files/Some_PDF.pdf', 'filemime' => 'application/pdf'),
      array('filepath' => $module_path .'/files/Another_PDF.pdf', 'filemime' => 'application/pdf')
    );
    

    Mail key is a unique ID for the message.

  3. To prevent site CSS being used for the email, override the [theme]_mimemail_message($body) method:

    function [theme]_mimemail_message($body){
      return $body;
    }
    

Note that [theme]_mimemail_message can also take the $mailkey as second argument.

See How to Send Email with an Attachment from Drupal.

Bug

It doesn’t seem able to send attachments twice in a row - i.e. when sending multiple emails, the first will have the attachments but latter ones won’t.

Private Download

Private Download

Restrict access, by a single role, to files in a particular directory (with the help of .htaccess rules).

  1. Install and enable as normal.
  2. Administer -> Site configuration -> Private Download.
  3. Save configuration and the sites/default/files/private directory will be created and contain the suitable .htaccess file.
  4. Grant permission to files in the private directory via Administer -> User management -> Permissions, ‘private_download module’ section.

Bug

It does not work with files that have a + in their filename, e.g. when filename is date stamped using ISO 8610 format.

Best to use in-built private downloads functionality.

File Browser

File Browser

Allows users to browse the contents of directories, with a number of additional features for e.g. security.

  1. Install and enable as normal.
  2. Create a new directory listing via Create content -> Directory listing.
  3. Grant access to create, view, etc directory listings via Administer -> User management -> Permissions, ‘filebrowser_module’ section.
  4. Remember that content permissions e.g. TAC will be applied, so if you’ve set up TAC to default to deny you’ll not be able to see the directory listing node.

Node Gallery

Feature rich image gallery functionality.

Requires ImageAPI and Imagecache. Lightbox2 used for “lightbox” display of images.

  1. Install modules.
  2. Enable Node Gallery, ImageAPI, ImageAPI GD2, Imagecache, Imagecache UI, Lightbox2, Node Gallery Lightbox2 Integration.
  3. You will have a new gallery content type. Create a new gallery and upload images.

For Lightbox2 display:

  1. Administer -> Site Configuration -> Node Gallery.
  2. Click Edit next to the gallery you’d like to configure.
  3. Click Next on the first config screen (where you choose the gallery and image types, which we’ll leave as default).
  4. In the ‘Original Image Display’ section, set ‘View of The Original Image’ to ‘Enable as Lightbox2 Popup’.
  5. In the ‘Teaser Setting’ section, set the ‘Display Type’ to ‘Thumbnails that open a lightbox2 Gallery’.
  6. In the ‘Gallery Langing Page Setting’ section, set the ‘Gallery Display Type’ to ‘Thumbnails that open a Lightbox2 Gallery’.

Accessibility: With javascript disabled…

  1. All images show as thumbnails like normal but click is to the image only.
  2. Under each thumbnail is a link to the image, but click displays the node that has the image attached!

Views Gallery

Basic image gallery functionality. Requires a whole load of modules, many of which were in beta at the time of writing (26/07/2010).

  1. Install and enable all modules required.
  2. Create a new node of the Gallery content type.
  3. Add photos to it!
  4. THIS DOESN’T WORK :-( … To have alt text set on the image, go to Administer -> Content management -> Content types -> Image -> Manage fields and set ‘[filefield-description]’ as the ‘Default ALT text’ (‘ALT text settings’ section) and tick ‘Enable custom title text’ (‘Title text settings’ section). This relies on the ImageField Tokens module for the [filefield-description] token.

Accessibility

  1. With javascript disabled all images show as thumbnails like normal but click is to the image only.
  2. With javascript disabled a “Start Slideshow” link is still present but does nothing.

Notes: No easy way to delete an image from a gallery.

Galleria

Galleria

Basic image gallery functionality, though does more than Views Gallery. Based on jQuery. Seems like best gallery as simple, degrades the best and relies on mostly core features and a few common modules.

For good setup, requires the ImageField module (which requires FileField module) and the ImageField Tokens module (which requires FileField Paths module).

  • Use the ImageField module instead of the core Upload module because it shows thumbnails on the node (gallery) edit page.
  • So we can have the ALT text automatically set the same as the image title, we use the ImageField Tokens module, as mentioned above.
  1. Install and enable the module as usual.
  2. Install and enable ImageField module and FileField module (that it depends on).
  3. Create or choose an existing content type that will display the Galleria, via Administer -> Content management -> Content types, ‘Add content type’ tab.
  4. Add an Image field (select File in the field type dropdown and Image in the form element dropdown) to the content type in the “Manage fields” section.
  5. Configure the content type Image field via Administer -> Content management ->< Content types -> Galleria -> Manage fields -> Image.
  6. THIS SEEMS TO USE THE IMAGE URL! :-( … In the ‘ALT text settings’ set Default ALT text to [filefield-description] (requires ImageField Tokens module which requires FileField Paths module).
  7. Set the ‘Number of values’ to Unlimited.
  8. Click the “Display fields” section for the content type.
  9. Change the output formatter for “Full node” and/or “Teaser” for the Image type to “Galleria”.
  10. Create a node of this type, add images and view!

Accessibility

  • With javascript disabled all images show full size on the gallery.
  • You need to use the ImageField Tokens module so that the alt text can be automatically set the same as the title.

It’s also possible to have the entire gallery display inside a Lightbox or have the thumbnails in a jCarousel.

Simplenews

Simplenews

For mailing lists.

  1. Install as normal, enabling ‘Simplenews’.
  2. It will have created a new content type called “Newsletter issue” (though you can configure it to use your own content type).
  3. It will have created a new tax vocab called ‘Newsletter’ (though you can configure it to use your own vocab).
  4. To allow visitors to subscribe, grant ‘subscribe to newsletter’ to anonymous users via Administer -> User management -> Roles.
  5. Configure via Administer -> Site configuration -> Simplenews.
  6. Enable ‘Newsletter: drupal newsletter’ block via Administer -> Site building -> Blocks.
  7. On subscription, a registered user will have an option to select their newsletters via My account -> Edit -> My newsletters tab.
  8. Create newsletter issues (in a newsletter category aka vocab) via Create content -> Newsletter issue.
  9. Manage subscriptions and send newsletters via Administration -> Content management -> Newsletters.

Note that the ‘Synchronize with account’ option (in Administer -> Site configuration -> Simplenews ‘Subscription’ section) will assume that if there’s an existing user account with the same email as a new subscription request, the user account is owned by the person requesting the subscription, hence will associate the account with the subscription.

There are associated modules to add things like stats.

Calendar

Calendar

For an events calendar.

  1. Install as normal.
  2. Also enable Date, Date API and Date Timezone.

Then follow Installing Calendar 2.x for Drupal 6. Reproduced here…

  1. Go to admin/settings/date-time/formats
    Under Date formats section. Set the 3 date formats to match your needs.

    Click on Save configuration button.

  2. Go to admin/settings/date-time
    Set the Default time zone: field.

    Leave other setting to their default.

    Click on Save configuration button.

  3. You must make a custom ‘event’ content type using CCK. To do so go to admin/content/types/add
  4. Under Identification section fill the following fields. Without the “ ”.

    Name = “Group Event”
    Type = “event”
    Description = “Create a new event to appear on the sites calendar of upcoming events”
    
  5. Under Submission form settings section fill the following fields. Note that those settings are largely a matter of site needs and personal preference

    Title = “Event”
    Body = “Details”
    
  6. Under Workflow settings section decide to best fit your site. It is worth considering unchecking “Promoted to front page” if you expect to have numerous small events posted.
  7. Under Comment settings section make decisions which are appropriate for your site.
  8. Click on Save content type button
  9. On the next screen click on the manage fields link next to your new content type. Note: In this example this screen can be found at admin/content/node-type/event/fields
  10. Add a new field with the following values. Feel free to modify to match your needs.

    Label = “Date”
    Field name = “date”
    Type of data to store = “Date”
    Form element to edit the data (Widget type) = “Select List”
    

    Note: There is some debate over the correct Form element to edit the data (Widget type). The widget type dictates the input UI and is really a matter of preference. It’s easy to change after the fact so try them all and see what you like best.

  11. Click on Save button
  12. On the next page under Group event settings section. Leave the Default value field to Blank.

    Note: The calendar module provides a couple of submodules called “Date Popup” and “Date Repeat API”, which allow for nice JS date selection in the first instance and selection of repeated dates in the second. Use the “Date Popup” or “Date Popup and Repeated Options” widget for dates if these submodules have been enabled.

    Set the Default value: field to Now.
    Note: End user can easily change this value when filling the form.

    Set the Input format: field to a format that match your needs. In my case May 12 2010 - 1:00:00pm

    Under Global settings section. Check Required option.

    Set the Set the To Date: field to Optional.

    Leave all other options to their default settings.

  13. Click on Save field settings button.
  14. Note: This is optional but on the next page you can of course add any number of additional fields to your event content type at this point using CCK. I’ve added location and contact information for my application and tied those to weather and profiles which is kind of cool (but way beyond this little write up) and testament to how amazing and powerful Drupal really is :)
  15. We are now going to create a first event. To do so go to node/add In this example click on Group event link.
  16. Fill out the form for your event. In this example we set a From date and a To date
  17. Click on Save button.
  18. In the following steps we will configure your calendar view.
    Go to admin/build/views
  19. Click on Enable link located on the right side of the calendar view item.
  20. Click on Edit link located on the right side of the calendar view item.
  21. The next screen is the view edit screen. With the Defaults view already selected. (Screenshot available at original article)

    Note: Many types of calendar views are available. Such as Calendar page, Calendar block, etc. But first we will just work with the Defaults view to start.

  22. In the Fields panel. Click on the + button to add a field. (Screenshot available at original article)

    Scroll down the list of filters. Then check Content: Date (field_date) - From date option.
    Click on Add button.

    On the next screen leave all options to their default settings. Then click on Update button.

  23. Still in the Fields panel. Click on the Node: Updated date link.
    Click on the Remove button.

    Click on Save button.

    On the next screen leave all options to their default settings. Then click on Update button.

  24. In the Arguments panel. Click on Date: Date (node) link. (Screenshot available at original article)

    Uncheck Node: Update date option.

    Check Content: Date (field_date) - From date Note: This set the start time of your event instead of the node update time as the argument for the view.

  25. Click on Update button.
  26. On the Filters panel click the + button to add a new filter.
    Scroll down the list of filters. Then check Node: Type option.

    Click on Add button.

    On the following screen leave Operator to Is one of.

    Then check Group events option. This will limit your calendar to only the Group events content type.

    Click on Update button.

  27. On the Sort criteria panel click the + to add a new criteria.
    Scroll down the list of filters. Then check Content: Date (field_date) - From date option.

    Click on Add button.

  28. On the next screen leave default settings to Ascending.
    Then click on Update button.
  29. Click on Save button to save all your edits.
  30. To test click on View "Calendar page" link. (Screenshot available at original article)
  31. That’s it. You have successfully install and configure the Calendar module 2.x for Drupal 6.x (Screenshot available at original article)
  32. Note that this handbook will at least get you to a working calendar of coming events for your site. Obviously you’ve got a ton of configuration options to play with form here.

Events list view, filtered by date

  1. Add new page display to calendar view.
  2. Override trivial items like page name, path, etc.
  3. Override ‘distinct’ to be ‘Yes’ to prevent repeated events showing multiple times (this also works around a bug whereby repeated events only show from date not date of repeat).
  4. Override default sort criteria and to have list newest events first set to order by from date desc then updated date desc.
  5. Override filters and add exposed date (node) filter, with ‘in between’ operator, looking at from date and to date, using OR condition.
  6. To prevent repeated dates showing on event, as there can be way too many, edit the event content type and change its date display to show only 1 value.

Webform

Webform

For creating online forms to gather info for email. Each form is associated with a content type. Form submission sends email only, it doesn’t create a node (as would be the case if you used normal Content Types (with CCK) and Trigger to send email).

  1. Install as normal.
  2. Settings are at Administer -> Site configuration -> Webform settings. Defaults are fine.
  3. Create a new Webform via Create Content -> Webform. Give the form a title that indicates its purpose (e.g. “Feedback”).
  4. After creation, visit the form and add/remove fields from the form via Webform -> Form components.
  5. Add email recipients via Webform -> E-mails.
  6. Change behaviour after submission via Webform -> Form settings.

Note: If you’re using a “section menu” via f3’s custom section menu module, you can have the webform confirmation page show in the correct section by adding a disabled menu item for it.

Webform Validation

Webform Validation

Adds extended validation support to webforms, e.g. regexp based validation.

Content Display Order

Content Display Order

Adds a ‘Display order’ tab to content types, so the order of fields can be changed for all displays.

  1. Install as normal.
  2. Edit content type and reorder fields as desired!

Modules good for development

Devel

Devel and Theme developer.

  1. Install package as usual.
  2. Enable ‘Devel’ and ‘Theme developer’ modules.
  3. Enable the Development block in Administer -> Site building -> Blocks.
  4. Tick ‘Themer info’ box at bottom left of screen to activate.
  5. Move mouse over page element you’re interested in and click to see template/function hierarchy.

Others

As recommended by developer of CCK and date stuff.

  • CCK
  • Views
  • Token
  • Devel & Devel Generate
  • Advanced Help
  • Backup and Migrate or Demo
  • Reroute Email
  • Admin Menu or Admin
  • Admin Role
  • Admin theme:
    • Root Candy
    • Seven
    • Cleanr

Potential modules

Kaltura

Kaltura for video.

Last modified: 16/11/2011 Tags: ,

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top