Computed Field

Computed Field is a module that lets you add a computed field to custom content types. You can choose whether to store your computed field in the database, or simply have it calculated upon view. You can also choose whether to display the field, and how to format it. The value of the field is set using PHP code so it can draw on anything available to Drupal, including other fields, the current user, database tables, etc. The drawback of this is of course that you must be PHP-savvy to use it.

Tracking module status

A "site" you might want to build on your PC is a "catch-all" site for monitoring module and theme status with the Update Status module.

This module will check with the Drupal site and let you know if newer releases of your modules are available.

Pathauto Pattern Recipes

There are frequently requests for how to make certain patterns of URLs for Pathauto.

Basics of Patterns

In general, a pattern is a form of variable substitution. So, when you see the variable [title-raw] in a pattern, that will be replaced with the title of the node. This system should hopefully be intuitive to most users. A blog post with the title "my blog post" whose pathauto pattern is [title-raw] would be created with the alias www.example.com/my-blog-post

When the pattern for a node type is left blank when creating the node, the default pattern will be used. But if the default pattern is also blank, Pathauto will be disabled for that node type.

Each of the four content types -- node, user, taxonomy, and blog posts -- has its own list of variables that come by default (and are provided either by the Token module, which is a prerequisite for installing Pathauto, or by the Pathauto module itself). To look at the variables available for a given type, go to:

  • For 7.x:Administration > Configuration > Search and metadata > URL aliases, in the "Patterns tab" (admin/config/search/path/patterns).
  • For 6.x: Administer > Site Building > URL aliases, in the "Automated alias settings" tab.

Adding a contact form

While a contact form is a simple concept, it can be a bit complex to get set up and operating. Read this whole page before doing it the first time. Don't give up; it really does work.

Setup

The easiest way to add a contact form to a basic Drupal site is to enable the contact module. You do this by clicking on:

Location-based ads.

You can use the location module to add location-based attributes to ads created using the Classified Ads module

One advantage of this technique is that you can also enable google, yahoo, and other map support available in the location module.

Content Injector: automatic, no hassle insertion of ads or other content snippets in node content

The Content Injector module (formerly AdSense Injector) allows administrators to specify automatic insertion of ads or other content into a node full-page view, or, if desired, before or after teasers in front page or taxonomy list views.

It provides centralized control of:

  • Ad templates* or other content to be inserted.
  • Full control over allowed node types (for example, you can choose to never insert ads into image nodes, or forum nodes, etc.)
  • Minimum word count control for full-page node views: if a node doesn't have the minimum word count, ads won't be inserted.

Content Injector, when used with the AdSense Injector module features, also respects the AdSense module's ad visibility settings.

Rationale

Why is this useful? In my experience, this simplifies certain important aspects of ad insertion and placement if you want to insert ads close to or within the content body.

Traditional approaches

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x