Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
First module class
  • Hi guys. I created the first module. It is filemanager. I use the jquery library and swf upload. Please verify the code and show me any errors that I made. I share my code on http://pastebin.com/bSi95zKt. Filemanager will be working with wysiwyg editor and some inputs.
  • i'm just curious why do you need to define const DS while you could just use const DIRECTORY_SEPARATOR
  • Becouse I need this same slash for all systems. For unix and windows is diferent directory separator.
    Further I have problem with loading upload config. I don't know how set variable to the upload config and get from array.
    My code
    Config::set('upload.path', $this->path->relative());
    

    This will not work. I don't know how to overwrite path variable in config array.
  • keevitaja wrote on Saturday 6th of October 2012:
    i'm just curious why do you need to define const DS while you could just use const DIRECTORY_SEPARATOR
    We're coders, and therefore lazy. Fuel uses DS becaue it is a lot shorter, it also makes sure your code is still readable when a line contains DS in 6 different places...
  • @Potreb, afaik there is no such thing as "upload.path" in the config. If you want to set it, that code works fine. You can get it again using Config::get('upload.path').

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion