CodeIgniter Forums
generate calendar! - 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: generate calendar! (/showthread.php?tid=28048)



generate calendar! - El Forum - 02-28-2010

[eluser]husni[/eluser]
i have generate the calendar but i cannot make a link to view the calendar of the next and previous month.. i have followed the tutorial in codeigniter tutorial but maybe i have not enough requirement to make the link..anyone can help me?


generate calendar! - El Forum - 02-28-2010

[eluser]theprodigy[/eluser]
per the user_guide:
Code:
$prefs = array (
               'show_next_prev'  => TRUE, // this option is for showing next and previous links
               'next_prev_url'   => 'http://example.com/index.php/calendar/show/' // this option is for the url of the next and previous links
             );

$this->load->library('calendar', $prefs);

echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));



generate calendar! - El Forum - 02-28-2010

[eluser]husni[/eluser]
[quote author="theprodigy" date="1267405425"]per the user_guide:
Code:
$prefs = array (
               'show_next_prev'  => TRUE, // this option is for showing next and previous links
               'next_prev_url'   => 'http://example.com/index.php/calendar/show/' // this option is for the url of the next and previous links
             );

$this->load->library('calendar', $prefs);

echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));
[/quote]

Code:
'next_prev_url'   => 'http://example.com/index.php/calendar/show/'
that code link to that url? i don't have the /calendar/show..


generate calendar! - El Forum - 02-28-2010

[eluser]theprodigy[/eluser]
in that example, the calendar points to the controller, and the show points to the method. If you don't have that method, then change the url. That is just the example given in the url. You need to put the url that you have created for showing the calendar.

For a really good screencast on the calendar, go to http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-the-calendar-library/


generate calendar! - El Forum - 02-28-2010

[eluser]husni[/eluser]
[quote author="theprodigy" date="1267427029"]in that example, the calendar points to the controller, and the show points to the method. If you don't have that method, then change the url. That is just the example given in the url. You need to put the url that you have created for showing the calendar.

For a really good screencast on the calendar, go to http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-the-calendar-library/[/quote]

ok thanks..i'll try.. :-)