RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Comments and Suggestions / SideBar for what's on 'Now'
Posted:  30 Jul 2013 10:08   Last Edited By: vr_driver
Hi,

Thanks for your calendar. We are looking at using it for using it for our radio station as to who is currently on air.

Here's a copy of the hack I've done to the lcsbar.php   Just run a DIFF and you'll see what I've changed. This hack will change over time for better formatting, but you get the idea.

It now spits out just the "Title" of the event that is scheduled for NOW. That is the field we have for our announcer's names. We also plan on using it with artwork as well, linking the categories in to it as well as the filenames. It'll be slightly complicated, but long term, it should work well. Plus, it can be used for rosters too.

Provided there are no crossover of events, this should work well.

Thanks heaps! :)

The link for the diff is http://diffchecker.com/c1in3ela


-Steve
Posted:  30 Jul 2013 10:40
Oops:
http://diffchecker.com/fy8v16en

I had the date function wrong at the bottom:


$sbsDate = $sbContent == 'todo' ? date("Y-m-d",$sbsTime - (1 * 86400)) : date("Y-m-d",$sbsTime); // if ToDo start 30 days back
$sbeDate = date("Y-m-d",$sbsTime + (($sbUpDays-1) * 86400));

// Make it today and now
$sbeDate = $sbsDate;
$sbFilter .= " e.s_time < '" .  date("H:i", time()) . "'";
$sbFilter .= " AND e.e_time >= '" .  date("H:i", time()) . "'";