[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: order on events page

On Sun, 1 Aug 1999, peter karlsson wrote:

> > Here is the email that requested I place 1999 events at the top of the
> > event page.  
> Yeah, I thought it looked a bit funny when I added the 2000 events to the
> list, but since I don't know Perl (working on it, though), I couldn't figure
> out how to do it good...
> The best order would IMHO be:
> * Current year
> * Next year
>   (etc)
> * Past events for current year (link only)
> * Past events for previous year (link only)
>   (etc)
> It should probably be split of into two loops, one that iterates over the
> years forwardly printing the still-to-happen events, and one that iterates
> backwardly, printing the already-have-happened events.

I've got a better idea: I'll let you decide.  As of now you've got one
command available to you.

get_event_list ('1999', '0', '$(ENGLISHDIR)/events' )

(I assume ENGLISHDIR would change depending on your particular language.)

I'd like to add a few more.  Or, put another way, keep the old one for
backward compability, and add in two more.

get_future_event_list (year)
get_past_event_list (year)

with the variable year being optional.  If year is not submitted, then the
function will call localtime and find out when now is and go from there.

What do you think?

Reply to: