1
phillipd
What determines the vertical ordering of the "Admin" icons
  • 2004/12/7 22:04

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I logged on to my XOOPS 2.0.7 site today and went to the Administration menu to find the admin Icons in a different order. Normally the "System Admin" Icon is at the top. It now appears as the forth from the top. I can't see a mechanism to alter this configuration. I looked in the xoops_modules table and its mid is 1 and it's weight is 0. I thought the weight only affected the order a module appears in the "Main Menu". What might be the cause of this? How do I return it to normal?

Thanks

Doug P

2
brash
Re: What determines the vertical ordering of the "Admin" icons
  • 2004/12/7 22:58

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


I've never looked into this myself, but now that you mention it is something I'd like to know. There is an article in the FAQ that shows you how to get your system admin icon back to the top.

3
jmass
Re: What determines the vertical ordering of the "Admin" icons
  • 2004/12/7 23:09

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


Since it is in the order I install the modules, I assume that it is by an auto increment id field in the DB.

This is just a guess though.

4
jdseymour
Re: What determines the vertical ordering of the "Admin" icons

No mine seem to be in different order than I installed them.

I notice some go to the bottom, some in the middle.

And some seem to change position when I install a new module, up or down.

5
phillipd
Re: What determines the vertical ordering of the "Admin" icons
  • 2004/12/7 23:25

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I tried the suggestion in the FAQ:

https://xoops.org/modules/smartfaq/faq.php?faqid=278

But the system admin Icon never returns to the top. It bounces between 2nd, third and forth.

Doug P

6
Dave_L
Re: What determines the vertical ordering of the "Admin" icons
  • 2004/12/8 2:28

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I've been trying to figure this out.

The HTML for that page is stored in cache/adminmenu.php. That file is generated by this code in admin.php:

xoops_module_write_admin_menu(xoops_module_get_admin_menu())


The function xoops_module_get_admin_menu(), which is in include/cp_functions.php, gets the modules from the database using this code:

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


That results in the query:

SELECT FROM xoops_modules WHERE (hasadmin AND isactive 1ORDER BY weight ASCmid ASC


So the modules should be sorted first by weight (called "Order" on the Modules Administration page) and then by module ID. Both sorts are ascending.

I'm not sure what causes the file cache/adminmenu.php to be regenerated, so you could try deleting that file to force it to get rebuilt. That will result in the message "This is your first time to enter the administration section.", which doesn't seem to hurt anything, but I'm not sure about that either.

7
dx6angel
Re: What determines the vertical ordering of the "Admin" icons
  • 2004/12/11 11:37

  • dx6angel

  • Just popping in

  • Posts: 8

  • Since: 2004/11/30


The ordering of the admin menu is a question that has been raised a few times without any resolution.

I have just installed my second online XOOPS site. With the first installation the way I ensured the ordering of the admin menu was by installing the modules according to their order. In other words, if I wanted News above Calendar, I installed the News module first.
Fine.

My second installation, however, did not turn out the same.
I installed the modules in the order I wanted them to appear in my admin menu and ordered them the same for the main menu in the system/modules section.
I then uninstalled the last module I installed and hey presto, the new order in the admin menu is now:

1 (system)
9 (faq)
8 (partners)
7 (forum)
6 (evennews)
5 (calendar)
4 (database tools)
3 (headlines)
2 (news)

This is very irritating for me because I do most of my admin in news and headlines, which are now at the bottom of the bloody page!

So my questions are:

1) How can I permanently re-order the admin menu?
I have already deleted the adminmenu.php in cache twice now and it still has not ordered the menu according to my ordering of the modules on the system/modules install/uninstall page.

2) Why on earth did it reverse the order?

8
davidthomas1
Re: What determines the vertical ordering of the "Admin" icons

It looks like if you deleted / commented out the line:

$criteria->setSort('mid');


from the function xoops_module_get_admin_menu(), in include/cp_functions.php, the modules would be sorted only by "weight" and therefore customisable via the modules page.
みんなちがってみんないい。

XOOPS 2.0.13.2

Login

Who's Online

67 user(s) are online (42 user(s) are browsing Support Forums)


Members: 0


Guests: 67


more...

Donat-O-Meter

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

Latest GitHub Commits