Raised This Month: $ Target: $400
 0% 

menu_item_setname() - way to get name?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 05-21-2010 , 18:51   menu_item_setname() - way to get name?
Reply With Quote #1

You can set a menu's entry text with: menu_item_setname()
but is there anyway to get the name?

I wanted to add a "*" at the end of each item, and check for it later on.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-21-2010 , 18:54   Re: menu_item_setname() - way to get name?
Reply With Quote #2

newmenus.inc
PHP Code:
/**
 * Retrieves info about a menu item.
 *
 * @param menu            Menu resource identifier.
 * @param item            Item identifier.
 * @param access        Variable to store access value.
 * @param info            Buffer to store item info.
 * @param infolen        Item info buffer length.
 * @param name            Buffer to store item display text.
 * @param namelen        Item name buffer length.
 * @param callback        Callback ID.
 * @return                1 on success, 0 on failure.
 * @error                Invalid menu resource.
 */
native menu_item_getinfo(menuitem, &accessinfo[], infolenname[]=""namelen=0, &callback); 
__________________
fysiks is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 05-22-2010 , 15:00   Re: menu_item_setname() - way to get name?
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
newmenus.inc
PHP Code:
/**
 * Retrieves info about a menu item.
 *
 * @param menu            Menu resource identifier.
 * @param item            Item identifier.
 * @param access        Variable to store access value.
 * @param info            Buffer to store item info.
 * @param infolen        Item info buffer length.
 * @param name            Buffer to store item display text.
 * @param namelen        Item name buffer length.
 * @param callback        Callback ID.
 * @return                1 on success, 0 on failure.
 * @error                Invalid menu resource.
 */
native menu_item_getinfo(menuitem, &accessinfo[], infolenname[]=""namelen=0, &callback); 
Oops. I never saw the "name[]=" Thank you.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode