![]() |
Calendar Multiple Events Per Day (Available) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Calendar Multiple Events Per Day (Available) (/showthread.php?tid=44525) |
Calendar Multiple Events Per Day (Available) - El Forum - 08-17-2011 [eluser]Unknown[/eluser] Because yesterday i've search the forum and i saw many people search for a way to have multiple events per day on the codeigniter calendar. Here is the code that i made in order my calendar to have multiple events per day. The calendar is based on the nettus tutorial if anyone interested and can be found here: [email=http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-the-calendar-library/]Nettuts Codeignitter Calendar[/email] Step 1) make sure the nettuts way of calendar work on you. Step 2) copy the calendar.php from system/libraries to application/libraries Step 3) make an adjustment in the calendar.php library in line 217 and put the code below (Thanks to member zoltano): Code: if (isset($data[$day])) Step 4) now on the calendar model you must make your output array. The code you must put on the get_calendar_data function of the model is shown below: Code: function get_calendar_data($year, $month) { Result on photo here: Multiple Events Codeigniter Calendar Good luck coding. Calendar Multiple Events Per Day (Available) - El Forum - 01-21-2013 [eluser]dekimpeb[/eluser] and the controller? Calendar Multiple Events Per Day (Available) - El Forum - 04-29-2014 [eluser]Unknown[/eluser] can you explain the last function? why isn't it displaying the events after loading the calendar, the event will only show when i click the prev or next on the calendar |