Disable items in the menu
Hi, i want to know the better way to block options in the menu... this is my way:
PHP Code:
|
Re: Disable items in the menu
PHP Code:
PHP Code:
|
Re: Disable items in the menu
The bad thing about using menu_additem() is that it registers the key and therefore the menu will call the handler when that key is pressed.
So, my solution to use menu_addtext(menu,"\d3. Text Here",1) should theoretically work but it seems that the "new menus" system is flawed when using menu_addtext(). So, unfortunately this will not work. Using the "old" menu system might be best in this situation. I have another idea that might "work." brb UPDATE: Ok, so I think I found the best work-around: PHP Code:
|
Re: Disable items in the menu
The proper way it to use menu_makecallback to set a callback, then add this callback in menu_additem, then return ITEM_ENABLE or ITEM_DISABLE in the callback function
|
Re: Disable items in the menu
create a callback function for menu.
like this,not tested. PHP Code:
|
Re: Disable items in the menu
Quote:
|
Re: Disable items in the menu
@fysiks
Thx to much... And i have a question: PHP Code:
PHP Code:
PHP Code:
--> PHP Code:
Thx to much... And... PHP Code:
cuz... PHP Code:
PHP Code:
thx to all |
Re: Disable items in the menu
PHP Code:
|
Re: Disable items in the menu
@Exolent
Wow, work perfect and i understand at all... Thx to much and thx to all. |
| All times are GMT -4. The time now is 18:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.