Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Change Number of Years in Admin Drop-Down
Pages: [1]   Go Down
Print
Author Topic: Change Number of Years in Admin Drop-Down  (Read 309 times)
0 Members and 1 Guest are viewing this topic.
chillaxing
New Member
*

Karma: 0
Offline Offline

Posts: 0

Web Development Librarian


WWW
« on: December 07, 2004, 11:55:00 AM »

I'd like to change the number of years displayed in the drop-down menu for calendar_admin.pl. I have no need to see 1999-2003 in there. Any one know where I'd need to change the code? Many thanks.
Logged
chillaxing
New Member
*

Karma: 0
Offline Offline

Posts: 0

Web Development Librarian


WWW
« Reply #1 on: December 07, 2004, 02:36:00 PM »

No, I'm using 3.21. And the post you referred me to is interesting; however, there is no such code block in calendar-admin.pl version 3.21.

------------------

Logged
chillaxing
New Member
*

Karma: 0
Offline Offline

Posts: 0

Web Development Librarian


WWW
« Reply #2 on: December 07, 2004, 02:47:00 PM »

I found it. It's in the template edit_delete_events.html around line 145 in the section:
<SELECT NAME="newyear">
<%   $ol = new HTML: ptionList();
   for ($i=$year-5; $i<=($year+5); $i++) { $ol->addOptions($i,$i); }
   $ol->setSelectedValue($year);%>
<%= $ol->toString() %>
</SELECT>
Thanks for the push!

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: December 07, 2004, 05:48:00 PM »

Sorry.      

Glad to hear you figured it out.

So you changed this line:

for ($i=$year-5; $i<=($year+5); $i++) { $ol->addOptions($i,$i); }

to

for ($i=2004; $i<=($year+5); $i++) { $ol->addOptions($i,$i); }

Dan O.


[This message has been edited by DanO (edited December 07, 2004).]

Logged
Pages: [1]   Go Up
Print
Jump to: