CodeIgniter Forums
XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - 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: XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter (/showthread.php?tid=10645)

Pages: 1 2 3 4 5 6


XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - El Forum - 06-21-2011

[eluser]malcomhfc[/eluser]
Ok. Ill take a look at them. Thanks Matt.


XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - El Forum - 06-21-2011

[eluser]malcomhfc[/eluser]
would you happen to know why the error messages arnt working? There everywhere and well the alert box just shows error:

Code:
if ($this->form_validation->run() == FALSE)
        {
            
            $error = str_replace('p>','li>',$this->form_validation->error_string);
            if($this->input->post('submit'))
            {
                $this->load->vars(array('errorMessage' => '<span class="alert"><b>'.$this->lang->line('user_controller_9').'</b><ul>'.$error.'</ul></span>'));
            }
            else
            {
                $this->load->vars(array('errorMessage' => ''));
            }



XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - El Forum - 06-21-2011

[eluser]mglinski[/eluser]
v2 of CodeIgniter dropped support for the old validation library. This was the main reason XU was not immediately upgraded to v2 of codeIgniter. All $this->validation calls need to be converted to $this->form_validation calls. The API's for each library are not the same and each one has to be manually converted to the new system. I see you have replaced "$this->validation" with "$this->form_validation" in the above code. This is unfortunately not enough to complete the conversion.
-Matt


XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - El Forum - 06-21-2011

[eluser]malcomhfc[/eluser]
ah right i will replace it, cheers.


XtraUpload v2 - Filehosting fit for Web 2.0, Built on CodeIgniter - El Forum - 06-22-2011

[eluser]mglinski[/eluser]
https://gist.github.com/862e1104c925fe31157c

Here is the custom loader file for v2 of Codeigniter.
Drop this code in: application/core/MY_Loader.php
-Matt