Welcome Guest, Not a member yet? Register   Sign In
Backend Pro for codeigniter 2
#11

[eluser]shinokada[/eluser]
Thanks for this.
A couple of notes.
1. assets/cache directory is needed.
2. There are four places where validation is used in My_Form_validation.php instead of form_validation.
#12

[eluser]Noobigniter[/eluser]
After several editions ... see at bottom
Quote:Thanks.

It's not working for me.

- Folder "assets/cache" is missing during installation. (not really a problem)

After installation process is ok, I get this error on index :
Fatal error: Class 'Public_Controller' not found in application/modules/welcome/controllers/welcome.php on line 25
EDIT: OK, just rename application/core/Public_controller to Public_Controller

EDIT 2 : Hum, now i get this error and the reply of @ayanftw is not working for me: Unable to load the requested file: helpers/auth/khacl_helper.php

Also, in php5, this: function Welcome() do not will it be til like this: function __construct()
?

Ok, I finally managed to install and I finally see the login page backendpro.
To do this, I copied
Code:
application/modules/auth/helpers/khacl_helper.php
to
Code:
application/helpers/auth/khacl_helper.php


Why? I have not watched yet.
Regards.
#13

[eluser]broswilli[/eluser]
Validation was used in two places in the function valid_captcha that would be worked upon and corrected in the next update to correct the recaptcha module
#14

[eluser]shibuyanime[/eluser]
Hello,
I've been trying to build a website using backendpro and for some reason i cant extend base_model in any of the models, the only ones that don't say cannot find class base_model are the models that came with it. any ideas?
#15

[eluser]shinokada[/eluser]
It worked fine in my localhost but did not work in a live server.

If you have the same problem, then the followings are the fixes.

In line42 of application/modules/Userlib.php, change auth/Khacl to auth/khacl
Application/core/Admin_controller.php should be Admin_Controller.php
Application/core/Public_controller.php should be Public_Controller.php
#16

[eluser]shibuyanime[/eluser]
figures, usually is a problem with caps..
thanks!
#17

[eluser]shinokada[/eluser]
Mmmm. Forgot password and Registration don't work. Any idea or fix?
#18

[eluser]shibuyanime[/eluser]
like sending email or page not loading?
#19

[eluser]shinokada[/eluser]
You need to delete application/MY_Parser.php in order to work index.php/auth/forgotten_password.

But callback for form_validation is not working in class Auth_form_processing.
#20

[eluser]shinokada[/eluser]
I tried this but it did not work. So I came up a temporary solution, but there must be a better way to solve this.


1. In modules/auth/language/english/uerlib_lang.php, add these.


Code:
$lang['userlib_email_used'] = 'The email provided is used.';
$lang['userlib_username_used'] = 'The username provided is used.';

2. In modules/auth/libraries/Auth_form_prcessing, swap function register_form($container) to the following.

Code:
/**
  * Register form
  *
  * Display the register form to the user
  *
  * @access public
  * @param string $container View file container
  */
function register_form($container)
{
  if( ! $this->CI->preference->item('allow_user_registration'))
  {
   // If registration is not allowed
   flashMsg('info',$this->CI->lang->line('userlib_registration_denied'));
   redirect('auth/login','location');
  }

  // Setup fields
  $fields['username'] = $this->CI->lang->line('userlib_username');
  $fields['password'] = $this->CI->lang->line('userlib_password');
  $fields['confirm_password'] = $this->CI->lang->line('userlib_confirm_password');
  $fields['email'] = $this->CI->lang->line('userlib_email');
  $fields['recaptcha_response_field'] = $this->CI->lang->line('userlib_captcha');
  $this->CI->form_validation->set_fields($fields);

  // Set Rules
  $config = array(
      array(
              'field'=>'username',
              'label'=>$this->CI->lang->line('userlib_username'),
              'rules'=>"trim|required|max_length[32]|callback_spare_username"
              ),
      array(
              'field'=>'email',
              'label'=>$this->CI->lang->line('userlib_email'),
              'rules'=>"trim|required|max_length[254]|valid_email|callback_spare_email"
              ),
      array(
              'field'=>'password',
              'label'=>$this->CI->lang->line('userlib_password'),
              'rules'=>"trim|required|min_length[".$this->CI->preference->item('min_password_length')."]|matches[confirm_password]"
              )
            );
  if($this->CI->preference->item('use_registration_captcha'))
  {
   $config = array(
       array(
                           'field'=>'recaptcha_response_field',
                           'label'=>$this->CI->lang->line('userlib_captcha'),
                           'rules'=>"trim|required|valid_captcha"
                           )
            );
  }
  $this->CI->form_validation->set_rules($config);

  if ( $this->CI->form_validation->run() == FALSE )
  {
   // Output any errors
   $this->CI->form_validation->output_errors();

   // Display page
   $data['header'] = $this->CI->lang->line('userlib_register');
   $data['captcha'] = ($this->CI->preference->item('use_registration_captcha')?$this->_generate_captcha():'');
   $data['page'] = $this->CI->config->item('backendpro_template_public') . 'form_register';
   $data['module'] = 'auth';
   $this->CI->load->view($container,$data);
  }
  else
  {
   // now CI validation is ok But...
   // since form_validation callback is not working I have to check
   // usename and email here
   $email     =$this->CI->input->post('email');
   $username  =$this->CI->input->post('username');
   if($this->CI->form_validation->spare_email($email))
   {
    // spare_email will return True when email is not used
    // now let's check username here
    if($this->CI->form_validation->spare_username($username))
    {
     // true means username is not used so redirect
     // everything is ok
     // Submit form
     $this->_register();
    }
    else
    {
     // this email exist so redirect with message
     flashMsg('error',$this->CI->lang->line('userlib_username_used'));
     redirect($this->CI->config->item('userlib_action_register'),'location');
    }
   }
   else
   {
    // this email exist so redirect with message
    flashMsg('error',$this->CI->lang->line('userlib_email_used'));
    redirect($this->CI->config->item('userlib_action_register'),'location');
   }
  }
}

3. And don't forget to change all the ->validation-> to ->form_validation-> in application/libraries/MY_Form_validation.



I hope this will help someone.




Theme © iAndrew 2016 - Forum software by © MyBB