Welcome Guest, Not a member yet? Register   Sign In
form, validation, form_validation, form error messages, security, helpers, libraries, AGH!
#1

[eluser]intoitdaily[/eluser]
How do I know when to use what? What's the difference? Do I have to load the libraries and helpers in only the class methods that I want to use them in? Or can I just load it into the class constructor and use it in all the class methods from then on? Why do I see some controllers have $this->load->database() and others don't, but there is no recognizable difference in the application if I take it out? What the heck is the security helper used for? How do I know what combination of these I need to use, and when?


I'm asking these questions because they seem necessary for two projects that I'm working on. All I want is to build two separate codeigniter test sites, but both test sites are only to test two different authentication systems so I can implement them easily in all the other sites I want to build in the future.


The first one is for a content management reporting tool for businesses. Only a handful of employees will be using this app any any given time, and a brand new database and server space will be created for each business independently. There will only be one account/user that can create all other accounts. This will more than likely be the business owner. Meaning, nobody can register. The first (superuser) account will be created manually in the database by me, the developer. And there will be a feature in the superuser's dashboard that allows them to create accounts for his/her employees. Each user will then be able to login and change their password and profile information. Each user will be able to add their own pieces of information, like clients, notes, tasks, etc. And the superuser can see an aggregate of all his/her employees content. Also, this 'superuser' can disable or delete accounts, as well as create them.


The second authentication system will be much like most user-driven websites, with all the standard features. Such as the DX-Auth or ReduxAuth systems (which despite my many attempts, have not been able to properly implement)...
# Basic auth (Login, logout, register, change password).
# Remember me.
# Login using username or email address or both
# Forgot password.
# Ban user.
# Last login IP address and time
# Email activation
# User Profile
# Role based (admin, user, moderator, etc). Inheritance also supported
# Restrict page based on URI and role
# Custom permission for each role
# Login attempts
# Event feature
# Captcha


Can anyone help me find what I need? I hope you guys understand the difference between the two. I'm thinking I could use the full-featured system for my content management reporting tool, only I'd just take out a few features. Please, please help me figure this out. Code igniter was easy for me to do simple stuff, but it's getting real confusing real fast.

I am very familiar with PHP, and I could program both of these systems by hand, but obviously, that would be a ridiculous task for one to complete in just a few days and incredibly tedious. I want to use codeigniter for this, but I have no idea what to use and why... Please help me. Again, I'm not asking how to build a dashboard or aggregate features for an admin user. I can do that on my own... What I need is an authentication system that WORKS. All the ones I download and install have something wrong with them... I can't figure it out and it's getting frustrating.
#2

[eluser]TheFuzzy0ne[/eluser]
[quote author="intoitdaily" date="1241121468"]How do I know when to use what?[/quote]

Reading the [url="http://www.ellislab.com/codeigniter/user-guide/"]user guide[/url] from front to back can help you get a feel for things, as well as watching some tutorials. There are several good tutorials around to get you started, but the user guide combined with this forum is one of the best tools I know of. I've also dedicated a threat to hopefully help with this - http://ellislab.com/forums/viewthread/107773/.

[quote author="intoitdaily" date="1241121468"]What's the difference?[/quote]

See the [url="http://www.ellislab.com/codeigniter/user-guide/"]user guide[/url].

[quote author="intoitdaily" date="1241121468"]Do I have to load the libraries and helpers in only the class methods that I want to use them in? Or can I just load it into the class constructor and use it in all the class methods from then on?[/quote]

You can load libraries and helpers virtually whenever you want once the Loader is instantiated. You can have them [url="http://ellislab.com/codeigniter/user-guide/general/autoloader.html"]load automatically with each request[/url], or you can load them in your controller constructor or in the methods themselves. Whatever suits you're needs.

[quote author="intoitdaily" date="1241121468"]Why do I see some controllers have $this->load->database() and others don't, but there is no recognizable difference in the application if I take it out?[/quote]

Where are you looking? My site loads the database automatically for every request, some folks' sites only need the database for certain pages, and so they load it on demand.

[quote author="intoitdaily" date="1241121468"]What the heck is the security helper used for?[/quote]

Please see the [url="http://www.ellislab.com/codeigniter/user-guide/"]user guide[/url].

[quote author="intoitdaily" date="1241121468"]How do I know what combination of these I need to use, and when?[/quote]

Please see above.

[quote author="intoitdaily" date="1241121468"]I'm asking these questions because they seem necessary for two projects that I'm working on. All I want is to build two separate codeigniter test sites, but both test sites are only to test two different authentication systems so I can implement them easily in all the other sites I want to build in the future.[/quote]


[quote author="intoitdaily" date="1241121468"]The first one is for a content management reporting tool for businesses. Only a handful of employees...

... Please, please help me figure this out. Code igniter was easy for me to do simple stuff, but it's getting real confusing real fast.[/quote]

Sadly, I'm not in the position to comment at this moment in time as my poor brain is finding it difficult to even comprehend the most simple stuff. I don't understand what these two sites have in common. Do they have anything in common?

[quote author="intoitdaily" date="1241121468"]I am very familiar with PHP, and I could program both of these systems by hand, but obviously, that would be a ridiculous task for one to complete in just a few days and incredibly tedious. I want to use codeigniter for this, but I have no idea what to use and why... Please help me. Again, I'm not asking how to build a dashboard or aggregate features for an admin user. I can do that on my own... What I need is an authentication system that WORKS. All the ones I download and install have something wrong with them... I can't figure it out and it's getting frustrating.[/quote]

There are lots available. I'd recommend sticking to one and trying to make it work. It's usually something blatantly obvious that's be missed.




Theme © iAndrew 2016 - Forum software by © MyBB