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 CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)"This Week" & "This Month" views?
Pages: [1]   Go Down
Print
Author Topic: "This Week" & "This Month" views?  (Read 611 times)
0 Members and 1 Guest are viewing this topic.
genevieve
New Member
*

Karma: 0
Offline Offline

Posts: 0


« on: February 07, 2003, 06:09:00 PM »

Thanks everyone for this nice forum.  I've enjoyed installing this script and making simple changes it.  

I have been requested to change the "Week" and "Month" links on the left of the calendar into "This Week" and "This Month" links.  

I know nothing about perl, but maybe I need to add a couple "elseif" lines to the top of the default.html page and modify the <a href>Week</a> and <a href>Month</a> tags?  I'd be really grateful for any help on implementing these two changes.  

(We'd like users to continue to be able to use the links in the top navigation bar to move to previous or next month, week, or day .  We only use the list view.  I have removed the calendar view option, as well as the options to view the calendar in two-, three- or four-week modes.)

Many thanks in advance!

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: February 08, 2003, 05:42:00 PM »

** modify the <a href>Week</a> and <a href>Month</a> tags? **

Find the code in the default.html template file:

view=Month

and change it to

view=Month&month=$TODAY_MONTH&year=$TODAY_YEAR

Find the code in the default.html template file:

view=Week

and change it to

view=Week&month=$TODAY_MONTH&year=$TODAY_YEAR

Then change the link titles of each appropriately.

Dan O.

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

Logged
genevieve
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #2 on: February 10, 2003, 01:34:00 PM »

Thanks for your help, Dan.  
Can you suggest why I am getting an error message?  

When I change this:

<a href="<%= $CGI_URL_QUERYSTRING %>view=Month" CLASS="<%=(($VIEW eq "Month")?"selectedcommandtext":"commandtext")%>">This Month</A>

to this:

<a href="<%= $CGI_URL_QUERYSTRING %>view=Month&month=$TODAY_MONTH&year=$TODAY_YEAR" CLASS="<%=(($VIEW eq "Month")?"selectedcommandtext":"commandtext")%>">This Month</A>

I get the Error Processing templates saying:

Month '-1' out of range 0..11 at /(path to calendarscript)/calendarscript/lib/TimeLocal.inc line 57.

Line 57 is:
elsif ($VIEW eq "Day") {

Any suggestions?  Many thanks!

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

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: February 10, 2003, 04:50:00 PM »

No but it might have something to do with the incorrect code I supplied. Those links should be more like:

view=Month&month=<%=$TODAY_MONTH%>&year=<%=$TODAY_YEAR%>

I forgot the <%= and %> around the 2 variables.

Dan O.

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

Logged
genevieve
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #4 on: February 10, 2003, 06:43:00 PM »

thanks! This is grand!

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #5 on: February 10, 2003, 08:18:00 PM »

Does it work now?

Dan O.

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

Logged
genevieve
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #6 on: February 11, 2003, 03:57:00 PM »

Yes, yes it works.  Thanks a lot.  

I see now that it creates a different problem.   If a user is looking at the view for a month distant from the current month and decides to view the details of an event in that month, now there isn't an easy way to return to that month's listing without hitting the browser's back button.  We're brainstorming on a solution to that now; I mention it in case anyone else is considering this change.

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #7 on: February 12, 2003, 10:50:00 PM »

Well I could have told you that... but that's what happens when the client gets ideas on their own.    

You could always make extra links that look like the originals but with the 'this week' and 'this month' options. Depending on your calendar's layout, it may not add that much height to that side menu column?

Dan O.

[This message has been edited by DanO (edited February 12, 2003).]

Logged
genevieve
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #8 on: February 19, 2003, 12:38:00 PM »

Yes, I could fit in the left-hand side five navigation options: "Today," "This Week," "This Month," "Selected Week," and "Selected Month." That might not look too kludgy.  

We are also considering the idea of designing tiny week and month graphic icons (like 31 little dots in 4 rows to represent a month) and putting them in the right corner of the header bar.   But this  might be confusing since that space is dedicated in other views to go to the next week, month, or day...

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

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