1
jfernau
Changing the order of modules in the admin section
  • 2004/10/10 2:54

  • jfernau

  • Just popping in

  • Posts: 95

  • Since: 2003/12/29


I'm trying to change the order that the modules are listed in the admin section. I even tried uninstalling modules and resinstalling them in the order that I wanted them, but they were always listed in the original order.

I tried deleting the cache/adminmenu.php file, but logging back in regenerated the file just as it was, which means that the order is stored somewhere else.

Can someone tell me where that information is stored and how to edit it so I can group the modules as I would like in the admin section?

Thanks!

John

2
ackbarr
Re: Changing the order of modules in the admin section

the admin menu is generated by the function xoops_module_get_admin_menu() in /includes/cp_functions.php. According to the code, modules are retrieved from the db sorted according to module id (mid):

$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo();
    
$criteria->add(new Criteria('hasadmin'1));
    
$criteria->add(new Criteria('isactive'1));
    [
b]$criteria->setSort('mid');[/b]
    
$mods =& $module_handler->getObjects($criteria);


This implies that if you completely un-install the modules and re-install them, they should appear in the order you are looking for. I know you say you've tried that already. Take a look at <prefix>_modules in the database to see what order the modules would be returned.

3
kaotik
Re:Changing the order of modules in the admin section
  • 2004/10/10 10:38

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


This thread has a solution by chapi which seems to work:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=12700&forum=7

There are also some hacks there.

4
jfernau
Re:Changing the order of modules in the admin section
  • 2004/10/10 11:35

  • jfernau

  • Just popping in

  • Posts: 95

  • Since: 2003/12/29


@ackbarr: Thanks. I'll take a look. When I looked at the admin.php file, the numbers in the [ ] for each module did appear to be in the correct order, but displayed out of order.

The whole reason this became an issue is because of TinyD. I wanted them all together in numerical order. Big deal? No. But just enough to bug me. If I can't fix this somehow, I'll probably blow the site away and start over, or it will bug me forever.

However, this seems like something isn't working right, so I think I'd rather look at it first to see if there is a bug that needs to be fixed.

Can I assume that module IDs are not reused? That once something is installed and deleted, that ID stays in the database? If so, would a reinstalled module pickup it's old module ID or the next one available?

Thanks.

John


@kaotic: Thanks for popping over and having a look. I found that thread too, but when I realized that blowing away the adminmenu.php only resulted in it being recreated the same way, I knew that the incorrect info was being stored somewhere else, and wanted to fix it there.

Thanks for looking into it for me.

John

Login

Who's Online

206 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

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

Latest GitHub Commits