Welcome Guest, Not a member yet? Register   Sign In
Arabic Hebrew Persian French and Maya Calendar Support in CodeIgniter
#1

[eluser]Kaveh[/eluser]
I have devleoped a multi_calendar library along with several calendars. It can be replace current CI_Calendar class with old code compatibility.

The implementation is simple and not heavy in size. Can it be integrated in CI and replace its current calendar? How should it proceed?

In its default settings it is the default exisiting calendar whitch exists in CI, there is no changes in its code or functionality but it has been extended to support other calendars too.
#2

[eluser]Phil Sturgeon[/eluser]
If you want to fully integrate it just make a Calendar.php fiel and replace the darn thing. The best idea is to try and use the same function names, or simply extend the old one to add your new functions, then its as similar to the old one as possible.
#3

[eluser]Kaveh[/eluser]
I know completely howto integerate it for my project.

As I have developed it with CodeIgniters standards and as it is a good feature in my mind, I want to see if it can be integrated in the main CodeIgniter code and maintained there,

I am seeking ElissLab process to include a code in their framework.
#4

[eluser]sophistry[/eluser]
I (for one) would love to see a new calendar class for CI; the current one is sorely lacking.

You might try to contact Derek Allard who works at EllisLabs.

EDIT: in the meantime, why don't you post it to this thread or to the wiki. I know Derek is going to say something like this: "Please post it to the forums or to the wiki and get people to test it - we won't include untested code."
#5

[eluser]coolamit[/eluser]
yeah, I agree. please post it here or in the wiki(recommended) & let people play with it. if it works for people, then I think EllisLab team might consider it! Smile
(am not connected to EllisLab, so am just putting in my thoughts)
#6

[eluser]Kaveh[/eluser]
There is a page now to describe the new calendar a little more and a zip file which contains all files.
http://codeigniter.com/wiki/Calendar/

I am working to make it more complete but it is for now just completely what the old calendar was with multi-calendar possibility.
#7

[eluser]Derek Allard[/eluser]
Hey. Just wanted to drop in and say that I've seen this thread now. Thanks for your contribution.

I haven't seen the code yet, but sophistry is exactly right in my response (boy I'm getting predictable) Wink

Have you tested in PHP 4 and PHP 5? What about on Apache and IIS? Again, I haven't seen the code, and there may be nothing in there that would affect this, but I still would rather ask.

Thanks again.
#8

[eluser]Kaveh[/eluser]
The code works on both PHP5(5.2) and PHP4(4.4.4), I did checked both on Apache Debian.

As it is only math calculations with /,*,_,-,floor, ceil, .. and I did checked all functions in PHP manual to see if there is any issue with any version of PHP there must be no problem will IIS too.

I have no access to IIS but if it is essential I will check it on that system too.
#9

[eluser]Derek Allard[/eluser]
Thanks again for this contribution, it indeed looks useful. I'm not sure it'll be added to the core (it represents a significant change), but at any rate it expands the possibilities of CI. Thanks!
#10

[eluser]Kaveh[/eluser]
It may be a significant change but it is all old codes compatible,
and it wont change the execution flow much if developer uses default Gregorian calendar. Default calendar is untouched.

All original functions now call a instantiate class method instead like
Code:
function generate($year = '', $month = '', $data = array())

{

    return $this->multi_calendar->generate($year, $month, $data);    
}

So it will call original calendar class method if coder is not using other calendars.

Also I am willing to help to maintain the code if it can help.




Theme © iAndrew 2016 - Forum software by © MyBB