• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using FreakAuth for Admin area only

#11
[eluser]carbonnb[/eluser]
Quote:Complicated?

everything is ready to “plug & go”!

I don’t see it as complicated, but as flexible!

So then Dan, do you have an answer to my question? What are the core files required? I want to roll my own UI and not have to customise yours.

#12
[eluser]danfreak[/eluser]
[quote author="carbonnb" date="1194368479"]
So then Dan, do you have an answer to my question? What are the core files required? I want to roll my own UI and not have to customise yours.[/quote]

Well I dunno what you want!

css/img/js are in www/public

If you wanna use captcha: keep www/public/images/captcha
If you wanna use animated flash messages keep www/public/shared/js or grab the js and put them were you want

Keep the libraries the helper and the views/content (all forms and e-mail templates are there)

If you don't wanna use the container tecnique for layout change auth.php or watever to don't use it:
Code:
<?php
/**
* Auth Controller Class
*
* Security controller that provides functionality to handle logins, logout, registration
* and forgotten password requests.  
* It also can verify the logged in status of a user and his permissions.
*
* The class requires the use of the DB_Session and FreakAuth libraries.
*
* @package     FreakAuth_light
* @subpackage  Controllers
* @category    Authentication
* @author      Daniel Vecchiato (danfreak)
* @copyright   Copyright (c) 2007, 4webby.com
* @license        http://www.gnu.org/licenses/lgpl.html
* @link         http://4webby.com/freakAuth
* @version     1.0.x
*
*/

class Auth extends Controller
{    
    /**
     * Initialises the controller
     *
     * @return Auth
     */
    function Auth()
    {
        parent::Controller();
        
        $this->load->library('FAL_front', 'fal_front');
        
        //$this->_container = $this->config->item('FAL_template_dir').'template/container';
    }
    
    // --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    function index()
    {            
        $this->login();    
    }
    
    // --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    function login()
    {            
        $data['login_form'] = $this->fal_front->login();
        $this->load->view('your_view', $data);    
    }

#13
[eluser]danfreak[/eluser]
In the config you can set pretty much everything:

Code:
/*------------------+
260     |  TEMPLATE SETTINGS|
261     +------------------*/
262    
263      /*
264      |------------------------------------------------------
265      |  Directory for FreakAuth_light views assets
266      |------------------------------------------------------
267      |
268      | Where we place our css, images, javascript files
269      | This is handy if you use other templating systems
270      */
271      $config['FAL_assets'] = 'public'; //main assets folder
272      $config['FAL_css'] = 'css';
273      $config['FAL_images'] = 'images';
274      $config['FAL_js'] = 'js';
275      $config['FAL_assets_shared'] = $config['FAL_assets'].'/shared'; //shared assets
276      $config['FAL_assets_front'] = $config['FAL_assets'].'/frontend'; //admin frontend
277      $config['FAL_assets_admin'] = $config['FAL_assets'].'/admin'; //admin backend
278      
279    
280     /*-------------------+
281     |  CAPTCHA SETTINGS  |
282     +-------------------*/
283    
284     /*
285     |-------------------------------------------------------------------------------
286     | Should the visitor input check be case sensitive or not
287     |-------------------------------------------------------------------------------
288     */
289     $config['FAL_captcha_case_sensitive'] = TRUE;
290    
291     /*
292     |-------------------------------------------------------------------------------
293     | What to use in the CAPTCHA string
294     |-------------------------------------------------------------------------------
295     */
296     // upper and lower case (lower case by default)
297     $config['FAL_captcha_upper_lower_case'] = FALSE;
298     $config['FAL_captcha_use_numbers'] = FALSE;
299    
300     // use special characters (if true, use a font that support it)
301     $config['FAL_captcha_use_specials'] = FALSE;
302    
303     $config['FAL_captcha_min'] = 5;      //min captcha length
304     $config['FAL_captcha_max'] = 5;      //max captcha length
305    
306     /*
307     |-------------------------------------------------------------------------------
308     | How to display the CAPTCHA string
309     |-------------------------------------------------------------------------------
310     */
311     $config['FAL_captcha_image_font_size'] = 20;
312     $config['FAL_captcha_image_font_color'] = '33CC33';
313    
314     /*

and

Code:
|------------------------------------------------------
389      |  Directory of your FreakAuth_light templates
390      |------------------------------------------------------
391      |
392      | Relative to the application/view folder.
393      | Please add a trailing slash.
394      |
395      */
396      $config['FAL_template_dir'] = 'FreakAuth_light/';
397    
398      // LOGIN
399       // The view to display the login form
400       $config['FAL_login_view'] = $config['FAL_template_dir'].'content/forms/login';
401    
402      // REGISTRATION
403       // view to display the user registration form
404       $config['FAL_register_view'] = $config['FAL_template_dir'].'content/forms/register';
405      
406       // view to display the successful registration information
407       $config['FAL_register_success_view'] = $config['FAL_template_dir'].'content/register_success';
408      
409       // view to display the successful activation information
410       $config['FAL_register_activation_success_view'] = $config['FAL_template_dir'].'content/activation_success';
411      
412       // view to display the failed activation information
413       $config['FAL_register_activation_failed_view'] = $config['FAL_template_dir'].'content/activation_failed';
414    
415      // FORGOTTEN PASSWORD
416       // view to display the forgotten password form
417       $config['FAL_forgotten_password_view'] = $config['FAL_template_dir'].'content/forms/forgotten_password';
418      
419       // view to display the successful forgotten password request
420       $config['FAL_forgotten_password_success_view'] = $config['FAL_template_dir'].'content/forgotten_password_success';
421      
422       // view to display the successful forgotten password reset
423       $config['FAL_forgotten_password_reset_success_view'] = $config['FAL_template_dir'].'content/forgotten_password_reset_success';
424      
425       // view to display the failed forgotten password reset
426       $config['FAL_forgotten_password_reset_failed_view'] = $config['FAL_template_dir'].'content/forgotten_password_reset_failed';
427    
428      // CHANGE PASSWORD
429       // view to display the forgotten password form
430       $config['FAL_change_password_view'] = $config['FAL_template_dir'].'content/forms/change_password';
431      
432      // CAPTCHA VIEW
433       $config['FAL_captcha_img_tag_view'] = $config['FAL_template_dir'].'content/forms/html_for_captcha';
434      
435      // ERROR DELIMITERS
436       //Opening tag for the validation error messages
437       $config['FAL_error_delimiter_open'] = '<div class="error">';
438      
439       //closing tag for the validation error messages
440       $config['FAL_error_delimiter_close'] = '</div>';

and more: look here.

From now please post in the FAL forum thread.

Dan

#14
[eluser]llbbl[/eluser]
posting your code in here isn't helpful ><

#15
[eluser]Michael Wales[/eluser]
ErkanaAuth

The code for what you want to do is already laid out in that post as well.

Note: Not meaning to hijack a FreakAuth post, but he asked for other options.

#16
[eluser]llbbl[/eluser]
Cool, I might have to borrow your "roles" code for mine. Smile

#17
[eluser]CI Lee[/eluser]
@walesmd

Tisk Tisk... JACKER!

Seriously though, think ErkanaAuth would work with our sessions issue on the Story site?

-Lee

#18
[eluser]carbonnb[/eluser]
[quote author="walesmd" date="1194400458"]ErkanaAuth

The code for what you want to do is already laid out in that post as well.
[/quote]

Thanks. This works perfect and was quick and painless (well except for the fact I can't type table names correctly when creating them :red: ) to set up.

I've been trying various auth projects and this was by far the easiest to incorporate and the first at I could get working and it took the least amount of time. Now all I need ot do is get the rest of my site working.

Thanks,
Bryan

#19
[eluser]sito[/eluser]
Hi,

Is there an updated link to ErkanaAuth?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.