Configuration files
The module configuration files are located in /config folder.
Typical configuration files:
1) config.php
use Xmf\Module\Admin;
$moduleDirName = basename(dirname(__DIR__));
return (object)[
'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator',
'paths' => [
'dirname' => $moduleDirName,
'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName,
'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
],
'uploadFolders' => [
XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
//XOOPS_UPLOAD_PATH . '/flags'
],
'copyBlankFiles' => [
XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
//XOOPS_UPLOAD_PATH . '/flags'
],
'copyTestFolders' => [
[
XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads',
XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
],
],
'templateFolders' => [
'/templates/',
// '/templates/blocks/',
// '/templates/admin/'
],
//old files to be deleted during module update
'oldFiles' => [
'/class/request.php',
'/class/registry.php',
'/class/utilities.php',
'/class/util.php',
// '/include/constants.php',
// '/include/functions.php',
'/ajaxrating.txt',
],
//old folders to be deleted during module update
'oldFolders' => [
'/images',
'/css',
'/js',
'/tcpdf',
],
// list all tables that should be renamed during module update
'renameTables' => [
// 'XX_archive' => 'ZZZZ_archive',
],
// module stats to be calculated
'moduleStats' => [
// 'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1),
// 'totalitems' => $helper->getHandler('Item')->getItemsCount(),
// 'totalsubmitted' => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
],
'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
<img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
];2) icons.php
3) paths.php
Last updated
Was this helpful?