Help starting with Fuel CMS
Hello,
I love coding with codeigniter and I need to develop a web site for a college.
The request is that teachers will be able to write articles and load students tests results.
The manager will be able to upload photos into a gallery.
The students will be able to register on the site and update their details.
I've read your guide and some posts on the forum and I need help understanding what does Fuel cms actually gives me.
So as far as I understand, to build a site like that I need to:
1. Have my own user management system like tank_auth.
2. Create a user on the dashboard that can create the users for the teachers.
3. Create modules for any functionality I need on the site like: The gallery, Writing Articles and uploading tests results. So the users can do it from the front end?
I'm sorry if this post is not totally clear, but I AM a bit confused...
Can anyone help please?
Comments
Tank auth or Ion auth could be used for your front end users, you can create admin users with granular permissions in the CMS.
You can create "simple" modules as per Codeigniter, using the application directory, or if your needs are more sophisticated, create advanced modules inside of the Fuel directory. If you are just starting Fuel, you will find it easier to make progress with the simple module approach, and will probably not need to write advanced modules at all.
Thank you for answering me.
I am still not sure how do I implement tank_auth in the site.
Is there a tutorial for that somewhere?
Or maybe I am getting it all wrong?
If I'll have 3 kinds of users: Students, Teachers and Admin, will all of them have access to the dashboard? So a student for example, that wants to update his profile, needs to go to the dashboard instead of having a profile page on the frontend and update everything there?
Sorry, this is very confusing to me.
You could use the FUEL backend for managing the gallery module and the articles.
I feel embarrassed but I think I just don't understand the concept of fuel.
I read the user guide but I get lost
If we can just start from the beginning.
My site will be called: college.
So, I have a folder called: wamp/www/college
I install Fuel into this folder, so now I will have: wamp/www/college/fuel
Now, if I want to add the tank_auth library, I will add it to:
wamp/www/college/fuel/application/libraries
If I have a student profile page, I will have to create a controller page ? so I can check if the current user is allowed to see this page?
And if the user is a teacher, I will create him as a user on the cms side so he will go to the dashboard?
And then what do I do so the teacher can only create articels on the dashboard?
Do I need to create a module for it and give the teacher user permission only for that?
So the teacher has to go to the dashboard to create an article?
But he can edit it with the inline edit function on the frontend?
Do I learn from this tutorial: Tutorial: Creating Simple Modules
or this one: Creating a Website Tutorial
Am I in the right direction?
Oh dear, very very confused
Your student profile page will need to be managed by a controller, and that controller will need authentication from a library like Tank. Take a look at the files in Tank - the auth controller will show you how a library is loaded
$this->load->library('tank_auth');
and used
if ($this->tank_auth->is_logged_in()) { ... do stuff ... } else { ... do something different... }
I LOVE codeigniter, and hopefully, I will manage to get a hold on things.
I started developing my teacher's module, following the simple module tutorial, which helps me ask more specific questions, and understand more.
I am getting very excited now
Usually there is a topic in this forum that provides inspiration, so keep looking around.
http://adventuresincms.blogspot.co.uk/2012/05/authenticating-pages-in-fuel-cms.html
The teacher is logged in, so the is_private won't really work here would it?
I don't know, I am starting to lose it.
I am trying your code, but I don't want to control it from the Admin side.
So what I did is in the global variables file I added this:
$pages['postanad'] = array('is_private' => 'yes');
And in my MY_auth I did that:
class MY_auth { var $CI; function __construct() { $this->CI = & get_instance(); $this->CI->load->library('auth/tank_auth'); } function page_auth() { $this->CI->load->module_library(FUEL_FOLDER, 'fuel_pagevars'); $vars = $this->CI->fuel_pagevars->retrieve(uri_path(), ''); if(isset($vars['is_private'])) if($vars['is_private'] == 'yes') if(!$this->CI->tank_auth->is_logged_in()) redirect('auth/auth/login', 'refresh'); } }
When I go into my page, it goes into an endless loop.
Can you maybe help me some more?
I'd ditch the global variables though and do the check in a block.
I need to somehow flag the page to be private, but this page is not added to the admin side. So do you mean I need to create a block view that sets the var as yes and then call this block in the view?
If they're static views sure you can use the vars file.
I was more meaning create a block to hold all of this logic for required login in one place. In this block you could check the segment/vars etc. If they were cms pages you could have a super combo to select and apply the block as well, would need to be part of the layout. Just another/different option..
How about that redirect though?
I am trying to implement the tank_auth system for about 3 days now, and nothing works.
It looks like every step of the way I am getting problems.
One site with the side menu the other site with tank_auth.
Fuel cms looks amazing, but I can't figure out how to work with it.
Very sad.
Thanks for trying to help.