Sure - if you use a similar view embedding pattern that Rick gave an example of - you should be able to simple change the ‘container’ that the auth.php file calls for _login, register, etc… to your own sites container view and load the individual content page which is completely seperate from the body of FAL’s container views - and then simply give the content view its own pseudo classes or id’s.
The only thing is - it takes some time to sift through the code and insert your own stuff…
If you want my code examples, I can give them - I just figured giving a basic description would be quicker for you than not, is it isn’t the case - tell me so and I will upload my own examples…
Iksander way is THE WAY!
If you just need to customise views, you modify:
- the css file in public/css/style.css
- modify the general layout appearance controlled by the files in views/FreakAuth_light/template/
- haader.php
- footer.php
- content.php
- the content file: just clean it to get what follows:
<div id="browse_crag">
<div class="login">
<?=loginAnchor();?>
</div>
</div>
<div id="mainContent">
<!--STAR FLASH MESSAGE-->
<?php
$flash=$this->db_session->flashdata('flashMessage');
if (isset($flash) AND $flash!='')
{?>
<div id="flashMessage" style="display:none;">
<?=$flash?>
</div>
<?php }?>
<!--END FLASH-->
<!--START INCLUDED CONTENT-->
<?php isset($page) ? $this->load->view($page) : null;?>
<!--END INCLUDED CONTENT-->
Then in your controllers do this:
...
//this assignes the content of the view to a variable that get passed to the container instead of outputing it straight away
$data['page']= $this->load->view('your_content_view', $data, TRUE);
...
$this->load->view($this->config->item('FAL_template_dir').'template/container');
...
- eventually modify the single views in views/FreakAuth_light/content/ if you need to modify the appearance of the login form, registration form etc.
———————————————————————————————————————————————————————————————————-
AN ALTERNATIVE AJAX WAY
is to look for this lines in the auth.php controller (it appears 8 times):
EXAMPLE using the Method register()
$data['page'] = $this->config->item('FAL_register_view');
...
$this->load->view($this->config->item('FAL_template_dir').'template/container');
Change them to
...
$this->load->view($this->config->item('FAL_register_view', $data);
Doing so you will just output the form/message you are interested in and then you can call it in your custom views via AJAX.
In the case you want to use AJAX, I suggest you to duplicate the auth.php controller calling it for example auth_ajax.php. Then modify auth_ajax.php as dscribed just above, and use it for your jax calls. Keeping the auth.php outputing a complete layout (with header, footer etc, and not just the forms) is important for the fixed links contained in the activation e-mail, change password e-mail etc.
If you go the AJAX way using jquery(that is already included in FreakAuth_light), have a look at this thread:
=> CI and Ajax requests with jQuery
or anyway I suggest to use the load method with jquery
I’ll work on the views customisations in next release. Even so it doesn’t look so difficult/time consuming to customise them (even in the actual status), in my opinioin, if you have a minimum knowledge on how views work in CI.
