It looks like you're new here. If you want to get involved, click one of these buttons!
sudo php index.php fuel/generate/advanced/ modulename
<div id="error_db">
<h1>A Database Error Occurred</h1>
<p>Unable to connect to your database server using the provided settings.</p><p>Filename: /Applications/MAMP/htdocs/fuelcms1.0/fuel/modules/fuel/core/Loader.php</p><p>Line Number: 134</p></div>Carvels-MacBook-Pro-2:fCarvels-MaCarvels-MaCarvels-MaCarvels-CarvelCarvelCaCaCaCaCaCaCarvCarvCarvCarvelCarvels-CarvCarvC
/** Load the database drivers **/
public function database($params = '', $return = FALSE, $active_record = NULL) {
if (class_exists('CI_DB', FALSE) AND $return == FALSE AND $active_record == NULL)
return;
require_once BASEPATH.'database/DB'.EXT;
$db = DB($params, $active_record); // this is line 134
// <!-- FUEL
$my_driver = config_item('subclass_prefix').'DB_'.$db->dbdriver.'_driver';
$my_driver_file = APPPATH.'core/'.$my_driver.EXT;
if (file_exists($my_driver_file))
{
require_once($my_driver_file);
$db = new $my_driver(get_object_vars($db));
}
if ($return === TRUE)
{
return $db;
}
// return DB($params, $active_record);
// FUEL -->
CI::$APP->db = '';
//CI::$APP->db = DB($params, $active_record);
CI::$APP->db = $db;
$this->_ci_assign_to_models();
return CI::$APP->db;
}
Comments
http://www.getfuelcms.com/user_guide/modules/cronjobs
Here's what I ran in terminal followed by the output and error:
php index.php fuel/generate/advanced/ mpghome CREATED * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/assets/css/mpghome.css * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/assets/images/ico_cog.png * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/assets/js/MpghomeController.js * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/assets/cache/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/config/mpghome.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/config/mpghome_constants.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/config/mpghome_routes.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/helpers/mpghome_helper.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/libraries/Fuel_mpghome.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/language/english/mpghome_lang.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/models/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/tests/sql/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/views/_admin/mpghome.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/views/_blocks/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/views/_docs/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/views/_layouts/ ERRORS * Could not create file controllers/{module}.php * Could not create file /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mpghome/controllers/mpghome.php
Ever seen that before? It created the entire advanced module directory structure with all the necessary files except the controller.
https://github.com/daylightstudio/FUEL-CMS/commit/af54a39df1c039e6528214397a2badd9f72ccef3
php index.php fuel/generate/advanced/ mydashboard CREATED * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/assets/css/mydashboard.css * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/assets/images/ico_cog.png * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/assets/js/MydashboardController.js * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/assets/cache/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/config/mydashboard.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/config/mydashboard_constants.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/config/mydashboard_routes.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/controllers/mydashboard_module.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/helpers/mydashboard_helper.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/libraries/Fuel_mydashboard.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/language/english/mydashboard_lang.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/models/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/tests/sql/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/views/_admin/mydashboard.php * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/views/_blocks/ * /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/views/_layouts/ ERRORS * Could not create file views/_docs/index.php * Could not create file /Applications/MAMP/htdocs/fuelcms1.0/fuel/application/../modules/mydashboard/views/_docs/index.php
I also noticed you pushed a fix to the user_guide and I can see the general docs here:
/fuel/tools/user_guide/modules
But clicking any of the links at the top of that page: Simple Modules, Creating Simple, Modules Tutorial, etc., results in this error:
An Error Was Encountered
Unable to locate the file: _docs/modules.php
Thought you'd want to know that. A lot to keep up with!
php index.php fuel/installer/add_git_submodule git://github.com/daylightstudio/FUEL-CMS-User-Guide-Module.git user_guide
That produced the following message and resulted in stopping the installation:
'fuel/modules/user_guide' already exists in the index
I bet I can name it something else, like - userguide - instead of 'user_guide' and it would work:
php index.php fuel/installer/add_git_submodule git://github.com/daylightstudio/FUEL-CMS-User-Guide-Module.git userguide
and I know I could just download and copy the contents from github (which I'll do right now) but thought I'd give you an opportunity to tell me and some other knucklehead out there the proper way to uninstall and install a module.
Thanks again!
php index.php fuel/installer/uninstall user_guide
This will remove any db tables, permissions, and remove it from MY_fuel.php $config['modules_allowed'] array. It will not however delete the folder (you can do that manually).
Then run:
php index.php fuel/installer/add_git_submodule git://github.com/daylightstudio/FUEL-CMS-User-Guide-Module.git user_guide