• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FreakAuth light 1.1 released

#31
[eluser]danfreak[/eluser]
@Jamongkad

If you use mode_rewrite you .htaccess file should look like the following

Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|public|fonts|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Dan

#32
[eluser]danfreak[/eluser]
[quote author="See64" date="1185734334"]I have short question about FreakAuth's otutgoing mails. FreakAuth seems to automatically add "<" and ">" around the email address. This is ALSO done by CodeIgniter's default email library. This gives me the following error:

SMTP server response: 554 5.7.1 Sender address format `<<[email protected]>>' not RFC-compliant

And just I can't find where FreakAuth is adding this! Can anybody help?[/quote]

No idea, I tested FAL 1.1 with last CI 1.5.4 and everything worked fine.

#33
[eluser]danfreak[/eluser]
[quote author="maesk" date="1185736116"]Hi guys

I think FreakAuth is an excellent addition to CodeIgniter and it saved me a lot of time. It's really quite easy to install, use and adapt. What I didn't achieve is to display the login form in my content div of one of my views. Is this possible? If I have a particular page that should be secured I want to show the login form on this page in the content div so that it shows the header, navigation and all. Now I just adapted the templates so that everything shows adapted to my design, except for the navigation. If it's not possible, it's not a big problem either. The backend of FreakAuth is also very useful and makes a good starting point for a cms backend.

So thanks a lot for your work. I donated 10 Euro, it's not much but better than nothing.

Cheers
maesk[/quote]

Cheers Maesk for the donation by me and Chris (aka grahack - he is in holydays now so don't blame him for low activity in the forum!).

About your question:

You have 2 ways:

a) use the helper function displayLoginForm() in your view

b) this is better in my opinion, use the fal_front method in your controller.

Code:
&lt;?php

class YourController extends Controller
{    
    /**
     * Initialises the controller
     *
     */
    function YourController()
    {
        parent::Controller();
        
        $this->load->library('FAL_front', 'fal_front');
        
        $this->_container = $this->config->item('FAL_template_dir').'template/YOURcontainer';
    }
    
    // --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    function index()
    {            
        $this->login();    
    }
    
    // --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    function login() //you can change the action name
    {            
        $data['fal'] = $this->fal_front->login();
        $this->load->view($this->_container, $data);    
    }

Speaking about method b) take as example the auth.php controller and read this tutorial:

- I don't like that "auth.php" controller!

Hope this helps!

Dan

#34
[eluser]Jamongkad[/eluser]
@DanFreak

Thanks I already fixed my "image" problem. Oh I was reading up on your Custom Userprofile part two and I seem to run into a snag. Most particularly the "view.php"
Code:
Userprofile for user
A PHP Error was encountered
Severity: Notice

Message: Undefined variable: user

Filename: app/view.php

Line Number: 1


A PHP Error was encountered
Severity: Notice

Message: Undefined variable: user

Filename: app/view.php

Line Number: 3

EDIT

username:
A PHP Error was encountered
Severity: Notice

Message: Undefined variable: user

Filename: app/view.php

Line Number: 6

e-mail:
A PHP Error was encountered
Severity: Notice

Message: Undefined variable: user

Filename: app/view.php

Line Number: 7

no data in DB: please add them

Now as far as I can tell PHP is telling me it can't place the data into the variables cuz there's no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the database for this? cuz I tried doing that to no avail...

#35
[eluser]danfreak[/eluser]
[quote author="Jamongkad" date="1185915018"]@DanFreak

Now as far as I can tell PHP is telling me it can't place the data into the variables cuz there's no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the data for this? cuz I tried doing that to no avail...[/quote]

PHP is simply telling you that you didn't pass data to the view for the variable $user.

do you have data in your DB?

Dan

#36
[eluser]Jamongkad[/eluser]
[quote author="danfreak" date="1185915353"][quote author="Jamongkad" date="1185915018"]@DanFreak

Now as far as I can tell PHP is telling me it can't place the data into the variables cuz there's no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the data for this? cuz I tried doing that to no avail...[/quote]

PHP is simply telling you that you didn't pass data to the view for the variable $user.

do you have data in your DB?

Dan[/quote]

Thanks I already solved the problem. The array $data was conflicting with my custom template system. Your original code had the the $data array already covered, incidentally my template system uses $data as well. PHP couldn't tell the difference! so I had to refactor your code in order for it to work on my end hahaha.

Nice fast feedback I love the way you guys handle this keep up the good work!

#37
[eluser]maesk[/eluser]
Thanks Dan!

Since my application is running pretty well now and already tested I don't want to change all my controllers now, and besides: I DO like that auth.php controller ;-)
But it's good to know how it can be done and I will do it with method b) for my next application.
I'm still very pleased with FAL!

maesk

#38
[eluser]danfreak[/eluser]
I'm happy you guys like FAL (= mine and grahack sweat)!

;-)

@Jamongkad

cool, so we know that the userprofile tutorial still works for FAL 1.1

@maesk

Super! so next time you have multiple solutions!

Have a nice evening guys!

Dan

#39
[eluser]Jamongkad[/eluser]
@DanFreak

Since we're in the process of fine tuning Fal I would like to introduce another niggle hehe. Once I got the myaccount/edit controler/method working. CI seems to spout out a strange but interesting error.

Code:
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\myswebsite\system\libraries\Profiler.php on line 169

Upon inspection of this of Profiler.php line 169
Code:
line 168://$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key."]&nbsp;&nbsp;</td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>".htmlspecialchars(stripslashes($val))."</td></tr>\n";

line 169:$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key."]  </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";

It seems line 168 was commented out to make room for line 169. So as an experiment decided to comment out line 169 as well and lo and behold it worked! but there was this weird benchmark result that comes out of the bottom of the edit form..

please click on link below(sorry I don't know how does this forum display images).
[Image: error.jpg]

#40
[eluser]danfreak[/eluser]
@Jamongkad

This is a CI problem. I'm aware about a Profiler problem in CI 1.5.3, not sure about CI 1.5.4.

Report it to the CI guys.

Dan


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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