Part of the EllisLab Network
   
17 of 36
17
FreakAuth_light authentication library/admin application released!
Posted: 27 February 2007 03:41 AM   [ Ignore ]   [ # 241 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
Iksander - 26 February 2007 10:05 PM

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.

 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: 27 February 2007 05:40 AM   [ Ignore ]   [ # 242 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
Joined  02-21-2007

Hi guys,
I did a big set of changes in my copy of FAL to correct typos, to enhance a bit or correct small bugs.

xxx

edit: There was a time when those three ‘x’ were links to my suggestions. My bad for publishing a personal release. I contacted Dan personally.

Profile
 
 
Posted: 27 February 2007 05:56 AM   [ Ignore ]   [ # 243 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

Hey guys just wanted to drop a couple of lines.

1) I started this forum thread in order to share views about FAL, bugs, suggestions etc.
2) Sometime when asking for contribution etc I didn’t got answers (this doesn’t apply to everybody) and neither code.
3) I asked if somebody wanna team up for FAL maintainance, and I got no answer.
4) I think it’s fair an probably convenient to keep FAL releases compact right in one place
5) FAL has been released under the LGPL license

It makes me just think a bit about the style used to suggest releases/patches etc without even contacting me.

If you are not happy about FAL just drop a line, in order to let me know, and I’ll drop my contribution on it and I’ll carry on fully dedicating myself on all other things I have to do.

Cheers

PS: when I started working on FAL library I contacted Jaapio, asked him his view about implementing his library and permission. It’s a matter of “style”

 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: 27 February 2007 06:41 AM   [ Ignore ]   [ # 244 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  02-06-2007

hey dan smile

<div id="info">
        <
ul class="menu lefted">
                <
li><?=anchor('', 'Home')?></li>
                <
li><?=anchor('news', 'News')?></li>
                
                
<?php if($this->authsis->belongsToGroup() == False)
                
{?>
                
<li><?=anchor('user', 'Login')?></li>
                <
li><?=anchor('register', 'Register')?></li>
                
<?php
                }
                
if($this->authsis->isValidUser() == TRUE)
                
{?>
                
<li><?=anchor('user/profile', 'Profile')?></li>
                <
li><?=anchor('user/logout', 'Logout')?></li>
                
<?php
                }?>
                
                
<li><?=anchor('', 'blable')?></li>                
        </
ul>
    </
div>

this doesn’t work :S i didn’t modify the functions so i don’t need to post them here
what did i do wrong?

Profile
 
 
Posted: 27 February 2007 06:44 AM   [ Ignore ]   [ # 245 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
Joined  02-21-2007
danfreak - 27 February 2007 05:56 AM

Hey guys just wanted to drop a couple of lines.

1) I started this forum thread in order to share views about FAL, bugs, suggestions etc.
2) Sometime when asking for contribution etc I didn’t got answers (this doesn’t apply to everybody) and neither code.
3) I asked if somebody wanna team up for FAL maintainance, and I got no answer.
4) I think it’s fair an probably convenient to keep FAL releases compact right in one place
5) FAL has been released under the LGPL license

It makes me just think a bit about the style used to suggest releases/patches etc without even contacting me.

If you are not happy about FAL just drop a line, in order to let me know, and I’ll drop my contribution on it and I’ll carry on fully dedicating myself on all other things I have to do.

PS: when I started working on FAL library I contacted Jaapio, asked him his view about implementing his library and permission. It’s a matter of “style”

Sorry about my style, I’m a bit new to all this kind of stuff.
answer to 4) : I was not aware that this could be a release, I just wanted to show those several people who are involved in FAL my minor suggestions.
answer to 5) : ok, I’m not under 2b conditions (You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.). Again just wanted to show and not to release.

I edited my post and removed the links.

Sorry about this mess, I thought you would be glad to have suggestions WITH the implementation. I should have send it to you personnaly. All changes are minor, I thought it would be ok.

Confused Grahack.

Profile
 
 
Posted: 27 February 2007 07:03 AM   [ Ignore ]   [ # 246 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

@grahack

No problem man, just wanted to make clear a couple of things, given the great amount of time&energies I dedicated to this project.

I think I’ve always been open to suggestions, and I made several changes to accomplish them.

As you might understand, I gave my first priority to functionality, and not to HTML/CSS compliance, comment typos etc.  But time is mature to solve even those stuff.
Please send me your corrected package and we can do a release with your corrections + other stuff.

Dan

PS: to contact me you can just send me an e-mail or PM here.

 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: 27 February 2007 07:08 AM   [ Ignore ]   [ # 247 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
wemago - 27 February 2007 06:41 AM

hey dan smile

...

this doesn’t work :S i didn’t modify the functions so i don’t need to post them here
what did i do wrong?

You must use helpers in your views: CHECK OUT THE EXAMPLE I GAVE YOU IN the PREVIOUS PAGE

Use the functions in application/helpers/freakauth_light_helper.php

 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: 27 February 2007 08:05 AM   [ Ignore ]   [ # 248 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  02-06-2007

ok its a stupid question but

how are u doing

if(belongsToGroup())

in a view?

shouldnt be something like this?

if($this->libraryName->belongsToGroup())

regarding the menu u were right, i found the error, I’m using another way of doing layouts,
that’s why i was getting an error, thanx for the help anyway wink

Profile
 
 
Posted: 27 February 2007 08:14 AM   [ Ignore ]   [ # 249 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
wemago - 27 February 2007 08:05 AM

ok its a stupid question but


if(belongsToGroup())


HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS

This is not specific of FAL, but of CI in general.

Did you see the code I posted yesterday?!?!?!?!?!?!

The above solution is right.

Of course you need to have the helper function coded properly (given that I saw that you even hacked the library name.).

PS: if you hacked FAL, don’t then compline if the answers I give you don’t work in your hacked installation.

 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: 27 February 2007 08:19 AM   [ Ignore ]   [ # 250 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  02-06-2007
danfreak - 27 February 2007 08:14 AM
wemago - 27 February 2007 08:05 AM

ok its a stupid question but


if(belongsToGroup())


HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS-HELPERS

This is not specific of FAL, but of CI in general.

Did you see the code I posted yesterday?!?!?!?!?!?!

The above solution is right.

Of course you need to have the helper function coded properly (given that I saw that you even hacked the library name.).

PS: if you hacked FAL, don’t then compline if the answers I give you don’t work in your hacked installation.

i didnt hack it!!that was just an example, the only thing i changed was the layout view type, you really should work ur bad temper mate :S
i already had said that ur solution was right and i missed an char. the only thing i wanted to know was how u did that, whats the real problem of that??

Profile
 
 
Posted: 27 February 2007 08:20 AM   [ Ignore ]   [ # 251 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

No probs!

Happy it worked out!

tongue wink

 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: 27 February 2007 10:17 AM   [ Ignore ]   [ # 252 ]  
Grad Student
Rank
Total Posts:  96
Joined  01-01-2007

I know I am kind of late to ring in on the subject

Please don’t take away features from this package. All I care about (and most care about) is resource consumption. NOONE cares about size if it has no effect on speed. With your typical low-end shared host having a minimum of 200 GB the last thing people care about is a few KB. Whatare you thinking!

This is the same as codeigniter. It isn’t really meant to be “light” size wise. If that is all that they wanted was to make an extremely small MVC with no extra features than they would have made it a few KB and made it like many other crappy homemade “super-light” MVCs.

SO please stop. What do you care about a few extra KB! Heck if codeigniter was 1 GB and still the same speed I would still use it.

It’s all about resource consumption!

 Signature 

Arguing on the Internet is like running in the Special Olympics, even if you win you’re still retarded

Development Server (my laptop) WAMPP | CI 1.5.1 | Rapyd |

Server: UNIX | PHP 5 | Mysql 5 | Postgres

Profile
 
 
Posted: 27 February 2007 11:03 AM   [ Ignore ]   [ # 253 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

This thread has gotten confusing… lol

Regarding joint maintenance - I have been thinking of doing a number of Optimization runs through FAL code - and a few features, and was planning on doing that come the completion of a project for my current client.

(re-working some code, abstracting more, encrypted XML config files etc…)

Instead of releasing as seperate, Dan - would you be interested in collaborating?

Profile
 
 
Posted: 27 February 2007 11:19 AM   [ Ignore ]   [ # 254 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
Iksander - 27 February 2007 11:03 AM

Instead of releasing as seperate, Dan - would you be interested in collaborating?

Sure!
I’ll also look at grahack contributions.
We shuold just try to syncronize ourself.

cool smile

Dan

@aceofspades

Don’t worry mate: we won’t take features off!

Well my phylosopy in developing FAL is:
1) It’s important that the library is accessible and understandable even to people that just started palying around with CI: experienced coders can easily understand/hack it thanks… to their experience

2) For end users it’s faster to delete files… than to code them

3) It should be as pluggable as possible, and above all secure

Cheers for sharing your opinion.

 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: 27 February 2007 04:50 PM   [ Ignore ]   [ # 255 ]  
Summer Student
Total Posts:  6
Joined  02-26-2007

Nice looking app, although ive not had much chance to play with it yet.

Just a quick question before i get ready for bed tho, what can and cant i do in terms of layout and a bit of modding with this code?
I know theres stuff in the license, but theres SO much to read lol.

    * Can i change the layout as much as i like?
    * Is there an obligation to keep the footer displaying your company?
    * Do i have to point to the freakauth website somewhere on every page?

Im sure you get the jist of what im after, and dont get me wrong im not trying to hide that i’d be using your code, because i’d put a link somewhere, but i would just like to know where we stand when using your app.

Gareth

Profile
 
 
   
17 of 36
17
 
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: 66409 Total Logged-in Users: 26
Total Topics: 84746 Total Anonymous Users: 0
Total Replies: 454805 Total Guests: 229
Total Posts: 539551    
Members ( View Memberlist )
Newest Members:  captainredmuffquinodligtharttechsivamDjordjesammozzazodman23mbsaarchaicharibok