When you go to www.mysite.com/archive and search for a date, I'd like it if it didn't have the years from 2000 to 2005 (I hope 2006 isn't there just because it's Jan..). The site hasn't even been around that long so is there some way to remove the 2000-2004?

Comments

kayman-1’s picture

Open archive.module and find the following line:

  // Prepare the values of the form fields.

Under that, you'll see two dates. I changed mine, so I can't remember exactly what they were -- but from your post, I'd guess they are 2000 and 2005. I changed mine to 2006 and 2006 and that worked for the click-down menu archive form (so far). Here's what my line looks like:

$years = drupal_map_assoc(range(2006, 2006));

I don't know about the calendar block, though.
Hope that works for you.

I'm trying to limit the archive results to a specific node.. so if anyone knows how to do that, please fill me in :)

Kato’s picture

I did this myself and this worked just fine.

I can still click the two little arrows near the month on the Calendar block and it will rotate back to 2005 (even though I did like you, set it to 2006, 2006). Anyone know what part of that module to change so it won't do that?

BayouBill’s picture

Change this line to read:
$years = drupal_map_assoc(range(2006, date('Y')));

Replace "2006" with the year in which the first content was added to your site. Then the archive module will always display a year range that runs from the inception of your site to the current year.

LateNightDesigner’s picture

I just saw that my archive module was only displaying 2005 and I had no idea. Looking at the code and seeing this post made it really easy to fix.

Thx Bill.
//---------------------------------------
Latenightdesigners.com - Giving IMD a Fighting Chance

funkioto’s picture

Thanks guys and BayouBill.
That worked very well.

wbhart’s picture

Given the connection between this thread and this one ( http://drupal.org/node/67122 )
I was wondering if anybody here would have any thoughts on the problem.

TheBlackPoet’s picture

i was looking for it in the interface and in the settings... i finally broke down and came to drupal.... your thread was the first one to pop up and i fixed the problem in no time flat....

appreciate that...

ursus@drupal.ru’s picture

Hmmm...
I have no such lines in code :(
What I have to do?