Welcome Guest, Not a member yet? Register   Sign In
Official video tutorials: work in reactor 2.0?
#1

[eluser]froginvasion[/eluser]
Being a newbie to codeigniter, I'm trying to do the video tutorials,
but everything seems a bit different. Should I use other tutorials or just stick with the old stable core version 1.7.3?

I'm confused that their controller is called Controller, and not CI_Controller, same goes for the config files, they 'seem' the same, but they aren't. According to the tutorial, I have to load the database module in the 'autoload' file, which doesn't work. Same goes for:

function Blog(){
parent::Controller();
}

That also gives me problems. So at the moment I'm a bit confused what tutorials to follow.
#2

[eluser]LuckyFella73[/eluser]
I would recommend to dive into CI 2 right from the beginning.
There are not that many differences.

Build your controllers like this to make the tutorial code 2.0 compatible:
Code:
<?php
class Blog extends CI_Controller {

    function __construct()
    {
        parent::__construct();

    }

The database autoload should work like before. What error message do you get
when trying to autoload the database library?
#3

[eluser]froginvasion[/eluser]
Thanks, that I didn't know. It seems that this has to do with changing to PHP 5.1 in 2.0.
It seems that loading the database isn't the problem, as adding this line didn't give any problems:
Code:
$autoload['libraries'] = array('database');

But scaffolding doesn't work. But from what I've googled, this is deprecated now, and that's why I can't use it Wink
#4

[eluser]InsiteFX[/eluser]
You will also need to change your Model to CI_Model

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB