Part of the EllisLab Network
   
8 of 25
8
FreakAuth light 1.0.4 released
Posted: 22 May 2007 02:39 AM   [ Ignore ]   [ # 71 ]  
Summer Student
Total Posts:  13
Joined  05-11-2007
danfreak - 22 May 2007 02:36 AM

@pels
did you validate your css?

I think there are conflicts between Jquery and the other libraries you use in the backend

=> Using jQuery with Other Libraries
=> see these threads in the Jquery forum

Yes i did validate my css.. only some warnings on same colors.

I just added the clean css from fal 0.4 and still no show.

I keep getting the same javascrip error in the console:

Error: $("#flashMessage") has no properties
Source File: http://eple.hib.no/hibiscus/public/js/flash.js
Line: 2

Profile
 
 
Posted: 22 May 2007 02:42 AM   [ Ignore ]   [ # 72 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

@pels
to check if it is a conflic problem,
try to remove all javascript calls from your header apart from jquery.js and flash.js

If it works, it means that the other libraries you use are conflicting.

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 22 May 2007 02:52 AM   [ Ignore ]   [ # 73 ]  
Summer Student
Total Posts:  13
Joined  05-11-2007

I removed some of my other javascript loaded in my header and it worked.. i will try to sort out whats conflicting now.. thanks alot for the help! And very fast answers

Profile
 
 
Posted: 22 May 2007 02:58 AM   [ Ignore ]   [ # 74 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
pels - 22 May 2007 02:52 AM

I removed some of my other javascript loaded in my header and it worked.. i will try to sort out whats conflicting now.. thanks alot for the help! And very fast answers

Your welcome!

You have 2 ways to proceed now:

=> keep both jQuery and the other stuff sorting jQuery out with this suggestions
=> keep just one of the two Javascript framework

in my opinion jQuery is very complete and fast. But it depends on which framework your skills are the best.

If you rewrite the flash.js for Scriptaculous, can you please post it in the forum for people experiencing your problems?

smile

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 22 May 2007 03:56 AM   [ Ignore ]   [ # 75 ]  
Summer Student
Total Posts:  13
Joined  05-11-2007
danfreak - 22 May 2007 02:58 AM
pels - 22 May 2007 02:52 AM

I removed some of my other javascript loaded in my header and it worked.. i will try to sort out whats conflicting now.. thanks alot for the help! And very fast answers

Your welcome!

You have 2 ways to proceed now:

=> keep both jQuery and the other stuff sorting jQuery out with this suggestions
=> keep just one of the two Javascript framework

in my opinion jQuery is very complete and fast. But it depends on which framework your skills are the best.

If you rewrite the flash.js for Scriptaculous, can you please post it in the forum for people experiencing your problems?

smile

I found out that its a conflict with the prototype.js, i tested some solutions from your url.

I changed the flash.js to this and it worked smile

jQuery.noConflict();
jQuery(document).ready(function($) {
    
$("#flashMessage").show("normal",
        function()
        
{
            
$("#flashMessage").fadeOut(10000);
        
}
        
);
});

Profile
 
 
Posted: 22 May 2007 08:02 AM   [ Ignore ]   [ # 76 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

Hi,

I have begin my test on freak 1.0.4 and have a question about the register() function into the FAL_front.php lib.

at line 235 you write

//if activated in config, sets the select country box
            if ($this->CI->config->item('FAL_use_country'))
        
            
//set validation rules
            
$rules['user_name'] = $this->CI->config->item('FAL_user_name_field_validation_register');
            
$rules['password'] = $this->CI->config->item('FAL_user_password_field_validation_register');
            
$rules['password_confirm'] = $this->CI->config->item('FAL_password_required_confirm_validation')."|matches[".'password'."]";
            
$rules['email'] = $this->CI->config->item('FAL_user_email_field_validation_register');

so you test ‘FAL_use_country’ and do nothing special. It could be a problem if the ‘FAL_use_country’ should be false because $rules[’user_name’]should be unset.....

In fact you use this condition again at line 244

//do we also want to know the user country?
        if ($this->CI->config->item('FAL_use_country'))
        
{
            $fields[
'country_id'] = $this->CI->lang->line('FAL_user_country_label');
            
$rules['country_id'] = $this->CI->config->item('FAL_user_country_field_validation_register');
        
}


is this a old remaining code??????

Profile
 
 
Posted: 22 May 2007 09:14 AM   [ Ignore ]   [ # 77 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  489
Joined  02-21-2007
thierryREY - 22 May 2007 08:02 AM

is this a old remaining code??????

yes it is, a big mistake that I did
please remove that line
it will be corrected in 1.0.5, maybe released before the end of the week

merci thierry

EDIT: does this explain the register problem that Crimp had? showing nothing if user_name field was blank?

Crimp, did you turn off the country flag?

Profile
 
 
Posted: 22 May 2007 12:30 PM   [ Ignore ]   [ # 78 ]  
Research Assistant
RankRankRank
Total Posts:  328
Joined  10-02-2006

Yes, turning the country configuration on again ensures that the _error string for user_name returns.

 Signature 

CI version?
From SVN.

Profile
 
 
Posted: 23 May 2007 06:22 AM   [ Ignore ]   [ # 79 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

Hi, it’s me again, for a problem into the FAL_front.php lib

In the login() function when you test if the user authentication is right and so redirect to the entry page, you do two redundant actions.If we correct this problem we will speed up the login process without loosing security....

its at the line 150.

if ($validation_response==TRUE && $this->CI->fal_validation->login_check($username_login, $password_login) && $this->CI->freakauth_light->login())
            
{

in fact into freakauth_light->login()
at line 442 you do:

$query = $this->CI->usermodel->getUserForLogin($username, $password);

and into fal_validation->login_check()
at line 70 and line 93 you do

$query = $this->CI->UserModel->getUserByUsername($username_login);
// and
$query = $this->CI->UserModel->getUserForLogin($username_login , $encrypted_password);


You do 3 database acces where we can have the same result with only 1 database accés.

The reason is that you have added the FAL_validation lib recently and you have thought that it should be better to stay into the validation process to output the ‘wrong user or password’ error message instead to use the flashmessage output by the freakauth_light->login()check and I agree with that.

And the order of the conditions into the FAL_front->login() function :

($validation_response==TRUE && $this->CI->fal_validation->login_check($username_login, $password_login) && $this->CI->freakauth_light->login())

skip the freakauth_light->login() call if the user or password are wrong but not if they are right.
So in the first case we do 2 databses Acces and in the second 3.....

My solution is to use freakauth_light->login() into fal_validation->login_check() and we always use one database access and if we concider that it could be useless to preserve the flashmessage into the freakauth_light->login()we could delete it????

I give you the new >fal_validation->login_check() function (very shorter) :

//Modification
    //function login_check($username_login, $password_login)
    function login_check()
    
{
        
if ($this->CI->freakauth_light->login())
        
{
            
return true;
        
}
        
else
        
{
           
//let's set the message
           
$this->login_error_message = this->_error_prefix.$this->CI->lang->line('FAL_invalid_username_password_message').$this->_error_suffix;
           return
false;
        
}        
    }

And in the FAL_front->login() function line 150 the conditions became:

//modification
//if ($validation_response==TRUE && $this->CI->fal_validation->login_check($username_login, $password_login))
if ($validation_response==TRUE && $this->CI->fal_validation->login_check())

And to finish you can delete the flash message from the freakauth_light->login() function…

That’s all

Profile
 
 
Posted: 23 May 2007 06:54 AM   [ Ignore ]   [ # 80 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  489
Joined  02-21-2007

Thanks Thierry,
we’re quite busy right now, but we’ll study the ‘rules’ problem and your suggestion later.
I thought about refactoring the login thing (since it only works with some immutable keys of the $_POST array), so your suggestion will be interesting…

Profile
 
 
   
8 of 25
8
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 60711 Total Logged-in Users: 25
Total Topics: 73163 Total Anonymous Users: 0
Total Replies: 394598 Total Guests: 353
Total Posts: 467761    
Members ( View Memberlist )