12
If you want to use the XOOPS system to manage your own pages, then you need to make a module for it.
The VERY SIMPLE way to make a module and to show your own html or php code, is to to the following (change to fit your needs):
This code will add one page and three sub-pages with your own html or php contents.
1) Create a directory named "example" in /modules.
2) Create a directory named "images" in the /example directory.
3) Put a small picture named "example.jpg" into the /images directory. It will be used as your modules icon in the XOOPS administration.
4) Then create a file named xoops_version.php inside the /example directory, with the following contents:
$modversion['name'] = "example";
$modversion['version'] = 0.01;
$modversion['description'] = "This is just an example";
$modversion['author'] = "Daigoro";
$modversion['credits'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL";
$modversion['official'] = 0;
$modversion['image'] = "images/example.jpg";
$modversion['dirname'] = "example";
// Admin things
$modversion['hasAdmin'] = 0;
// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = "Page1";
$modversion['sub'][1]['url'] = "Page1.php";
$modversion['sub'][2]['name'] = "Page2";
$modversion['sub'][2]['url'] = "Page2.php";
$modversion['sub'][3]['name'] = "Page3";
$modversion['sub'][3]['url'] = "Page3.php";
?>
5) Create index.php, Page1.php, Page2.php and Page3.php also inside the /example directory and put in the following contents:
require('../../mainfile.php');
require(XOOPS_ROOT_PATH.'/header.php');
if (!is_object($xoopsUser)) {
redirect_header('../../index.php', 3, "Please login to access this page");
exit();
}
// Here you can fill in your own php code
?>
require(XOOPS_ROOT_PATH.'/footer.php');
?>
You need to install the module, just like any other modules.
I hope this helps you.
Best regards,
Daigoro