CodeIgniter Forums
AjaxFw (CJAX) For CodeIgnater 5.0 Stable - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: AjaxFw (CJAX) For CodeIgnater 5.0 Stable (/showthread.php?tid=52950)

Pages: 1 2 3 4 5 6 7 8 9


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-03-2012

[eluser]Ajaxboy[/eluser]
---------------------------------------------------------------------------
|
| There is a new version here: 5.1+
|
| http://ellislab.com/forums/viewthread/224403/
|
|-------------------------------------------------------------------------

AjaxFw 5.0-Stable is available!

The gold version of AjaxFw is now available for download. In the overall very few bugs were found in the last couple of months, and the code over time has proven to be very stable over the years, including two major updates since 3.0.


Proceed to download

https://sourceforge.net/projects/cjax/files/CodeIgnater/

Demos
http://cjax.sourceforge.net/examples/


Plugins
http://sourceforge.net/projects/cjax/files/Plugins/


What's in the outlook?
development of plugins and widgets

<b>Fee free to submit your plugins Ideas</b>.


If you are an experienced developer and want to participate in this project, there is a huge gap open right now to develop plugins, if you have questions just ask - and we can even make changes to base code as long it is beneficial for the overall system.

Plugin Development
Schema_ExamplePlugin_1.1.zip https://sourceforge.net/projects/cjax/files/Plugins/
This plugin includes all available plugin functions/hooks that are natively supported, this example plugin is not a working plugin but rather a sample of all available functions and structure that you can use in your plugins.

There is also basic documentation and plugin API tables: http://cjax.sourceforge.net/examples/plugins.php

Docs
http://cjax.sourceforge.net/docs/
http://codeigniter.com/wiki/Ajax_Framework_For_CodeIgniter

We're happy to have reached this milestone and exciting new stuff may come along in the near future.

Feel free to give it a test drive, and report any issues if you find any.

-cj





AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Simple Focus[/eluser]
Hi and thank you for creating this plugin. Is there any way you can create a working codeigniter installation with this plugin working and post for those of us who cannot seem to follow your instructions? I've spent the last several hours trying to follow your instructions with a fresh copy of codeigniter and nothing works (500 errors on everything-- with and without your htaccess).

Thanks,

Scotty Bollinger


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Ajaxboy[/eluser]
Hello Scott,

Thanks for bringing up your concern,

http://cjax.sourceforge.net/ is a working copy of codeIgnater 2.1.1

This is the test: http://cjax.sourceforge.net/ajax.php?test/test

Please, let me know in what step you are stuck, I can point you in the right direction

-cj


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Ajaxboy[/eluser]
Also you might want to turn on errors on php or look at your apache error log, a 500 error usually means errors are turned off - and the real error is not being shown.

Try adding these two lines, to be able to see the "real" errors:

ini_set('display_errors', 1);
ini_set('log_errors', 1);


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Simple Focus[/eluser]
Thanks so much for the reply. I added those lines and now I get this error:

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in (server path removed)/cjax/core/classes/plugin.class.php on line 641


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Simple Focus[/eluser]
I got it working. I changed the lines of code referenced above from:

Code:
if(method_exists($class, 'autoload')) {
       $class::autoload();
      }
      if(!$ajax->isAjaxRequest()) {
       if(method_exists($class, 'PageAutoload')) {
        $class::PageAutoload();
       }
      } else {
       if(method_exists($class, 'AjaxAutoload')) {
        $class::AjaxAutoload();
       }
      }

to:

Code:
if(method_exists($class, 'autoload')) {
       $class->autoload();
      }
      if(!$ajax->isAjaxRequest()) {
       if(method_exists($class, 'PageAutoload')) {
        $class->PageAutoload();
       }
      } else {
       if(method_exists($class, 'AjaxAutoload')) {
        $class->AjaxAutoload();
       }
      }

and that fixed the problem. Solution found here.

Thanks,

Scotty Bollinger


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-05-2012

[eluser]Ajaxboy[/eluser]
Hello Scott,

Must be the php version, may I ask what version of php you are using?.

'autoload' is designed to be called statically.

$class is a string, and not an object.

As you have it might work but you could face secondary effects.



Instead use:

Code:
call_user_func(array($class,'autoload'));

-cj



AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-06-2012

[eluser]Simple Focus[/eluser]
Thanks again for the reply cj. I was using 5.2.17 but upgraded to 5.3.6 and that fixed the issue


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-06-2012

[eluser]Simple Focus[/eluser]
I have another newbie question. I have an existing Codeigniter installation that I want to use the file upload plugin on. However, the demo requires this code:

Code:
&lt;?php

require_once "ajax.php";

$ajax = ajax();

This conflicts with index.php and throws all kinds of errors. My question is this: How can you integrate the upload plugin into an existing view?

Thanks,

Scotty


AjaxFw (CJAX) For CodeIgnater 5.0 Stable - El Forum - 07-06-2012

[eluser]Ajaxboy[/eluser]
I don't see how it can conflict, there is not index file included in the AjaxFw package.

For an existing installation of CI, just do exactly the same, unzip the plugin and drop it inside the cjax/plugin directory, and that should be all, I think.

Do this in your Controller:

Code:
require_once "ajaxfw.php";

$ajax = ajax();

For Codeignater ajax.php is the file ajaxfw.php, and ajax.php is the integration into CI, as specified in the wiki.