[drupal-devel] [feature] Replace core archive.module w/ codemonkeyx archive.module

Tobias Maier drupal-devel at drupal.org
Mon Aug 29 20:00:00 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    archive.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Morbus Iff
 Reported by:  Morbus Iff
 Updated by:   Tobias Maier
 Status:       patch (code needs review)

if i click for example on 2003 it would be good if this would go to
january or december
and marks them that this one will be shown now
as you can see it if you click on january 2003.

it has to select

* on the first:
the first month of writing
* on the last:
the last month of writing
* on every else:
I hope you can understand what I mean...

greets tobias

Tobias Maier

Previous comments:

Thu, 25 Aug 2005 21:08:49 +0000 : Morbus Iff

Over at http://drupal.org/node/8287, Berkes mentions that the core
archive.module was considered being removed, per a discussion at the
Drupal Sprint. Kjartan also mentions he would "love to have the archive
module improved in general." In chatting with chx about this, he
mentioned codemonkeyx's rewrite sitting in contrib/modules/archive/.
I'll be doing some work with the archive.module over the next few days,
and will be basing my changes around codemonkeyx's version, and making
it compatible with HEAD. This general Issue is to move codemonkeyx's
version into HEAD as a replacement to the existing archive.module. An
unknown version of his replacement can be seen at
http://www.codemonkeyx.net/archive. I'll be running a live HEAD version
soon as well.

These patches were made during the customization of Drupal by
http://www.NHPR.org. In loving support of open source software,
http://www.NHPR.org will continue to contribute patches they feel the
community will benefit from. Questions about this patch should be
directed to morbus at disobey.com.


Fri, 26 Aug 2005 19:45:59 +0000 : Morbus Iff

Attachment: http://drupal.org/files/issues_2 (9.56 KB)

As an example of a very early revision, see the attached, with the
following changes from the current contrib CVS:

* removed the year offset from theme_archive_navigation_years, which
controlled how many year links to show at once in the top nav. For
those with sites with more than five years, they'll WANT people to
notice that they have five years, not to have to click on the earliest
date and then have their expectations changed.
* made the "created > $date" in archive_buildQuery "created >= $date"
instead, to allow posts that were created at exactly midnight that day
(like me, by design).
* since there's no block, I made the menu item visible upon first load.
this menu item is given "access content" permissions.

More to come, including doxygen and gmt considerations.


Fri, 26 Aug 2005 19:47:41 +0000 : Morbus Iff

Might as well start getting a review of it so I can fix 'em as they come


Fri, 26 Aug 2005 19:56:49 +0000 : Tobias Maier

cant you provide a patch file?
thanks for your work


Fri, 26 Aug 2005 20:04:01 +0000 : Morbus Iff

The codemonkeyx version is a complete rewrite of the core
archive.module. If I were to create a patch file against core, every
line would be deleted, and every line would be new. Once I finish my
revisions to codemonkey's version, I'll post the final version here, as
well as a patch against his current CVS.


Fri, 26 Aug 2005 20:09:13 +0000 : Tobias Maier

ok, thanks again :D


Mon, 29 Aug 2005 13:41:43 +0000 : Junyor

+1 for this change.  The archive.module in core is dead.


Mon, 29 Aug 2005 16:14:30 +0000 : adrian

What is the progress on this morbus ?


Mon, 29 Aug 2005 16:29:13 +0000 : Morbus Iff

Adrian - I'll be attaching a new version either later today or tomorrow,
with a CHANGELOG. I'll also be running a live version of it over on
NHPR.org for people to play with. The three major things I'm worried
about right now are a) doxygen, b) variable/function naming, c) GMT
considerations. After those, I'll be exploring a patch for my own
needs: the ability to get archives for particular term.


Mon, 29 Aug 2005 18:53:34 +0000 : Morbus Iff

Attachment: http://drupal.org/files/issues/archive.module (9.93 KB)

Here's the latest, with the following changelog:

* reordered some routines to be a little more workflowish.
* renamed archive_buildQuery to archive_build_query.
* general whitespace and formatting cleanup.
* HEADish update: returning $output, not page templating it.
* removed the reference of &$ad in archive_build_query.
* test for the existence of arg(#)'s before validating them.
* archive_validSomething changed to archive_valid_something.
* removed unused vars: cur_date, cur_date_end.
* renamed archive_buildURL to archive_build_url.
* removed the HTML whitespace from the theming.
* twiddled a lot of quotes and apostraphes.
* removed 'future' CSS class. ill-defined.
* reordered/renamed the CSS classes.


Mon, 29 Aug 2005 18:54:08 +0000 : Morbus Iff

Attachment: http://drupal.org/files/issues/_p_29676_archive_css.patch (1.56 KB)

And the drupal.css patch.


Mon, 29 Aug 2005 18:56:29 +0000 : Morbus Iff

This version of the module is currently running live at

More information about the drupal-devel mailing list