2
It will depend of the module code but you can try this.
Make a file with the name you want at the root of your domain (in the same tree as mainfile.php)
Add this lines:
include ('mainfile.php');
$this_name = 'content';
$newUrl = '/cms/htdocs/modules/content/index.php';
$newuri = '?id=1';
$_GET['id'] = 1;
$_SERVER['REQUEST_URI'] = $newUrl.$newuri;
$_ENV['PHP_SELF'] = $newUrl;
$_SERVER['SCRIPT_NAME'] = $newUrl;
$_SERVER['PHP_SELF'] = $newUrl;
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($this_name);
if (!$xoopsModule || !$xoopsModule->getVar('isactive')) {
include_once XOOPS_ROOT_PATH."/header.php";
echo ""
._MODULENOEXIST."";
include_once XOOPS_ROOT_PATH."/footer.php";
exit();
}
$moduleperm_handler =& xoops_gethandler('groupperm');
if ($xoopsUser) {
if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) {
redirect_header(XOOPS_URL."/user.php",1,_NOPERM, false);
exit();
}
$xoopsUserIsAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid'));
} else {
if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) {
redirect_header(XOOPS_URL."/user.php",1,_NOPERM);
exit();
}
}
if ( file_exists(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/".$xoopsConfig['language']."/main.php") ) {
include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/".$xoopsConfig['language']."/main.php";
} else {
if ( file_exists(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/english/main.php") ) {
include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/english/main.php";
}
}
if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar( 'hasnotification' ) == 1) {
$xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
}
include(XOOPS_ROOT_PATH.$newUrl);
?>
This depends a lot of the content module,I did not look into it.
This is an extract of the seo module I was doing and may have bugs.
Please give me feedback.