0

I am currently building a user admin area for my site that would require file management. I came across extplorer and ajaxplorer as tools i would like to experiment with. I just have some issues trying to integrate this within a controller or mesh it with the codeigniter template library. this needs to be inside a region within the template, if you are unsure what ajaxplorer or extploror is then please advise a way to integrate a similar application like zen cart etc. for reference... just a pointer in the right direction will be acceptable... thanks

Michal
  • 15,429
  • 10
  • 73
  • 104
Edhen
  • 345
  • 4
  • 15
  • what kind of integration you want ? – safarov Mar 27 '12 at 08:51
  • like... say i want a file manager within code igniter just so i can easily make security checks from a core controller prior to loading the manager then i could pass through variables and objects to the application and make adjustments on the core off the file manager application. the file managers are php-javascript based, im just unsure how to get it too load within a view/controller without breaking the application. – Edhen Mar 27 '12 at 08:55
  • so if i was to goto http://localhost/codeigniter/admin/filemanager then i would expect to load the template and within a region off the template i would like somepath/to/extplorer/index.php to load cleanly with all its dependencies. require somepath/to/extplorer/index.php within a view did not seem to work too well – Edhen Mar 27 '12 at 08:58
  • You can simply use `include()` in your controller but if you want to use codeigniter classes inside or templating, you must do it manually – safarov Mar 27 '12 at 09:03
  • i simply did require('../path/to/extplorer/index.php') from the controller and i tried from a view aswell. ajaxplorer startup page loaded fine but for some reason it would not do anything (blank page) after processing the "installation". but within the startup page i tested some code to make sure CI's objects & functions would be processed and they were. I also thought off using a frame but this wouldn't allow accessing CI's objects etc. – Edhen Mar 27 '12 at 09:11

2 Answers2

1

After a bit off digging around, I found that requiring from within a view the applications index.php works ok. The problem actually lies with the way that any sources within the document would point to (CIRoot)/index.php and not the actual applications path. to overcome this, I inserted <base href="http://localhost/(path to ajaxplorer)" target="_blank" /> to the head tag off any html outputs making all sources relative to that path.

Edhen
  • 345
  • 4
  • 15
0

I'm not familiar with either ajaxplorer or extplorer, but I figured I'd give it a stab in the dark:

Perhaps you could write a wrapper object that wraps around the ajaxplorer/extplorer class/object/script, which would provide a non-conflicting interface to load and access those resources?

Then you could potentially access it by loading it as a CI "Library"?? Good luck!

hypervisor666
  • 1,275
  • 1
  • 9
  • 17