Add menu tab to "My Account" page
maxchock - December 3, 2008 - 14:08
Hi all,
I'm building a user photo gallery and want to add a menu tab "User Photos" to "My Account" page. I know is possible to do, just maybe is not easy. Just like the "File Browser" tab appeared after enable the IMCE module, and also the user's FriendList tab appear after enable the "friendlist_public_twoway" Views.
I used to be a php programmer 7 years back, so I don't mind to code to get the result. If someone here have done the similar mod, please share with us..
Thanks in advance.
Max.

Hi Max, You need to do it in
Hi Max,
You need to do it in the hook_menu() function of your module.
example :
<?php....
$items['user/%/gallery'] = array(
'title' => t('User Photo'),
'page callback' => 'mymodule_photogallery',
'page arguments' => array(1),
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK,
);
...
?>
the above menu item will put a tab in the user profile .... like "file browser" .
you'll need to program out "mymodule_photogallyer" function to display your page.
Note: the user ID is passed into the mymodule_photogallery function.
good luck
-----------------------------------------
http://www.netrift.com - Custom modules
Hi, Thanks for reply. So
Hi,
Thanks for reply. So you mean i have to write a module to enable the photogallery tab right?