Help starting with Fuel CMS

edited May 2012 in News & Announcements

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?


  • edited 1:54PM
    Absolutely possible for all 3 requirements.

    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.
  • edited 1:54PM
    Hi Gumster,

    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.
  • edited 1:54PM
    If it were me I'd leave the fuel backend for site administration and write a front end user profile area for students. You'd include your auth library of choice for the front end area.

    You could use the FUEL backend for managing the gallery module and the articles.
  • edited 1:54PM
    Thank you Lance, but I still don't understand how to do that.

    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:

    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 :(
  • edited 1:54PM
    Fuel CMS is mostly Codeigniter. It might help to think "how would I achieve this in Codeigniter" and proceed from there, because 95% of the task will be solved by typical Codeigniter methods (Models, Views, Controllers). Once you have something working at that level, introducing the model to Fuel CMS will give you a sophisticated CRUD to manage it all. The simple module tutorial indicates how to add a model to the CMS (

    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
    and used
    if ($this->tank_auth->is_logged_in()) { ... do stuff ... } else { ... do something different... }
  • edited 1:54PM
    Gumster, thank you ! That's what I wanted to hear :)

    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 :)
  • edited May 2012
    Glad to be of encouragement!

    Usually there is a topic in this forum that provides inspiration, so keep looking around.
  • edited 1:54PM
    I've been looking at authenticating pages individually, so I wrote this blog piece which might help:
  • edited 1:54PM
    Thank you Gumster, but I'm not sure how your code will help in my case.

    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.
  • edited 1:54PM
    Hi Gumster,

    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?
  • edited 1:54PM
    Assuming your loop is due to the redirect. Does it stop if you just die; there? If your auth/auth/login is set to is_private = 'yes' then it will loop..

    I'd ditch the global variables though and do the check in a block.
  • edited 1:54PM
    Hi Lance, not sure what you mean.

    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?
  • edited 1:54PM
    Ah right, assumed cms pages.

    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?
  • edited 1:54PM
    I don't know, I am thinking of giving up, and develop my sites without fuel.

    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.
  • edited 1:54PM
    Okay zip up everything you have including schema and pm me a link to download it. I'll take a look and see if we can get it going for you.
  • edited 1:54PM
    Lance, you are a star, will send you the link when I have it ready.
Sign In or Register to comment.