ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsProjectsltwCalendar

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 13th, 2003, 03:42 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
Different views of calendar possible?

Is it possible to display the calendar in formats other than "month"?

The code alludes that this is possible as filenames are ltwdisplaylist.php, ltwdisplayday.php, ltwdisplayevent.php. If so, how does one invoke these other views?

Reply With Quote
  #2  
Old November 13th, 2003, 08:24 PM
prrk47002 prrk47002 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 275 prrk47002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Different views of calendar possible?

Day display:
calendar.php?display=day&day={1-31}&timestamp={stamp}

Args:
&day the day of the month
&timestamp output of mktime() for the month & year to be displayed

Event display:
calendar.php?display=event&id={id}&timestamp={stamp}

Args:
&id numeric event id from db
&timestamp output of mktime for the month & year to be displayed


List display:
calendar.php?display=list&start_date=yyyy-mm-dd&end_date=yyyy-mm-dd&cat_ids=n,n,n

Args:
start_date day to start the list
end_date day to end the list
cat_ids limit to these category numbers

One of the other things I want to do in the next release is get rid of the 'timestamp' and go strictly with "yyyy-mm-dd" on the URL.

If you need some code examples, let me know

Reply With Quote
  #3  
Old November 13th, 2003, 09:14 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: Different views of calendar possible?

Being a "Codefoetus" really, you're going to have to help me here a bit. Is the code to derive the timestamp already in one of the calendar modules or does it need to be added? A small sample piece of code would help enormously.

Just out of interest and in an effort to learn, why did you use the timestamp feature anyway?

Thanks

Reply With Quote
  #4  
Old November 14th, 2003, 04:39 AM
prrk47002 prrk47002 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 275 prrk47002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Different views of calendar possible?

For the month display, you can look at calendar.php (the month: case) to see how to construct a timestamp. The $_REQUEST array holds the arguments of the GET request (everything after the ?in the URL). So, if you look starting at ~line 128, you can see that if the month or year are not set (or month not valid), then the time() function is used to return the current date & time in a "timestamp" format and the current month will be displayed.

If a particular month & year are requested, then the mktime() function is used to create a timestamp for <month>/1/<year> at 12:12:12 (not that the time really matters).

To construct a link for a particular month's events, you simply pass the month and year as URL arguments and calendar.php "converts" them. Using 6/12/1977 as an example:

echo '<a href="/calendar.php?display=month&month=6&year=1977">6/1977</a>';

To construct a link for a particular day's events , you would do something like this (using 6/12/1977 as example):

$timestamp = mktime(12,12,12,6,7,1977);
echo '<a href="/calendar.php?display=day&day=12&stamp='.$timestamp.'">6/12/1977</a>';

From a practical standpoint, the event display is not very usefull unless called from somewhere else since you need to know a valid event 'id' to request from the database.

The timestamp existed in earlier versions of the calendar before I started working with it. I expect to change it in the next "feature" upgrade so that all dates will be specified in the "yyyy-mm-dd" format as they are stored in the database. That will make things easier.


Reply With Quote
  #5  
Old November 21st, 2003, 04:18 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: Different views of calendar possible?

I've been playing with the different views and have found the List display using categories to be *VERY* useful. I have been asked to construct a training-course schedule calendar and the List display would be ideal for users wanting to schedule their time to attend a course.

During my experimentation I think I may have discovered a bug, but it's more likely to be me not reading the code correctly and drawing the wrong conclusions!

When displaying the List for a single month eveything is fine and dandy. However, when listing future months that do not contain any events the last month always displays the text "No Events found" in the date column. Previous empty months do not show this text, it's always the very last month.

Firstly, is this correct? I would have thought that all empty months would show the message or none of them would, just to appear consistent.

Secondly, the text only appears in the date column and does not stretch across all four columns (date, time, name, description).

Third, there are no admin options, though the code looks like there should be if you are logged in. (Not sure about this one.)

And finally, if I remove the "No Events found" text from the code, will I be affecting any other displays, error messages, etc, that I haven't yet discovered?


Once again thanks in advance.

Reply With Quote
  #6  
Old January 20th, 2004, 01:51 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: Different views of calendar possible?

Just as an update to this, I have been asked to implement an "Event View" on our intranet's calendar. The calendar is being used to schedule internal training courses and our courses run throughout the whole year, so being able to select "Introduction to Word 2000" from a drop-down list would show all these courses for the year. The user could then pick which time of the year that suited them. This would be a nice addition for a future release (hint, hint)


Reply With Quote
  #7  
Old January 21st, 2004, 01:35 PM
prrk47002 prrk47002 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 275 prrk47002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Different views of calendar possible?

1) It's probably a bug.

2) A list based on Categories wouldn't be too hard. I'll keep it in mind.

3) With the holidays, getting ready to switch jobs, and switching OS's on my development system (from RedHat to Debian), I haven't had a lot of time to spend on the calendar (and can't look at bugs either).

But I have Debian almost up (need to build PHP & apache Yet) then I'll be starting on the next release of the calendar.

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Different views of calendar possible?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek