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 CommunityEverything ElseGeneral Use (Moderators: scott, DanO, Marty)sort events in a day by time added
Pages: [1]   Go Down
Print
Author Topic: sort events in a day by time added  (Read 285 times)
0 Members and 1 Guest are viewing this topic.
rob
New Member
*

Karma: 0
Offline Offline

Posts: 0

various


WWW
« on: June 15, 2003, 11:03:00 PM »

Is it possible to sort events in a day by time added?  All day events already sort like that (I know, why would a person want more than one all day events . . .) but for my puposes it would be best if I could get all the events on a day sorted by time added.


Rob

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

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: June 17, 2003, 09:32:00 AM »

** Is it possible to sort events in a day by time added? **

For display on the calendar?

For that if you find the line(s) in the default.html template file:
<%FOREACH EVENT%>
You can try adding

code:
<% @$EVENTS = sort {$a->{details}->{time_added} <=> $b->{details}->{time_added} } @$EVENTS; %>

Immediately before it.

This is untested so use at your own risk and be sure to keep a back up of original files just in case.

Dan O.

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

Logged
rob
New Member
*

Karma: 0
Offline Offline

Posts: 0

various


WWW
« Reply #2 on: June 17, 2003, 11:44:00 AM »

Seems to work,

Thanks.

Rob

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

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