Automatic Copyright Updating

Copyright SymbolMost, if not all, of the sites we develop have a copyright notice in the footer.  While not required by current U.S. law (see United States Copyright Office Circular 3), we think it's a good idea and it may help to identify the site owner when that isn't obvious by the site's name or URL.  There are three requirements for this notice found on page 2 of the circular and copied here for your convenience:

  1. The symbol © (the letter C in a circle), or the word “Copyright”, or the abbreviation “Copr.”
  2. The year of first publication of the work; in the case of compilations or derivative works incorporating previously published material, the year date of first publication of the compilation or derivative work is sufficient. The year date may be omitted where a pictorial, graphic, or sculptural work, with accompanying text matter, if any, is reproduced in or on greeting cards, postcards, stationery, jewelry, dolls, toys, or any useful articles.
  3. The name of the owner of copyright in the work, or an abbreviation by which the name can be recognized, or a generally known alternative designation of the owner.

Note that the second requirement says "year of first publication."  This precludes simply using the current year in the notification.  Our practice is to use a range of years where the earliest year is either the date the organization was created or the date when we built the website.

Traditionally we've used one of two methods to update the date:

  1. Manually updating the text.  This is definitely the easiest technique but it requires updates every year.
  2. Formatting the footer area as PHP code; generating the current date programmatically and inserting it into the other "boilerplate" text.  Experienced Drupal developers are shuddering as they read this.  We're not too found of this ourselves, but it does/did work and it eliminates the annual updating.

Here's a better idea, step by step (please note that the link examples are for Drupal 7):

  1. Install and enable the Token Filter Module.
  2. Enable the Replace tokens filter for at least one of your text formats.  I chose to use the Full HTML format (admin/config/content/formats/full_html).
  3. Add a Date Format (admin/config/regional/date-time/formats) containing just the year (the PHP code is Y).
    This step is not required for Drupal 6.
  4. Add a Date Type (admin/config/regional/date-time )using the the format you just created.  I called my Date Type OnlyYear.
    This step is not required for Drupal 6.
  5. Edit your footer replacing the latest date with the appropriate token for your site.  That token will be [current-date:machine_name_of_your_date_type].  Note: replace "machine_name_of_your_date_type" with the machine name for your Date Type, e.g., for my site it is "onlyyear," i.e., the text within the brackets is current-date:onlyyear.
    For Drupal 6 the token is specified as [token global site-date-yyyy].

Now you can sleep in a little longer, or enjoy brunch a little earlier, on New Year's Day.

 

Tags: