Part of the EllisLab Network
   
9 of 26
9
FreakAuth light 1.0.4 released
Posted: 23 May 2007 06:10 AM   [ Ignore ]   [ # 81 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

Ok, Now it is for a register form enhancement.

I have a little problem with the register form template.

as you certainly know there is two differents cases for the form buttons statements and actions, depending of the ‘FAL_terms_of_service_message’ content.

The problem is into the case when ‘FAL_terms_of_service_message’==’‘:
we don’t set any js action to the cancel button and it is a standard button (‘type’=>‘button’) so the button have no effet?????

There is two solution:
1) in this case we have to use a cancel button so the action will be only to clear the form content.
2) we use the confirmDecline()js function in the both cases may be with an other config message.

an other thing about the confirmDecline()js function:
I think it is not a good thing to redirect to : base_url() because it doesn’t contain the index php file and if we use two sub applications into the app folder we need two differents index php files and here it we will have unexpected result….
The minimum would be to use site_url();

And I think that the better would be to use a new config URI value…..

But we also could transform the both cancel button into reel form cancel button that simply clear the form?????

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

Ok i’m always at work.

I have made some new test into the FAL_front file.
I have found a little thing in the activation() method.

It doesn’t work if your auth.php controller is into a subfolder.
It is because you fix the positions of the ‘id’ and ‘activation_code’ into the segments_array respectivaly at 3 and 4.
With a controller into a folder that should be 4 and 5….

So I have added a little condition:

$id_ind=(str_replace("/","",$this->CI->uri->router->fetch_directory()) != "")? 4:3;            
        
if (
$this->CI->freakauth_light->activation($this->CI->uri->segment($id_ind, 0), $this->CI->uri->segment($id_ind+1, '')))
{
      
//........
Profile
 
 
Posted: 23 May 2007 09:35 AM   [ Ignore ]   [ # 83 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
Joined  02-21-2007

Nice, but could be improved: what if the controller is in a subsubfolder?

Maybe we could process this uri->router->fetch_directory() to know at which level we are, and add the number of levels to the base segment number: 3

Could you try this for us?

+ I didn’t know about this uri->router->fetch_directory(), thanks

edit: we have some other similar harcoded segments in admin/admins (l.108 & l.320), in admin/users (l.107 & l.165 & l.333) and in FAL_front (l.325 & l.430)

Profile
 
 
Posted: 23 May 2007 10:23 AM   [ Ignore ]   [ # 84 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
Joined  02-21-2007
thomasantony - 18 May 2007 08:48 PM

  The first time I ran the console, I got a PHP Notice saying the ‘rules’ index was not defined on line 247 of admin/users.php . This stopped coming after I manually added a user. It does break the app, but it would be nice if it were fixed.

Hi Thomas, I can’t duplicate your bug, could help me by giving some details?
Could you try to reproduce it on a fresh CI and FAL install ?

Thanks

Profile
 
 
Posted: 23 May 2007 10:50 AM   [ Ignore ]   [ # 85 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

Nice, but could be improved: what if the controller is in a subsubfolder?

I don’t understand this question translate it into french????

Maybe we could process this uri->router->fetch_directory() to know at which level we are, and add the number of levels to the base segment number: 3

I think it is what i have done????

I search if there is a directory in the segments and select cases, I fix the base segment (id) at 3 or 4 and I take the activation_code at base segment + 1

+ I didn’t know about this uri->router->fetch_directory(), thanks

The CI router class parse the requested URI to defin the directory the class and the method and redirect the request to the right file and function…
it give us 3 public method:

uri->router->fetch_directory()
uri->router->fetch_class()
uri->router->fetch_method()

(if the class and method are missing in the requested URI the parser add the default one here)

fetch_directory() function have a little particularity it return the directory.’/’
and some time when ther is no directory it return ‘/’ so it is wy I use str_replace()

edit: we have some other similar harcoded segments in admin/admins (l.108 & l.320), in admin/users (l.107 & l.165 & l.333) and in FAL_front (l.325 & l.430)

About the other harcoded segments:
I am in test on freak And I will test All the code because I have to use it into some particular circonstance. First I Clean it of all freak_template view except the
the content and email one.And I have rewrite the auth controller for basic output of the page (without template System).it is because I use a personnal app librairie that include a layout system and some particularity about URI….


As you can see I my previous post I have start to control the FAL_front code because I have start by the rewriting of the auth controller.
From now I have tested the login,lougout, register and activation actions into FAL_front and Freakauth_light lib.
I will continue with the forgotten and change password action and then I will do the same on the Admin code…...
so the line 325 is the one I have corrected And the line 430 into the forgotten_password_reset() function can use exactly the same solution…..

For the others I will have to look at it when I will work on admin code….

For the moment I post only my change that are bugs or little problems and when I will have finished I’ll give you my other request…..

So I go on FAL_front password code

see you soon

Profile
 
 
Posted: 23 May 2007 11:12 AM   [ Ignore ]   [ # 86 ]  
Grad Student
Rank
Total Posts:  60
Joined  04-21-2007

Now that I found the reason for the captcha problem, I will be starting over again from the beginning with the latest version of FA.

I have not read through the documentation on custom user fields, but I will need support for custom user types with different records attached to each kind of user. I call this “extended user information” and have implemented this before in a non-systematic way outside of a framework.

This is like YouTube where a user can register as a Musician or other entity than just a plain user. A musician can create and display a schedule of performances, for example. This is more than adding a few fields to a user profile. Fortunately, I only need one kind of special user with extended data. The user must be able to modify this information and use the special tools available in their “my site” or personalized account area. This is like logging into YouTube and adding a performance to a schedule or sending out a bulletin to your friends.

How developed is FA when when it comes to supporting this kind of feature? What would need to be added to support it? If I code it, I would give the code back, but I’m not sure where to start (I know, I need to get up to speed on FA).

Steve

Profile
 
 
Posted: 23 May 2007 11:31 AM   [ Ignore ]   [ # 87 ]  
Lab Assistant
RankRank
Total Posts:  233
Joined  04-03-2007
-sek - 23 May 2007 11:12 AM

How developed is FA when when it comes to supporting this kind of feature? What would need to be added to support it? If I code it, I would give the code back, but I’m not sure where to start (I know, I need to get up to speed on FA).

Steve

I think this is where it would be beneficial for the FreakAuth team to provide the elusive “how to extend FreakAuth” guide/tutorial.  Not that we wouldn’t know how to extend a library so much as giving “suggested practices” for extending the library so the extensions could be best given back to the community.  At the same time the “road map” would be beneficial so someone isn’t extending where the FreakAuth team already has something planned.
Some people like the user login light, some want special features.  So it’s hard to please all.  But maybe through extensions people can pick and choose what features they want easier.
Of course, who better to bounce ideas off of or get input from on how to implement an extension of the library.
The FreakAuth team does a helluva job keeping up with the forum and making improvements so I can appreciate it to be hard to get around to the “docs”.  But this might be an area where you can help us (CI Community) help you (FreakAuth).  Of course, I could be wrong, in which case take me out back and beat the tar out of me.  grrr

Profile
 
 
Posted: 23 May 2007 11:36 AM   [ Ignore ]   [ # 88 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006

@-sek
about your “circumstantiated” user-profiles, I’ll thinnk about it.
My suggestion is to start to play around with FAL_1.04 but hopefully by the end of the week we will release next version including the improvements suggested in this thread!

@thierryREY
cheers for the monitoring and contributions

@a&w
I’ll do my best to improve the docs and post the tutorial about extensions
I have some ideas, but at present they are a bit classic: namely extend the classes in order to overwrite the method you want to customise. In this way you won’t get crazy with future FAL upgrading.
any modular idea about extensions is welcome
I posted the roadmap yesterday here.
Follow news&tutorial;updates on the RSS channel

 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: 23 May 2007 11:43 AM   [ Ignore ]   [ # 89 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
Joined  02-21-2007
thierryREY - 23 May 2007 10:50 AM

Nice, but could be improved: what if the controller is in a subsubfolder?

I don’t understand this question translate it into french????

well, I had a big idea that doesn’t seem to be possible with ci:
a controller in a sub-sub-folder (maybe useless)
/controllers/folder_level_1/folder_level_2/ctrler.php

I just wanted to handle this, but I didn’t manage to make a controller work in a sub-sub-folder

Maybe we could process this uri->router->fetch_directory() to know at which level we are, and add the number of levels to the base segment number: 3

I think it is what i have done????

I search if there is a directory in the segments and select cases, I fix the base segment (id) at 3 or 4 and I take the activation_code at base segment + 1

it was about 3 or 4 or 5, according to the folder level, and the activation_code at base segment + 1

First I clean it of all freak_template view except the
the content and email one.

what do you mean “clean it…”

forgotten_password_reset() function can use exactly the same solution…..
For the others I will have to look at it when I will work on admin code….
For the moment I post only my change that are bugs or little problems and when I will have finished I’ll give you my other request…..

fine, ok, we’ll be patient…......
from both sides…..

Profile
 
 
Posted: 23 May 2007 01:20 PM   [ Ignore ]   [ # 90 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

@gahack
well, I had a big idea that doesn’t seem to be possible with ci:
a controller in a sub-sub-folder (maybe useless)
/controllers/folder_level_1/folder_level_2/ctrler.php

I confirm ,I have made many test and work on CI URI and Router class to fix a CI bug into the route with controller in subfolder.
Bug when using route with subfolder in it ????

With the CI current logic of routing to the controller and method it is already difficult to work with one subfolder.

Profile
 
 
   
9 of 26
9
 
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 721, on January 06, 2010 09:38 AM
Total Registered Members: 114897 Total Logged-in Users: 36
Total Topics: 122389 Total Anonymous Users: 3
Total Replies: 647053 Total Guests: 367
Total Posts: 769442    
Members ( View Memberlist )