Back to vBulletin 3.0 Add-Ons

Display Grouped Events more sensibly when grouped by event
Mod Version: 1.00, by tgmorris

This modification is in the archives.
vB Version: 3.0.6 Rating: (0 vote - 0 average) Installs: 8
Released: 13 Feb 2005 Last Update: Never Downloads: 2
Not Supported  

Out of the box vBulletin displays events that are Grouped by Event by their eventid. Seems kind of dumb as they should be grouped by the starting date or some more logical criteria. This simple change does just that. BTW - I did a search and didn't see this posted so if I missed it mea culpa.

NOTE: This change impacts only the FORUMHOME display. If you are running the Upcoming Events modification for vBa CMPS you can make these same change to the minicalendar.php module.

In index.php find
Code:
// ### TODAY'S EVENTS #################################################
if ($vboptions['showevents'])
Replace with
Code:
// ### TODAY'S EVENTS #################################################
function compare_dates($a, $b) {
        // only used when sorting events grouped by event id
        if ($a[0] > $b[0])
                return 1;
        if ($a[0] < $b[0])
                return -1;
        return 0;
}
if ($vboptions['showevents'])
A bit further down find
Code:
                ksort($events, SORT_NUMERIC);
Replace with
Code:
                if ($vboptions['showeventtype'])
                        ksort($events, SORT_NUMERIC);
                else
                        uasort($events, 'compare_dates');
That's it! Almost too simple.

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024