Version: 1.00, by tgmorris
Developer Last Online: Oct 2013
Version: 3.0.6
Rating:
Released: 02-12-2005
Last Update: Never
Installs: 8
No support by the author.
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.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I cut and pasted...... I have a new problem as well...... I have over 30 events for the Month of April and yet it displays a message that there are no events in the next 30 days....the calendar shows all the events FYI...
I cut and pasted...... I have a new problem as well...... I have over 30 events for the Month of April and yet it displays a message that there are no events in the next 30 days....the calendar shows all the events FYI...
Any idea on what I did wrong here?
What value to do you have in ACP -> vBulletin Options -> Forums Home Page Options -> Display Calendar Events?
Do you have any other changes to your vB index.php file? While there have been some changes in the TODAY'S EVENTS section they wouldn't imapct the way this hack works. If it's still not working feel free to PM me just the modified section of code from ## TODAY'S EVENTS ## to ## LOGGED IN USERS ## and I'll take a look to see what I can spot.
What value to do you have in ACP -> vBulletin Options -> Forums Home Page Options -> Display Calendar Events?
Do you have any other changes to your vB index.php file? While there have been some changes in the TODAY'S EVENTS section they wouldn't imapct the way this hack works. If it's still not working feel free to PM me just the modified section of code from ## TODAY'S EVENTS ## to ## LOGGED IN USERS ## and I'll take a look to see what I can spot.
acp has:
30 days for Display Calendar Events
10 Comments per page
Display Holidays: Yes
Upcoming Event Type is group by date
Am I allowed to post the code here (between Today's Events and Logged In Users)?
Hi TG..... I removed the mod and then redid it......and now it's working....I musta had a blond day that day....thanks for your help, I really appreciate it.