12 include_once XOOPS_ROOT_PATH.
'/kernel/module.php';
14 $db = XoopsDatabaseFactory::getDatabaseConnection();
16 $sql =
"SELECT * FROM ".$db->prefix(
"modules").
" WHERE isactive='1' ORDER BY `name`";
21 $mod =
new XoopsModule();
22 $mod->assignVars($row);
25 if (file_exists(XOOPS_ROOT_PATH.
'/modules/'.
$mod->getVar(
'dirname').
'/class/'.strtolower(
$mod->getVar(
'dirname').
'controller').
'.php')){
26 include_once XOOPS_ROOT_PATH.
'/modules/'.
$mod->getVar(
'dirname').
'/class/'.strtolower(
$mod->getVar(
'dirname').
'controller').
'.php';
27 $class = ucfirst(
$mod->getVar(
'dirname')).
'Controller';
29 if (method_exists($class,
'get_main_link')){
30 $main_link = $class->get_main_link();
33 if (
$mod->getVar(
'hasmain')){
34 $main_link = XOOPS_URL.
'/modules/'.
$mod->dirname();
42 if (
$mod->getVar(
'hasmain')){
43 $main_link = XOOPS_URL.
'/modules/'.
$mod->dirname();
51 $admin_link =
$mod->getVar(
'hasadmin') ? XOOPS_URL.
'/modules/'.
$mod->dirname().
'/'.
$mod->getInfo(
'adminindex') :
'';
56 'id' =>
$mod->getVar(
'mid'),
57 'name' =>
$mod->getVar(
'name'),
58 'realname' =>
$mod->getInfo(
'name'),
60 'description' =>
$mod->getInfo(
'description'),
61 'image' => XOOPS_URL.
'/modules/'.
$mod->getVar(
'dirname').
'/'.
$mod->getInfo(
'image'),
63 'admin_link' => $admin_link,
64 'updated' => formatTimestamp(
$mod->getVar(
'last_update'),
's'),
65 'author' =>
$mod->getInfo(
'author'),
66 'author_mail' =>
$mod->getInfo(
'authormail'),
67 'author_web' =>
$mod->getInfo(
'authorweb'),
68 'author_url' =>
$mod->getInfo(
'authorurl'),
69 'license' =>
$mod->getInfo(
'license'),
70 'dirname' =>
$mod->getInfo(
'dirname'),
71 'active' =>
$mod->getVar(
'isactive')