First of all, great hack!, thanks Mister..
I modified the hack to display events for the next two weeks by modifying the SQL query to this:
Code:
SELECT eventid, subject, eventdate, public
FROM calendar_events
WHERE (eventdate >= '$today' AND eventdate <= DATE_ADD('$today', INTERVAL 14 DAY)) AND ((userid = '$bbuserinfo[userid]') OR (public = 1))
ORDER BY eventdate
I also modified the hack to display "None" if there are no events found. You just have to add an 'else' clause to the If/Then statement.
Im running into 2 problems. (1) The function designed to remove the trailing commas does not seem to work. The code is this:
Code:
$todaysevents = substr($todaysevents,0,strlen($todaysevents)-2);
This doesnt seem to do anything at all because I have modified it and nothing changes. Any ideas?
(2) The other problem is based on a further modification of this hack. I wanted to separate Todays Events from Upcoming Events so I made separate variables to represent todays events and events from today+1 until today+14days. The problem is that it doesnt work. All the code makes sense to me except I can't figure out where $caltitlelength comes from. Im reusing that variable in both If/then statements. That may be the problem, but I dont understand the variables source or purpose so I cant modify it to suit my needs. Any help there would be greatly appreciated. I'd be happy to post the modified code if that will help.
Thanks