I am trying to put my admin program into the zc_plugin folder and have hit a 3 day snag trying to figure out how to proceed.
Fresh install of 1.5.7c
Ubuntu 20.04 LAMP stack
DisplayLogs module installed
My module partially installed
PHP 7.4
Using the DisplayLogs file structure as an example, I successfully registered my plugin in admin and proceeded with setting up the installer. I have been able to interact with modifying the db but have came to a screeching halt.
I need to retrieve the configuration_group_id to do my inserts into the configuration table. Here is what worked in 1.5.6c:
$setup_gID = $db->execute("select `configuration_group_id`
from " . TABLE_CONFIGURATION_GROUP . "
where `configuration_group_title` = 'EZ-Feeds Settings' ");
if(isset($setup_gID->fields['configuration_group_id'])) {
$gID_setup = $setup_gID->fields['configuration_group_id'];
}
Unfortunately, I have no experience with working with php classes. I have read tons of how to pages but nothing is sinking in or working for me.
I have tried various forms of this (from configuration.php):
$gID = (isset($_GET['gID'])) ? $_GET['gID'] : 1;
$_GET['gID'] = $gID;
$cfg_group = $db->Execute("SELECT configuration_group_title
FROM " . TABLE_CONFIGURATION_GROUP . "
WHERE configuration_group_id = " . (int)$gID);
It returned 1, instead of 31, in one of my attempts...so I tried various forms of this:
$gID_setup =
"select `configuration_group_id` from " . TABLE_CONFIGURATION_GROUP . "
where `configuration_group_title` = 'EZ-Feeds Settings' ";
$this->executeInstallerSql($gID_setup);
var_dump($this->gID_setup);
exit;
NULL was returned in one instance and bool(true) in another.
I am blurry eyed and exhausted from trying to figure it out.
I would appreciate some insight on how to proceed.
BTW...great addition zc_plugin! It is going to be a huge time saver for developers after we figure out the ins and outs of it.