0

Is it possible to get Tank-Auth working as a package in CodeIgniter?

I installed database schema into my MySQL database and copied all the folders of tank_auth in my app "third_party" folder "[CI]\application\third_party\tank_auth". The Screenshot :

enter image description here

Session works fine.

I can load tank_auth models

$this->load->model('tank_auth/users');

I can load tank_auth views

$this->load->view('auth/login_form');

But i can't access "auth" and "welcome" controllers. My application shows a 404. My log files has no warning or error other that the 404.

Any idea?

Simon

Simmoniz
  • 1,080
  • 15
  • 27
  • Why did you put everything under `third_party`? – David Aug 08 '12 at 21:22
  • I forgot to say that I have set some additionnal autoload. $autoload['packages'] = array(APPPATH.'third_party/tank_auth'); . It makes all folders accessible without having to move each file / folders into CI tree. That used to work for a previous CI project. Looks like it is not appropriate for Tank_auth. – Simmoniz Aug 08 '12 at 22:11

2 Answers2

0

From what I see you are trying to set up a Hierarchical Model-View-Controller (HMVC) within the codeigntier MVC. I do not think this is supported by core codeigniter by itself instead you might need to install Modular extension management. Checkout Modular Extensions (HMVC) for Codeigniter. This allows you to create modules as 'pseudo-controllers' which can access core CI framework classes.

Checkout more at http://getsparks.org/set-up-mx and of course google :)

raidenace
  • 12,789
  • 1
  • 32
  • 35
0

I found out in CI doc why it doesn't work and how to fix it properly : Here (section Application "Packages")

You can put there ressources only, not controllers. I then moved the controllers (auth and welcome) to my CI application/controllers folder. Everything works now.

Simmoniz
  • 1,080
  • 15
  • 27