21 include_once XOOPS_ROOT_PATH.
'/kernel/module.php';
23 $db = XoopsDatabaseFactory::getDatabaseConnection();
25 $sql =
"SELECT * FROM ".$db->prefix(
"modules").
" WHERE isactive='1' ORDER BY `name`";
30 $mod =
new XoopsModule();
31 $mod->assignVars($row);
34 if (file_exists(XOOPS_ROOT_PATH.
'/modules/'.
$mod->getVar(
'dirname').
'/class/'.strtolower(
$mod->getVar(
'dirname').
'controller').
'.php')){
35 include_once XOOPS_ROOT_PATH.
'/modules/'.
$mod->getVar(
'dirname').
'/class/'.strtolower(
$mod->getVar(
'dirname').
'controller').
'.php';
36 $class = ucfirst(
$mod->getVar(
'dirname')).
'Controller';
38 if (method_exists($class,
'get_main_link')){
39 $main_link = $class->get_main_link();
42 if (
$mod->getVar(
'hasmain')){
43 $main_link = XOOPS_URL.
'/modules/'.
$mod->dirname();
51 if (
$mod->getVar(
'hasmain')){
52 $main_link = XOOPS_URL.
'/modules/'.
$mod->dirname();
60 $admin_link =
$mod->getVar(
'hasadmin') ? XOOPS_URL.
'/modules/'.
$mod->dirname().
'/'.
$mod->getInfo(
'adminindex') :
'';
62 $deficon = XOOPS_ROOT_PATH.
'/modules/rmcommon/themes/designia/images/modules/'.
$mod->dirname().
'.png';
65 'id' =>
$mod->getVar(
'mid'),
66 'name' =>
$mod->getVar(
'name'),
67 'realname' =>
$mod->getInfo(
'name'),
69 'description' =>
$mod->getInfo(
'description'),
70 'image' => is_file($deficon) ? str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $deficon) : (XOOPS_URL.
'/modules/'.
$mod->getVar(
'dirname').
'/'.(
$mod->getInfo(
'icon32') ?
$mod->getInfo(
'icon32') :
$mod->getInfo(
'image'))),
72 'admin_link' => $admin_link,
73 'updated' => formatTimestamp(
$mod->getVar(
'last_update'),
's'),
74 'author' =>
$mod->getInfo(
'author'),
75 'author_mail' =>
$mod->getInfo(
'authormail'),
76 'author_web' =>
$mod->getInfo(
'authorweb'),
77 'author_url' =>
$mod->getInfo(
'authorurl'),
78 'license' =>
$mod->getInfo(
'license'),
79 'dirname' =>
$mod->getInfo(
'dirname'),
80 'active' =>
$mod->getVar(
'isactive')