Here’s the error I’m getting now. I’m not using anything that’s not in the Example, which works fine.
------------------------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined index: class
Filename: libraries/codexforms.php
Line Number: 53
------------------------------------------------------
I feel like I’m getting conflicting information from three different sources:
The Screencast (http://codeextinguisher.com/screencasts/Intro_to_CodeExtinguisher/index.html)
The Documentation (http://www.codeextinguisher.com/index.php/documentation)
The Wiki (http://codeextinguisher.pbwiki.com/)
I’mn not sure what instructions/formats I should be following.
------------------------------------------------------
Table:
------------------------------------------------------
CREATE TABLE `daily_devotion` (
`id` int(11) NOT NULL default ‘0’,
`start_publish_date` datetime NOT NULL default ‘1970-01-01 00:00:00’,
`end_publish_date` datetime NOT NULL default ‘1970-01-01 00:00:00’,
`scripture` text NOT NULL,
`verse` varchar(40) NOT NULL default ‘ ‘,
PRIMARY KEY (`id`)
)
------------------------------------------------------
Definition (daily_devotion.yml):
------------------------------------------------------
form_setup:
scripture:
class: TextArea
verse:
class: TextBox
start_publish_date:
class: Date
end_publish_date:
class: Date
------------------------------------------------------
Controller (dailydevotion.php):
------------------------------------------------------
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
include_once("codexcontroller.php");
class DailyDevotion extends codexController
{
function DailyDevotion ()
{
codexController::codexController();
$rules['scripture'] = "trim|required";
$config = array(
'db_table' => 'daily_devotion', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('daily_devotion')), //The array that holds our elements
'controller_name' => 'DailyDevotion', //The name of the controller, so that it can be used when generating the URLs
'primary_key' => 'id', //The name of the controller, so that it can be used when generating the URLs
'display_fields'=>array('scripture','verse','start_publish_date','end_publish_date'),
'rules'=>$rules
);
$this->setConfig($config);
}
}
?>