Browse by entire month, not just day

ahoeben - July 20, 2004 - 12:00
Project:Drupal
Version:x.y.z
Component:archive.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I made a couple of changes to archive.module to facilitate browsing the archives by date.

  • Opening an archive URL without specifying a day will display the full month, eg www.example.com/archive/2004/07
  • Selecting the 0th day of the month in the archive page drop down selects the full month
  • Using the previous/next raquo's in the calender block now uses full month browsing

The attached patch is against 4.4.2 and is untested against CVS.

AttachmentSize
archive_AH040720.patch5.22 KB

#1

Anonymous - August 11, 2004 - 12:15

Patch don't work with archive.module (drupal 4.4.2).

Hunk #1 FAILED at 1.
Hunk #2 FAILED at 26.
Hunk #3 FAILED at 49.
Hunk #4 FAILED at 64.
Hunk #5 FAILED at 85.
Hunk #6 FAILED at 131.
Hunk #7 FAILED at 218.
Hunk #8 FAILED at 236.
Hunk #9 FAILED at 245.
9 out of 9 hunks FAILED

#2

ahoeben - May 7, 2005 - 23:02
Version:<none>» 4.6.0

Blast from the past... Not sure what I did wrong to have my original patch fail, but here is a new patch applying the same changes to Drupal 4.6

AttachmentSize
archive_AH050508.patch 4.78 KB

#3

Cvbge - May 7, 2005 - 23:16

Hello,

thanks for your patch, that's a feature I wanted :)

But please change day "0" to "ANY" or similar.

#4

ahoeben - May 8, 2005 - 10:19

New patch. Changed '0' in day dropdown to 'All days'. You should be able to change that string using a locale (but I have no experience with locales in Drupal).

Also fixed a tiny bug that would cause the year dropdown to stop being useful on jan 1st 2006.

AttachmentSize
archive_AH050508b.patch 5.15 KB

#5

ahoeben - May 10, 2005 - 13:50
Version:4.6.0» <none>

Patch applies to cvs version as well...

#6

Morbus Iff - August 25, 2005 - 20:04

Attached updated patch for HEAD. I'll be fiddling with it some more too.

AttachmentSize
_p_9414_archive.patch 5.09 KB

#7

Morbus Iff - August 25, 2005 - 20:23
Title:Browse by month» Browse by entire month, not just day

#8

adrian - August 26, 2005 - 11:19

I vote we completely ditch the legacy archive module and go with codemonkeyx' module (it's in contrib as archive)
(example : http://codemonkeyx.net/archive)

#9

adrian - August 26, 2005 - 11:23

The module in contrib needs very little love actually ..

The biggest thing is that there is no css in most themes for it, meaning it can be hard to browse.
If we do use this module, it means we can remove most of the calendar css out of drupal.css , and perhaps move it to modules/event/event.css (provided event still uses it).

The module is also a lot simpler =)

#10

Junyor - August 26, 2005 - 11:32

I'm all for it. Open up a new issue and you'll get my +1. :)

#11

Morbus Iff - August 26, 2005 - 12:56

Yep - I started that issue at http://drupal.org/node/29676.

There's a bit to do with it re: HEAD - I don't like the arch_data CSS classes (especially when his other entries use archive), there's no documentation, and it has the same GMT problem as the existing one does. Also, I'm getting bunk dates on my HEAD dev server (days highlighted, but no posts showing when clicked, etc.). I'll be working with all that stuff over on the other issue.

#12

matt_paz - August 26, 2005 - 13:32

As long as we're adding this, any chance of adding in an optional block that displays a list of links to archives by month?

* August 2005 (244 Items)
* July 2005 (100 Items)
* June 2005 (80 Items)
* May 2005 (60 Items)
* April 2005 (32 Items)
* March 2005 (20 Items)
* February 2005 (10 items)
* January 2005 (2 Items)

#13

Morbus Iff - August 26, 2005 - 13:34

It's not a block, but something very similar to that is in the codemonkeyx version.

#14

Crell - December 28, 2005 - 23:22
Status:needs review» needs work

This uses the old form code instead of the new Form API, so no longer applies.

Did we ever get around to using the codemonkeyx archive module instead of the old one? If so, is this patch needed anymore? I don't want to close it, but someone who knows the archive module status better than I do should take a quick look. :-)

#15

Gábor Hojtsy - August 8, 2006 - 19:31
Status:needs work» fixed

Archive module now removed from core. The codemonkey version was picked by some people, and I created a project for it. Work continues there. Submit feature requests there. BTW this one is already handled because of the nature of that module.

http://drupal.org/project/archive

#16

Anonymous - August 22, 2006 - 19:45
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.