Calendar - multiple articles on the same date? |
[eluser]Unknown[/eluser]
I'm very new to CI and facing a problem - need to show several articles in the calendar on the same day. (The tutorial - http://ellislab.com/codeigniter/user-gui...endar.html - shows only 1 event per date). Is that possible? Thanks.
[eluser]Unknown[/eluser]
Yeah, everything was pretty easy If we pass an array like: Code: $data['events'] = array( Code: if (isset($data[$day])) Maybe it will help someone ;-)
[eluser]janogarcia[/eluser]
Thanks, just in time! I needed to tackle the same issue today (I'll extend the CI_Calendar class instead of directly modifying it, though).
[eluser]sophistry[/eluser]
see my sig for another approach to getting multiple events per day on a month calendar. i got annoyed at the wimpy CI calendar class one day so i built an object-oriented version to fix some of the problems.
[eluser]janogarcia[/eluser]
Double thanks to sophistry! Can't believe it, I was searching too for an elegant way of loading static pages/sections, found some threads but not yours (the one about site_migrate).
[eluser]Jagar[/eluser]
sophistry, is there any example(s) on how the calendar in your sig looks like? Thanks
[eluser]Jagar[/eluser]
zoltano, thanks for your provided solution, I'm using it and it's good, except I'm using xajax to go back and forth between month so if I do something like: $data = array(10=>array("Event 1"=>"http://www.example.com","event 2"=>"http://www.example2.net"); it will be displayed in all the months. I've been looking for a way to specify the month as well in the array so it displays the event in the month and day specified. the following how I use the calendar with xajax: Code: function _cal($get){ Thanks
[eluser]sophistry[/eluser]
[quote author="Jagar" date="1245102368"]sophistry, is there any example(s) on how the calendar in your sig looks like? Thanks[/quote] i don't have any example. in fact, i was just thinking of taking down that CSS file because it just complicates things. the OOCalendar is for developers who want to have an Object Oriented Calendar instead of the string-oriented one provided in the CI distribution. cheers.
[eluser]Jagar[/eluser]
zoltano, thanks to the modification you provided I can load multiple events in one day as follow: Code: $data[$day][$value['event_title']] = site_url('event_detail/'.$value['event_id']); But those events will appear in every single month with the same day, I looking at doing something like this Code: $data[$year][$month][$day][$value['event_title']] = site_url('event_detail/'.$value['event_id']); $month $day and $year are extracted from $event_date before those lines. I can't figure out how to do the modification, and I know it is somewhere here: Code: if (isset($data[$day])) I would really appreciate if you could tell me how this can be done. Thanks in advance |
Welcome Guest, Not a member yet? Register Sign In |