ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Doubt regarding the Video Tutorial Posted - Create a weblog in 20 minutes

May 18, 2011 8:07pm

Subscribe [3]
  • #1 / May 18, 2011 8:07pm

    aarthi.athi

    4 posts

    Hi
        I am learning to develop a website using the MVC framework. After much googling i found codeIgniter to be the one thats going to help me. I started with the Video Tutorial and tried to create a Blog. I am unable to proceed because the folder structure that is specified in the video tutorial is different from the one that i downloaded. There was one file named Scaffolding that i could not find in my downloaded copy.Is this Video up to date with the latest version release. ? I also noticed that the Application folder is within the System folder ( in the Video Tutorial)?  kindly help me out.

    Thanks

    Aarthi

  • #2 / May 19, 2011 9:01am

    regal2157

    197 posts

    The tutorial is a bit out of date, but you only need to change a few things. It is common for developers to drag the application folder out of the system folder, which is the way it is downloadable now today. Scaffolding has be removed, as it wasn’t a safe operation, and was buggy from what I’ve been hearing.

    Also, all classes that extend a codeigniter class are now prefixed with CI_

    So your controllers would be: class Test extends CI_Controller

    With the implementation of PHP5, your constructor is a little different to. I believe it used to be:
    function __construct(){
    parent::Controller();
    }

    but is now:
    function __construct(){
    parent::__construct();
    }

    Make sure you go through the user guide provided with your installation, or the one on the website here. In the Table of Contents, on the left is a thing for upgrading from CI1.7 to CI2.0 which will point out things you need to change, but you have no reason to replace folders since you have the latest version.

    Also, check out the Model, View, and Controller classes to see basic templates of them.

    Any questions, let me know 😊

  • #3 / May 19, 2011 9:09pm

    aarthi.athi

    4 posts

    Hi Regal,
         
    Thank you and your help is much appreciated. I was referring the user guide and am working on it. Will get back to you.

    Thanks & Regards

    Aarthi

  • #4 / May 20, 2011 7:52pm

    aarthi.athi

    4 posts

    Hi Regal,
        I am creating a login component. I am learning from a video tutorial. I had created a template ( header, dynamic( body), footer). I get an error ” Unable to load the requested file. loginform.php”.
    Using an array i pass the name of the dynamic ( body) page, but then this value is not being set in $this->load->view(‘includes/template’,$data).


    #—View—#
    template.php———- path——views/includes/template.php

    <?php $this->load->view(‘includes/header’); ?>
    <?php $this->load->view($maincontent); ?>
    <?php $this->load->view(‘includes/footer’); ?>
    ————————————————————————————————-
    #—Controller—#

    login.php

    <?php
    class Login extends CI_Controller{
    public function index()
    {
    $data['maincontent'] = 'loginform';
    $this->load->view('includes/template',$data); //this is not working.
    }
    }
    ?>


    Can you help me resolve it ?

  • #5 / May 20, 2011 8:15pm

    osci

    377 posts

    In lounge you ask for code!!!!!!!
    Create topics in appropriate forums pls.

  • #6 / May 20, 2011 8:48pm

    aarthi.athi

    4 posts

    Sorry…

  • #7 / Jun 17, 2011 12:18am

    csascot

    3 posts

    Excellent post. I want to thank you for this informative read and I appreciate you sharing. Keep up the good work. For your car servicing Ascot needs, please give us a visit.

    More power!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases