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 January 30th, 2003, 02:51 PM
adam2020 adam2020 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 adam2020 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to adam2020
lwt calendar defect

Hi everyone

I am not sure whether I am posting this question at rite place or not but anyhow ...

I downloaded lwt_calendar scripts from calendars.codewalkers.com , its pretty easy on installation and usebility, but any how, i do notice a major defect.

The month display, which it suppose to display current month, previous month and next month, seems like next month is wrong. I.e . For january 2003, the next month is displaying march 2003.

anyone has fix/solution for this one ?

thanks
http://calendar.codewalkers.com/calendar.php

Reply With Quote
  #2  
Old January 30th, 2003, 03:34 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: lwt calendar defect

Try changing
php Code:
Original - php Code
  1.  
  2. $next_month_timestamp = strtotime("+1 month", $timestamp);

with
php Code:
Original - php Code
  1.  
  2. $next_month_timestamp = mktime(12,12,12,$this->month+1, $this->day, $this->year);

in ltw_classes.php

Reply With Quote
  #3  
Old January 30th, 2003, 04:19 PM
janix janix is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 12 janix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: lwt calendar defect

Can someone also help with changing the time on the events section of the calendar to 24 hour clock system.

Reply With Quote
  #4  
Old January 31st, 2003, 08:58 AM
janix janix is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 12 janix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: lwt calendar defect

I didn't include the time code from the calendar
so here it is (I think). Please, if anyone can tell me how to convert this to hours - 00 to 23 and minutes - 00 to 59 I would really appreciate it.

php Code:
Original - php Code
  1.  
  2. echo "<SELECT name="eStartTimeAMPM">n";
  3.         if('AM' == date("A",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  4.             echo "<OPTION VALUE="AM" SELECTED>AM</OPTION>n";
  5.         } else {
  6.             echo "<OPTION VALUE="PM">PM</OPTION>n";
  7.         }
  8.         if('PM' == date("A",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  9.             echo "<OPTION VALUE="PM" SELECTED>PM</OPTION>n";
  10.         } else {
  11.             echo "<OPTION VALUE="PM">PM</OPTION>n";
  12.         }
  13.         echo "</SELECT><BR>n";
  14.         $timearray = explode(":", $row['end_time']);
  15.         echo "End Time:<BR>Hour:&nbsp;n";
  16.         echo "<SELECT name="eEndTimeHour">n";
  17.         for($i = 1; $i <= 12; $i++) {
  18.             if($i == (int)date("g",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  19.                 echo "<OPTION VALUE="" . $i . "" SELECTED>" . $i . "</OPTION>n";
  20.             } else {
  21.                 echo "<OPTION VALUE="" . $i . "">" . $i . "</OPTION>n";
  22.             }
  23.         }
  24.         echo "</SELECT>n";
  25.         echo "Minutes:&nbsp;n";
  26.         echo "<SELECT name="eEndTimeMinute">n";
  27.         for($i = 0; $i <= 45$i = $i + 15) {
  28.             if($i == (int)date("i",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  29.                 echo "<OPTION VALUE="" . $i . "" SELECTED>" . $i . "</OPTION>n";
  30.             } else {
  31.                 echo "<OPTION VALUE="" . $i . "">" . $i . "</OPTION>n";
  32.             }
  33.         }
  34.         echo "</SELECT>n";
  35.         echo "<SELECT name="eEndTimeAMPM">n";
  36.         if('AM' == date("A",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  37.             echo "<OPTION VALUE="AM" SELECTED>AM</OPTION>n";
  38.         } else {
  39.             echo "<OPTION VALUE="PM">PM</OPTION>n";
  40.         }
  41.         if('PM' == date("A",mktime($timearray[0],$timearray[1],0,$datearray[1],1,2001))) {
  42.             echo "<OPTION VALUE="PM" SELECTED>PM</OPTION>n";
  43.         } else {
  44.             echo "<OPTION VALUE="PM">PM</OPTION>n";
  45.         }
  46.         echo "</SELECT><BR>n";

Reply With Quote
  #5  
Old January 31st, 2003, 09:26 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: lwt calendar defect

The code to supposivly fix the months, doesn't seem to work still. it it still showing the wrong month. what to do?

Reply With Quote
  #6  
Old January 31st, 2003, 09:47 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: lwt calendar defect-fixed

problem solved...here's the snippet that actually works. the reason the current setup does not work is because on the 31st day of a month, if the next month has less then 31 days (for example jan has 31 and feb has 30) the script tries to jump ahead a month from the current date..or jan 31 to feb 31, but there exists no feb 31. this new snippet finds the next current month, has been tested and works.

$next_month_timestamp = mktime(0,0,0,$this->month+1,1,$this->year);

and

$prev_month_timestamp = mktime(0,0,0,$this->month-1,1,$this->year);


happy hunting
~Moooink & Twenty7

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > lwt calendar defect


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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




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