CodeIgniter Forums

Full Version: Arabic Hebrew Persian French and Maya Calendar Support in CodeIgniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[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.

El Forum

[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.

El Forum

[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.

El Forum

[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."

El Forum

[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)

El Forum

[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.

El Forum

[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.

El Forum

[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.

El Forum

[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!

El Forum

[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.
Pages: 1 2