I’m new to EE but have about 6 years experience in PHP. I can do plugins fine, no problem. I’m using a plugin right now to create extended data for some stuff and storing it in a database, with tools that can be used to edit this data that can be called with EE tags.
Now, this works fine but I would love to make it a module and have the tools being used right in EE with EE’s own control panel. But, every time I try and make a module (editing the Fortunes example, or rather using it as a template) I get the same weird problem. When I click install, it doesn’t say it installs. But when I click on “install” again it asks me to uninstall it. It also doesn’t show the version number.
When I just upload the Fortunes example as-is, I have no problem. But the minute I rename it (I rename all the proper stuff, the file names, the folder, and the actual classes in the file (this I do with Scite’s find and replace utilities) and try that out I get the same error.
Here is the install function: function searchvi_module_install() { global $DB;
$sql[] = "INSERT INTO exp_modules (module_id,
module_name,
module_version,
has_cp_backend)
VALUES
('',
'searchVi',
'$this->version',
'y')";
$sql[] = "CREATE TABLE IF NOT EXISTS `exp_vidata` ( `id` int(11) NOT NULL auto_increment, `bedrooms` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ;";
foreach ($sql as $query)
{
$DB->query($query);
}
return true;
}
That class name is not following the Developer Guidelines for Class Naming
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.