It looks like you're new here. If you want to get involved, click one of these buttons!
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: hooks/Fuel_hooks.php
Line Number: 48
A PHP Error was encountered
Severity: Warning
Message: require_once(/home2/fnpsorg/public_html/fuel/application/../modules/fuel//controllers/.php) [function.require-once]: failed to open stream: No such file or directory
Filename: hooks/Fuel_hooks.php
Line Number: 48
<?php
define('CHEAT_SHEET_VERSION', '0.1');
define('CHEAT_SHEET_FOLDER', 'cheat_sheet');
define('CHEAT_SHEET_PATH', MODULES_PATH.CHEAT_SHEET_FOLDER.'/');
<?php
$route[FUEL_FOLDER.'tools/cheat_sheet'] = CHEAT_SHEET_FOLDER;
<?php
$config['nav']['tools']['tools/cheat_sheet'] = 'Cheat Sheet';
<?php
require_once(FUEL_PATH.'/libraries/Fuel_base_controller.php');
/**
*
* Cheat Sheet - a FuelCMS Module
* The dashboard controller will add a examples within the dashboard
* that show how to implement key features of fnps.org as a fuelcms application.
*/
class Dashboard extends Fuel_base_controller {
function __construct()
{
parent::__construct();
$this->config->load('cheat_sheet');
}
function index()
{
/* At least for now, $data is not set */
echo 'got here';
$data['dummy'] = 'nada';
$this->load->view('cheat_sheet.php', $data);
}
}
// specifies which modules are allowed to be used in the fuel admin
$config['modules_allowed'] = array(
'user_guide',
'blog',
'backup',
'seo',
'validate',
'tester',
'cheat_sheet',
'cronjobs'
);
Comments
1. Remove the ".php" from the load->view statement in the controller.
2. Be sure to the module's name is added in the MY_fuel.php $config['fuel_dashboards'] array.
If I have an identical controller called "dashboard.php" and add the module to the $config['dashboards'] array then it shows up as an item on the dashboard page....it is found, and it works. But this is not where it needs to be.
If I have an identical (other than name) controller called "cheat_sheet.php" and I want it in the tools section of the admin menu, it is never found. I've tried many variants of setting up those constants and routes, all based on the items in that tools section that do work.
As you can see from that error
require_once(/home2/fnpsorg/public_html/fuel/application/../modules/fuel//controllers/.php)
the name of the controller is missing, and there are two // where there should be more to the path.
(the code I copied above did have an error --- due to my varied tries --- the controller that fails does start with
class Cheat_sheet extends Fuel_base_controller {
The error (when I go off from the tools section) is identical regardless of the$config['dashboards'] array... and the only difference between the two controllers is the name....call it dashboard and tell it to go in the dashboard page, it works....call it "Cheat_sheet" and want it off the tools section of the menu, it fails. The tools section URL comes through as
www.fnps.org/fuel/tools/cheat_sheet
when I mouse over it (looks correct, or at least the same as all the other tools section modules.Does this help?
$route[FUEL_ROUTE.'tools/cheat_sheet'] = CHEAT_SHEET_FOLDER;
An Error Was Encountered The configuration file development/cheat_sheat.php and cheat_sheat.php do not exist.
What is "development" ??
$this->config->module_load(CHEAT_SHEET_FOLDER, 'cheat_sheet');
OR
$this->config->load(CHEAT_SHEET_FOLDER.'/cheat_sheet');