1
Codyko
How to use "$xTheme->loadModuleAdminMenu" ?
  • 2005/10/31 7:46

  • Codyko

  • Just popping in

  • Posts: 22

  • Since: 2005/8/5 7


Hi,

I am a newbie in developing XOOPS module.
For the admin page, I found in the 2.2 API doc that we can "Creates a pretty menu and navigation bar above your module admin pag" by using

$xTheme->loadModuleAdminMenu(1)

Ok, with reference to admin.php of profile module and dev wiki, I suppose there is such a menu bar by using the following codes in my admin/index.php :

include '../../../include/cp_header.php';
xoops_cp_header();

$xTheme->loadModuleAdminMenu(1);

xoops_cp_footer();




Unluckily, I could only see a plain system admin page like this :
Resized Image

Any idea ? Thank You!

2
Codyko
Re: How to use "$xTheme->loadModuleAdminMenu" ?
  • 2005/10/31 8:37

  • Codyko

  • Just popping in

  • Posts: 22

  • Since: 2005/8/5 7


Ok, I 've just found the answers myself. Here are what I learned :
1. Contents of the module's menu/navigation bar must be defined correctly in admin/menu.php :
$i=1;
$adminmenu[$i]['title'] = _MODULE_MI_INDEX;
$adminmenu[$i++]['link'] = "admin/index.php";
$adminmenu[$i]['title'] = _MODULE_MI_PERMISSION;
$adminmenu[$i++]['link'] = "admin/perm.php";



which must in turn defined correctly in xoops_version.php :

// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";


2. The above setting must be defined correctly "BEFORE" installing your module. This is the step I had problem ; When I created admin menu/navi bar, I had already installed the module for developing.

Hope it helps others

Login

Who's Online

264 user(s) are online (208 user(s) are browsing Support Forums)


Members: 0


Guests: 264


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits