| 1 |
This is replacement for the Drupal archive.module which was available in
|
| 2 |
Drupal core in Drupal 4.7.x and previous versions. It provides a simple
|
| 3 |
calendar block that shows the current month with links to the archive for
|
| 4 |
days that have posts. It also allows browsing of all content by date or
|
| 5 |
node-type, so if you have a linked list users can browse just those nodes.
|
| 6 |
|
| 7 |
Installation:
|
| 8 |
Install module like normal
|
| 9 |
Visit admin/settings/archive and configure which node types you want
|
| 10 |
browseable (MUST DO)
|
| 11 |
Add link to /archive somewhere on your site.
|
| 12 |
|
| 13 |
Alternatives:
|
| 14 |
Weekly archive module: http://drupal.org/project/week
|
| 15 |
Views module (much more general): http://drupal.org/project/views
|
| 16 |
http://drupal.org/node/52037
|
| 17 |
|
| 18 |
Originally by CodeMonkeyX
|
| 19 |
|
| 20 |
--------------------------------------------------------------------------------
|
| 21 |
*Developer* notes
|
| 22 |
|
| 23 |
Access permissions:
|
| 24 |
- The archive module provides no permissions on its own. Users in
|
| 25 |
roles with "access content" permissions may view and select
|
| 26 |
content from the /archive page.
|
| 27 |
|
| 28 |
Timezone handling:
|
| 29 |
|
| 30 |
|
| 31 |
- Drupal sets $node->created to time() on node creation and storage
|
| 32 |
- Then on display it invokes format_date() to get a date display,
|
| 33 |
which adds a timezone to the timestamp and then uses gmdate()
|
| 34 |
=> This means that "time() + timezone" is used as the displayed date
|
| 35 |
|
| 36 |
- Archive module sets today to time() + timezone to conform
|
| 37 |
- SQL injected timestamps should have timezone subtracted, since
|
| 38 |
we need to move the window on the queried nodes "back" to get
|
| 39 |
nodes for the date the user expects to get
|
| 40 |
- Displayed timestamps should have timezone added to them
|
| 41 |
- Archive module uses "gm" functions, so that the server timezone
|
| 42 |
is not added upon the used timestamps
|
| 43 |
--------------------------------------------------------------------------------
|