This module creates an "announcement" content type and provides both node views and block lists.

This is an adaptation of the sample module writing article from IBM.

An announcement has the following fields:

Title
Self-explanatory.
Publication date
The first date the announcement will be displayed.
Expiration date
The last date the announcement will be displayed.
Abstract
An abbreviated description of the announcement. This will be shown in the block. Note: Only the abstract will be indexed for search if you use the Search module.
Body
The full text of the announcement.

Installation

Standard module installation applies. The module does have an uninstall function.

Settings

Maximum number of block announcements
The maximum number of announcements that will show in a block.
Default duration of announcement
When creating a new announcement, the start date will default to today and the ending date will default to today plus this setting's value.

Permissions

create announcement
Allows a user to create a new announcement
edit announcement
Allows a user to edit any announcement. Note: "edit own" is by default.

Menu Entries / URIs

There is one menu entry for "Announcements." This view of the announcements shows only the abstract and dates for the announcements.

If one appends 'view' to the URI (i.e. http://www.example.com/announcements/view), you will get a full node view.

Blocks

Announcements: Recent
Shows recent, active announcements.
Announcements: In xxx vocabulary
Shows the terms for the xxx vocabulary, which has been assigned to the 'announcements' content type. There may be more than one vocabulary show, depending on your configuration. Note: if there are no vocabularies assigned, then this block will not be shown.

Styling and Themes

The module comes with a starter set of CSS entries. View the code or use Firebug to discover more styling options.

theme_announcements_compact
Formats the main, compact view.
theme_announcements
Formats the full node view.
theme_announcements_block_list
Formats an entry for the "Recent" block.
theme_announcements_dates
Formats the dates for the announcement.
theme_announcements_abstract
Formats the abstract.

Comments

Sunshiney’s picture

I'm trying to figure out what is uniquely different about this module than what, I think, is easily done using cck and views in 6x? Not clear.

NancyDru’s picture

To start with, the content type is already defined; the theming is already done. Then there's little things like automatic start and end timing. Plus blocks. Oh, and a whole lot smaller footprint than CCK/Views, which matters to the many sites on hosts that won't allow the memory required for them. And then there are many sites that just don't have CCK and Views.

Can it be done with CCK and Views? Undoubtedly. When I have time to learn CCK internals, I may switch it, especially considering Fields in core for D7.

Sunshiney’s picture

Excellent answer. My marketing side always wants to know "what's in it for me/us" so this is a helpful description. Thanks Nancy!

NancyDru’s picture

If your host won't allow more than 32MB of memory, you are going to be hard-pressed to run a robust CCK/Views set up on Drupal 6. On Drupal 5, I have actually run an 8MB site without them.

Content type modules, such as this one, are pretty much guaranteed to be much smaller than CCK and Views (Views is huge!), but if you have a lot of them there will be a trade-off somewhere.

The equation changes in Drupal 7, however, since Fields ("Son of CCK") will be in core. Many content type modules will have to be looking at a Fields implementation.

keoni21230’s picture

Has the Announcements module been ported to Drupal 7? This looks like something that I need to post seminar announcements and have them expire on the day after the seminar without the contributor having to delete the entry.

NancyDru’s picture

There is also the Scheduler module.

bwill’s picture

I would also like to know if there is a plan for a D7 version. This type of announcement module is exactly what I need to port a DotNetNuke site to Drupal. Would rather not do it with CCK/Views, and cobble together various other modules to expire the announcement. I'm not a PHP coder, but am willing to help out with testing/documentation/etc.

NancyDru’s picture

After I get it working, then I have to learn Git.

yogarenzi’s picture

Hi, Is it possible to increase the number of announcements in the compact view?

Thank you.

asmar’s picture

Hi all,

Is there a way to hide the "starting - ending" dates on each announcement?

Thanks