Hi guys,
I’m new here so <?php echo ‘hello world’; ?> to begin with.
I’m just starting with CI & Tank Auth. I managed to get both working (you’ll tell me it’s not hard but heh!) but I get one issue without any answer from google. This library is cool but I wanted to integrate auth pages with my template so in the controller auth.php I’ve changed this:
(line95)
$this->load->view(‘auth/login_form’, $data);
to this:
$data[‘title’]=‘Login Page’;
$data[‘main_content’]=’./auth/login_form’;
$this->load->view(‘template’, $data);
And then I send it to my view file template.php wich contains my html layout and some php includes as it:
<header>
<?php $this->load->view('includes/header');?>
</header>
<aside>
<?php $this->load->view('includes/aside');?>
</aside>
<div role="main"><?php $this->load->view($main_content);?></div>
<footer>
<?php $this->load->view('includes/footer');?>
</footer>
I’ve updated .htaccess to rewrite the index.php thing with this:
RewriteBase /project/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /project/index.php/$1 [L]
It works perfectly with my custom controllers but when it comes to tank auth it pops up index.php from a magic bag. So what the… ahum, how could it be? Instead of getting clear URI with i.e http://localhost/project/auth/login I get http://localhost/project/index.php/auth/login Grrrr.! Does anyone have an idea on this?
Also (this is bonus part) I’m thinking of putting up some quick login forms on each pages and I seriously don’t understand how to manage it with tank auth. I thought that I would’nt be alone wanting to do this but google didn’t gave me anything. Is someone out there made up a tutorial to integrate tank auth in custom pages?
Thanks guys,
Jinsa.