![]() |
a small mistake in documentation... - 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: a small mistake in documentation... (/showthread.php?tid=2749) |
a small mistake in documentation... - El Forum - 08-22-2007 [eluser]eljunior[/eluser] in the Calendaring Class page , on the section Showing Next/Previous Month Links the $prefs array is being passed as an argument to $this->calendar->generate() method instead of to $this->load->library(). this confused me when trying to reproduce the results described, until i figured out what was going on. (by the way, am i posting this in the right place?) a small mistake in documentation... - El Forum - 08-22-2007 [eluser]Derek Allard[/eluser] Hey eljunior, welcome to CodeIgniter. Yes, this is absolutely the right place to post. That said, I don't believe this is an error. generate() can take three arguments. The first is the year, the second the month, and the third is any preferences you might want, so in this example it is assuming that the year and month are in the address like this. http://www.example.com/index.php/calendar/2006/11 Would that explain the results you saw? Thanks again for posting, and welcome aboard. a small mistake in documentation... - El Forum - 08-22-2007 [eluser]eljunior[/eluser] thank you for the welcome and answer. ;-) i don't think so. before posting, i tried it and it didn't worked until i passed my array $prefs as the others examples show, in the same page: $this->load->library('calendar', $prefs); but, if it's possible to pass the array of preferences to generate(), do i have to set some option in some place? a small mistake in documentation... - El Forum - 08-22-2007 [eluser]Derek Allard[/eluser] To be honest, I've not used the calendar class, and I'm going on a quick read through the code. If you could create me a sample controller to test with, then I can verify the bug and get it fixed up for you. Could you post the controller you were using? a small mistake in documentation... - El Forum - 08-22-2007 [eluser]eljunior[/eluser] well, i think there is nothing wrong in the code, but in the example in the documentation. here is my code: Code: class Calendar extends Controller { the index method works fine. the doesntwork method doesn't work as expected. ![]() it seems to me it's just the example it's wrong, cause looking in the same page, the other examples pass $prefs when loading the library. am i right? a small mistake in documentation... - El Forum - 08-22-2007 [eluser]Derek Allard[/eluser] Wonderful, I'm a believer! ![]() I've fixed it up in the subversion repository, and it'll be part of the next release of CI. Thanks for your contribution Elias. a small mistake in documentation... - El Forum - 09-05-2007 [eluser]mmirkovic[/eluser] Hi all, I have one too ... so I think it would be OK just to attach it in this topic instead of opening new one. in the very beginning of tutorial --> user_guide/general/urls.html in example of .htaccess file You have line: Code: RewriteRule ^(.*)$ /index.php/$1 [L] but with this You always get 404 page, because of leading / in front of index.php should be like: Code: RewriteRule ^(.*)$ index.php/$1 [L] I had tested this and works for me ... hope it helps. regards, m. a small mistake in documentation... - El Forum - 09-05-2007 [eluser]Derek Allard[/eluser] Thanks mmirkovic. Welcome aboard! |