Ticket #3 (closed tarefa: fixed)

Opened 8 months ago

Last modified 8 months ago

blog inicial - blog simples em CI

Reported by: edsonk Assigned to: edsonk
Priority: normal Milestone: Tutorial Blog Simples em CodeIgniter - parte 01
Component: inicio Version: 1.7.2
Severity: CodeIgniter Framework Keywords:
Cc:

Description

Change History

12/29/09 16:08:21 changed by edsonk

  • owner set to edsonk.
  • status changed from new to assigned.

12/29/09 16:10:48 changed by edsonk

Alterações

  • arquivo system/application/config/routes.php
    De:
    $route['default_controller'] = "welcome";
    $route['scaffolding_trigger'] = "";
    
    Para:
    $route['default_controller'] = "blog";
    $route['scaffolding_trigger'] = "scaffolding";
    
  • arquivo system/application/config/autoload.php
    De:
    $autoload['libraries'] = array();
    
    Para:
    $autoload['libraries'] = array('database');
    

12/29/09 16:16:52 changed by edsonk

Alterações

  • arquivo system/application/config/database.php
    Altere conforme necessário como neste tutorial usamos:
    
    $db['default']['hostname'] = "localhost";
    $db['default']['username'] = "codeigniter";
    $db['default']['password'] = "12345";
    $db['default']['database'] = "codeigniter_blog";
    $db['default']['dbdriver'] = "mysql";
    $db['default']['dbprefix'] = "";
    $db['default']['pconnect'] = TRUE;
    $db['default']['db_debug'] = TRUE;
    $db['default']['cache_on'] = FALSE;
    $db['default']['cachedir'] = "";
    $db['default']['char_set'] = "utf8";
    $db['default']['dbcollat'] = "utf8_general_ci";
    

12/29/09 16:19:15 changed by edsonk

Banco de dados e seus dados iniciais

  • disponível no diretório db;
--
-- Banco de Dados: `codeigniter_blog`
--

-- --------------------------------------------------------

--
-- Estrutura da tabela `comments`
--

CREATE TABLE IF NOT EXISTS `comments` (
  `id` int(11) NOT NULL auto_increment,
  `entry_id` int(11) NOT NULL,
  `body` text NOT NULL,
  `author` varchar(100) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Extraindo dados da tabela `comments`
--

INSERT INTO `comments` (`id`, `entry_id`, `body`, `author`) VALUES
(1, 1, 'Meu primeiro comentário.', 'Edson Kuzniewski'),
(2, 2, 'Meu primeiro comentário.', 'Edson Kuzniewski'),
(3, 3, 'Meu primeiro comentário.', 'Edson Kuzniewski');

-- --------------------------------------------------------

--
-- Estrutura da tabela `entries`
--

CREATE TABLE IF NOT EXISTS `entries` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(128) NOT NULL,
  `body` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Extraindo dados da tabela `entries`
--

INSERT INTO `entries` (`id`, `title`, `body`) VALUES
(1, 'primeiro post', 'primeiro post aqui!'),
(2, 'segundo post', 'segundo post aqui!'),
(3, 'terceiro post', 'terceiro post aqui!');

12/29/09 16:21:39 changed by edsonk

Alterações

  • altere conforme o solicitado como no caso do tutorial vai ficar assim:
  • arquivo system/application/config/config.php
    De:
    $config['base_url']	= "http://example.com/";
    
    Para:
    $config['base_url']	= "http://localhost/Tutorial/Blog/Tutorial 001/";
    

12/29/09 16:24:42 changed by edsonk

  • status changed from assigned to closed.
  • resolution set to fixed.

Revisão