Archive Message

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jsruzicka's picture

I apologize in advance if this is a dupe--kept getting a message that this post was Spam even though it's obviously not.

Hello everyone.

Often, when users search the web for content, they sometimes get old stories from our site and think that they're reading something current.

There is a module to expire content on a certain date, but we don't want those articles to disappear, we want them flagged with a centered red line of text across the top that reads "This article is archived. Click here for more recent articles". This message displays for any article older than six months and is very helpful.

I'd like to create a module called "Archive Message" that would have the following configuration options. Any thoughts, suggestions or additions at this point are appreciated since I'm just getting started on it.

These are the configuration parameters I anticipate including:

  • Content Types -- check boxes of which Content Types are looked at by the module. For example, news_articles might be archived, but about_us pages probably wouldn't be. Any content type that isn't checked will be ignored.
  • Message -- A short message to display when an article is archived, such as "This article is archived. Click here for more recent articles". Do you think it would be worth the extra coding to:
    • Add a different message per content type
    • Add different messages for different languages

    Doing both of these things could result in an enormous amount of configuration.

  • Archive Days -- the number of days after which a content type is considered "archived". The default will be 180 (half a year).
  • Archive Date Field -- the date field to used to check whether an article is archived. The default will be the node creation date, but sometimes users might want to check against a different date field.
  • CSS Class -- the CSS class to use for the archive message. A convenience for users who don't want to use, or don't know enough about using, a stylesheet. The "archive_message" class will be exposed by the module so that CSS can be used in theming with this module also.

The message will have a default weight of zero but can be dragged into a different position by editing the content type(s) on which it appears.

Comments

Sounds interesting

pkamerakodi's picture

Hi,

Have you started working on it. I would like to join hands with you if you are interested in co developing this module.

Regards,
Prajwal

Idea seems good to me

naveenvalecha's picture

Hi,
The above module idea seems good to me.I would also interested to co develop this module if you are interested and to create a stable release ASAP by joining the efforts.

Contributed Module Ideas

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: