solved Events in Wrong Order

Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Awesome that we have search and past events now. However, my events are listed with the last first and first last.

So, for the upcoming events one has top go 18 pages back lol

I know I have to find some type of ascending/descending code somewhere and change it - however I don't know where to find it and what it looks like.

I believe Douglas told me before because I noticed the issue in the Nova skin before, but I can't find the forum post with his advice - sorry.




--

Ken Rich
indiegospel.net

updated by @ken-rich: 02/11/15 05:54:42AM
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Never mind - finally found it. Profile Events=> index.tpl=> I changed asc to desc in two places - hope that's right. Seems to work.

{if isset($ts_start) && isset($ts_end)}
            {jrCore_list module="jrEvent" search1="event_date >= $ts_start" search2="event_date <= $ts_end" order_by="event_date desc" pagebreak=10 page=$_post.p pager=true}
        {else}
            {jrCore_list module="jrEvent" order_by="event_date desc" pagebreak=10 page=$_post.p pager=true}
        {/if}



--

Ken Rich
indiegospel.net
brian
@brian
9 years ago
10,144 posts
Yeah that is OK - and that is really how it should be, so I can check it out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
@Brian -

I had this same issue - the default sort order is ascending rather than descending. It only took about 10 seconds to fix because I knew where to go to fix it ... but I recommend setting the default sort order set to descending as it's the most natural choice - to Ning refugees.

By default, Ning keeps all the old events around and displays them on the Events page. They have to be manually Featured on to the home page. By default, JR shows the top "n" upcoming events on the home page so no featuring is required.
brian
@brian
9 years ago
10,144 posts
The more I think about this, I don't think going to DESC is the best solution - here's why:

- if past events are NOT shown, and let's say you have 20 events, then ordering by event_date DESC means the events that are the farthest away in time are shown first. Wouldn't we want the events that are CLOSEST to happening to be on the first page? This would be order by ASC.

- if past events ARE shown, then I think we really should go into a 2 step order:

- order by events that have not happened yet ASC (so the event closest to happening is at the top of the first page)
THEN
- order by events that have already happened ASC (so the most recently happened event is closest to the front).

Does that make sense? Just ordering by DESC doesn't seem like a good idea to me.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
@Brian -

If you go to my event listing:
http://www.thechocolatelife.info/thechocolatelife/event

Sort order is set to DESC. Which, in this case, is the one farthest in the future, which is not intuitive. But - with over 100 past events, it's the only better option.

So, you are right. The display of events, when past events are shown, needs to be thought of in two parts:

1) Events in the future where the sort order is set to that the event closest to happening is at the top (sort ASC)
2) Events in the past where the sort order is set so that events that "expired most recently" are at the top of the list. I think this is DESC.

In any event, treating the Events list in two part and sorting accordingly (could be user-selectable) makes more sense.

BTW, the past events could be on their own separate page, paginated. They don't have to be incorporated into the display of upcoming.
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
You guys are going past my level - I'm a simple guy lol

I was lucky to get this far with it, so I'll leave it in Brian's capable hands for the next update.

The issue is known, so I'm sure the best solution will evolve. You might want to also consider putting some different views on subtabs too - like Nova does.

Maybe: By Location, Highest Rated, Calender View, etc.


--

Ken Rich
indiegospel.net

updated by @ken-rich: 01/09/15 04:28:35PM

Tags