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 3rd, 2004, 11:47 PM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Reoccuring events don't sort properly with non-Reoccuring

When an event is set to reoccure, it doesn't sort right with other events. Observe:
http://calendar.codewalkers.com/cal...th=10&year=2004
october 18th.
At 6 am there is an event which occurs every monday and was started the week before. However on the 18th, this reoccuring event which happens at 6AM is above an event that starts at 2AM. Does anybody know how to fix this? thanks.

Reply With Quote
  #2  
Old November 3rd, 2004, 11:59 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: 24
RE: Reoccuring events don't sort properly with non-Reoccuring

I noticed that problem also. It's because it's sorting by the date and time, not just the time. That's why the recurring event shows up first. It has a start date before the other events for that day. But sorry, I don't know how to fix it.

Reply With Quote
  #3  
Old November 4th, 2004, 12:01 AM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

can you point me to which line or at least in which file this happens. I probably can hack something together with enough time.

Reply With Quote
  #4  
Old November 4th, 2004, 12:39 AM
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: 24
RE: Reoccuring events don't sort properly with non-Reoccuring

I think it’s in ltwdisplaymonth.php where it does the select. It has an ORDER BY event_date, day_event DESC, start_time. The event_date is the first date of the recurring event. When I saw that I realized it probably wasn’t an easy fix. I’m not a php expert so I didn’t try. If you do fix it let us know.

Reply With Quote
  #5  
Old November 5th, 2004, 06:37 AM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

yeah! I think I figured it out...
line 137 in ltwdisplaymonth.php
I'M NOT SURE IF THIS IS A END ALL FIX ALL SOLUTION. DON'T HOLD ME TO THIS. It looks like this fixes the problem, but there might be other side-effects that I can't see. If anybody sees any errors in what I've done, please post back!!!!
The original line is commented out.
php Code:
Original - php Code
  1.  
  2. //$query .= "ORDER BY event_date, day_event DESC, start_time ";
  3. $query .= "ORDER BY day_event DESC, start_time ";

[edit]the php format code auto ads a ?> !!!! don't put that in the file!!

Like I said, it SEEMS to work, but I'm not sure. Any feedback would be much appreciated.
-ben


Reply With Quote
  #6  
Old November 5th, 2004, 01:58 PM
dsdir dsdir is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: New York
Posts: 13 dsdir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

I tried it and it appears to work. No adverse affects as far as I can tell. Good work.

You should also make the same change in ltwdisplaylist.php. That is the list display.

Reply With Quote
  #7  
Old November 6th, 2004, 01:48 AM
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: 24
RE: Reoccuring events don't sort properly with non-Reoccuring

good deal, I hope it helps some other people out there. Also, it appears that this calendar has like sorta died. Is there any way (if my change is legit) could be added back into the source? Cool.
-ben

Reply With Quote
  #8  
Old November 6th, 2004, 01:48 AM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

That last post was me, just forgot to login ;)

Reply With Quote
  #9  
Old November 13th, 2004, 06:56 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: 2
RE: Reoccuring events don't sort properly with non-Reoccuring

The calendar hasn't died, it's just been a matter of having the time to devote to it.

I'm planning a new release that will use adodb to support both mysql & postgresql, but I simply haven't had the time to do it.

In the process, I'd like to fix all the bugs, add more recurring event types (monthly, day of month, yearly) and simplify the date/time inputs (by using strtotime), and a few other things.

I also want to write a query class so you can easily look events up without any SQL statements in your code. Then you could easily write custom displays using the underlying core code. For example, on my Troop's web page, I'd like to be able to put the description of the next meeting agenda on the "home page" for people to see without having to go to the calendar page. A query class would make that easy.

Reply With Quote
  #10  
Old November 13th, 2004, 07:44 PM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

Ya, a class is the way to go. I use the calendar a lot, so I'll be sure to post any bugs. Wan't 'em here or in another thread?
-ben

Reply With Quote
  #11  
Old November 14th, 2004, 03:36 AM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

bug: table rows without events in them collapse. Also, are you sure you want to use adodb?? Why not just stick with mysql? Codewalkers is all about php and sql. A class would be so easy to make, however making adodb seems harder (and plus it would drive me insane)
-ben

Reply With Quote
  #12  
Old November 14th, 2004, 08:56 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: 2
RE: Reoccuring events don't sort properly with non-Reoccuring

I'm not talking anything Microsoft here, I'm talking http://adodb.sourceforge.net/, a php library that would allow the calendar to be used with PostgreSQL as well as MySQL. Something people have asked for.

Reply With Quote
  #13  
Old November 15th, 2004, 04:46 AM
esromneb esromneb is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 7 esromneb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Reoccuring events don't sort properly with non-Reoccuring

F ms dude. I know your not talking ms. I'm just saying that adodb isn't very common, and that straight mySql would be better. I mean, if you want it to be easy to edit an all. Just my input ;)
-ben

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Reoccuring events don't sort properly with non-Reoccuring


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


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