![]() |
Calendar class not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Calendar class not working (/showthread.php?tid=27431) Pages:
1
2
|
Calendar class not working - El Forum - 02-10-2010 [eluser]eboxhead[/eluser] So I'm brand spanking new to CI, and I've been playing with the calendar class. I can display the calendar just fine, do most of the prefs no issues, but as soon as I try to use the next / prev pref the thing falls apart. The initial calendar loads fine, but as soon as I try to change the month i get a 404 error. I'm using CI 1.7.2 and MAMP. the URL for calendar is http://localhost:8888/ci/index.php/test/ My controller page looks like this: Code: <?php I've copied the code straight from the user guide and adjusted the params as needed. Any suggestions? What am I missing? Calendar class not working - El Forum - 02-11-2010 [eluser]maria clara[/eluser] you've missed the brackets in your $prefs Code: <?php Calendar class not working - El Forum - 02-19-2010 [eluser]eboxhead[/eluser] Thanks, just tried that. When I do that the next / prev links dissapear. Calendar class not working - El Forum - 02-19-2010 [eluser]helmutbjorg[/eluser] Your prefs were fine... remove those brackets. What is the address that is at the top when you get the 404? Calendar class not working - El Forum - 02-19-2010 [eluser]eboxhead[/eluser] http://localhost:8888/CI/index.php/test/2010/03 Calendar class not working - El Forum - 02-19-2010 [eluser]helmutbjorg[/eluser] Does http://localhost:8888/CI/index.php/test work when you put that in the address bar and hit enter? Calendar class not working - El Forum - 02-19-2010 [eluser]danmontgomery[/eluser] I don't use the calendar class, but it seems to me that CI would be trying to route test/2010/03, maybe you should set up routes for the calendar? Calendar class not working - El Forum - 02-19-2010 [eluser]helmutbjorg[/eluser] Try setting your next_prev_url to this... Code: 'next_prev_url' => 'http://localhost:8888/CI/index.php/test/index/' Calendar class not working - El Forum - 02-19-2010 [eluser]eboxhead[/eluser] Thanks, chanign the next_prev_url worked after i changed the URI segments. is that because i have an index function in the controller? is that required? Calendar class not working - El Forum - 02-19-2010 [eluser]helmutbjorg[/eluser] The index function is required. I think the example in the user guide assumes you are making a new function rather than putting that code in the index. You could take that code out of the index and put it in a new method called test/calendar or someting like that. If you don't want to put that code in a function other than index you can hide the index bit with a route. Eg. Code: $route['test/(:num)/(:num)'] = 'test/index/$1/$2'; |