Joomla sidebar widget

How could I have the Joomla sidebar widget keep displaying an event for that entire day even when it passes (as well as the other events in coming weeks)? Because at the moment if an event is scheduled for 10.00am the sidebar widget will display it up to that exact time and then disappear from the list after that.
Thanks, Wayne

Hi, Wayne.
Have a look at file joomla/modules/mod_scheduler/mod_scheduler.php:

function get_events($db, $number = 5) {
	global $userid, $cfg;

	$start = date('Y-m-d H:i:s');
	$endd = date('Y-m-d H:i:s', time() + 60*60*24*30*3);

	$dates = new SchedulerHelper($db->_resource, $db->_table_prefix.'events_rec');

$start and $endd variables specify time period to select events. You could modify values and have time period which you like.

Hi radyno,

I tried altering the value of $endd to show the event in the sidebar list for the full day. I didn’t seem to work for me. When I altered the value formulation, It either still displayed the event only up until the starting time for the scheduled event and then disapeared. Or didn’t display any of the events in the sidebar.

thanks Wayne

Hi.
Try to modify your code like here:

	$start = date('Y-m-d 00:00:00');
	$endd = date('Y-m-d 00:00:00', time() + 60*60*24*1);

It’ll show events of current day.

Thanks radyno,

It now displays the events on the current complete day even when the event has passed (perfect), but unfortunately future events on other days now won’t display. Can these be displayed as well?

Thanks Wayne

I think you should modufy variable $endd. In my previous post I setted it just for current day.
If you wanna set more days modify this code according your needs:

$endd = date('Y-m-d 00:00:00', time() + 60*60*24*2); // two days
$endd = date('Y-m-d 00:00:00', time() + 60*60*24*3); // three days
$endd = date('Y-m-d 00:00:00', time() + 60*60*24*7); // a week
$endd = date('Y-m-d 00:00:00', time() + 60*60*24*30); // a month
$endd = date('Y-m-d 00:00:00', time() + 60*60*24*30*3); // three monthes

Thanks again radyno,

This is great!

Cheers, Wayne