By stevec4 on Tuesday, 26 May 2020
Replies 6
Likes 0
Views 626
Votes 0
Years ago I had an edit to list the categories alphabetically in the monthly calendar view vs alphabetically by event, it involve changing the sort of an array.
I switched to Flatplus recently and lost this functionality. Can you point me to which file in Flatplus I would need to modify so the category's sort top to bottom alphabetically instead of events

Thanks
Steve
This is what I added to the calendar_body.php file per Geraint's guidance.


usort($currentDay["events"],"sortjeventsbycat");


I have tried it in flatplus but the categories are still not sorting. Any guidance would be appreciated.
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Try it in calendar_responsive.php

Many thanks
Tony
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Tony
Steve
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Very welcome Steve!
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry, Tony I was mistaken it didn't fix the issue.


//Sort by category
usort($currentDay["events"], "sortjeventsbycat");

$event = & $currentDay["events"][$i];

I tried sorting the events by cat but it doesn't seem to be working, this is in the responsive file about line 100

There is a sort occurring just prior to this I wonder if it could be modified to sort by date and cat?


// I need to sort the events by start date order (not start time on the day)
usort($this->data["dates"][$dn]["events"], array($this, "sortjevents"));


Thanks again for the help
Steve
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you provide login details and FTP and I'll get it sorted
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post