By mradrian on Thursday, 05 October 2017
Replies 12
Likes 0
Views 1.7K
Votes 0
hello.
i have a ”JEvents Latest Events Module” module added to my page, Display mode is default 0, i've attached the settings of the module jevents_settings.png, the problem is the order, as you can see in the jevents_list.png, the second event starts from 05 oct, third on 15 sept, 4th on 14 aug, so the order isn't correct, i have option to reverse order but it doesn't display correctly also, is something wrong with the settings or there is a bug?
you can check the page here http://cjsuceava.ro
thank you.
Hello,

They are sorted by the date they are running on. Because multiday events are set to show once on each day they are treated as separate events. You could adjust that setting to just on the first day.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Is that event a repeating event or a multi-day event?

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
first 4 events are Multi Day Event, the following 2 are 1 day event, and last 2 multi day event. all should have been sorted by Start date right?
if the event is set as repeating it isn't a problem because it only is displays the current day, but for a repeating event the start and end dates are the same on the details page..
i've added the code in latest.php:


usort($daysEvents, function ($a, $b) {
if($this->sortReverse)
return $a->_startrepeat < $b->_startrepeat;
else
return $a->_startrepeat > $b->_startrepeat;
});


after line 998 which is

reset($daysEvents);
and before

foreach ($daysEvents as $dayEvent) {

and it works, any other solution without changing the code?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
No, so for multi-date events you need to use a different tag see:
https://www.jevents.net/frequently-asked-questions/custom-format-strings

So: ${eventDate}

Since the event starts again today. Or set multiday events only show once on the first day.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
i've added JEvents - Latest Events Module and in first post i've made a printscreen with the settings of the module, and i set "Display once even if event started in the past", the date shown is the first day of the multi event but the order isn't correctly displayed.
Ana-Maria OVADIUC AMO - pictură și acuarelă 25 Sep 2017
Bucovina în Marele Război 05 Oct 2017
Din secretele maeştrilor – lumină şi culoare 15 Sep 2017
Plutăritul în Bucovina 10 Oct 2017
Ștefan cel Mare - Din istorie in veșnicie 14 Aug 2017
Concerte de Pian la 4 Maini 11 Oct 2017
i don't understand where should i use ${eventDate}?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

So that is your problem. you need to use the ${eventData} in the customformat string instead of startDate. Since the event is in the correct order as it is taking place.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
${eventDate} works as it displays the current date (today), the order of the events isn't sorted by the startdate, i'll see what i can do, thanks for the reply.
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
so i followed the code, result from the query is ordered by startdate, but then in modules/mod_jevents_latest/tmpl/default/latest.php on line 565 usort($eventsThisDay, array(get_class($this), "_sortEventsByTime")); it changes the order. replacing _sortEventsByTime with _sortEventsByDate or commenting the line does what i need.
thanks for the info and help
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
hello, i updated to latest version of jevents, i have the same problem with "JEvents - Latest Events Module", i changed line 568 in modules/mod_jevents_latest/tmpl/default/latest.php, _sortEventsByTime replaced with _sortEventsByDate.
cheers
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Did you set the module to measure time from now?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Did you set the module to measure time from now?

yes just tried, doesn't work, i have Display mode 0.
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
hello.
the issue hasn't been fixed yet in any of the versions, i'm still replacing on every update_sortEventsByTime with _sortEventsByDate at line 806 now in mod_jevents_latest\tmpl\default\latest.php

also another question, can you check cjsuceava.ro, the module "Evenimente în desfășurare sau următoare", if titles are too long they display 2 lines, maybe you can truncate the title adding "..." when is too long, to display better.
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post