Twitter
Sun
02
May
'10
PDF
Print
Send
 
Hits (906) | Comments (0) | Favorited (2) | Votes (0)

Require basic community integartion plugin knowlige.

In profile you can see some additional links like Edit profile, Edit Details, … What is you want some link regarding your component appear there? No problems. You need to add onProfileMenu event to your CIP plugin.

function onProfileMenu($profile)
{
    $user = & JFactory::getUser();
    
    if($user->id == $profile->id) return null;
    
    $menu = array();
 
    $menu[0] = new stdClass();
    $menu[0]->link = JRoute::_("index.php?option=com_my&ctask=act");
    $menu[0]->icon="plugins/community/icons/my.png";
    $menu[0]->alt = JText::_("Additional data");
 
    $out = new stdClass();
    if($params->get('show_menu_title')) $out->title = JText::_("Menu Group Name");
    $out->menuItems = $menu;
    return $out;
}

$profile is and object of the user of current profile.

You need to form array of menu elements you are going to ad too profile menu and pack it to special object with 2 properties. One title which is going to be Title of menu group and other menuItems is array of menu elements.

To show or not title of menu groups, user may turn on or off in Profile template parameters. But you also may do that. If you leave title property empty, menu element will be shown without title. It is useful when you return only 1 or 2 elements.


Comments

There are no comments for this item

Be the first to leave a comment

Add New Comment
Name:
Email:
Comment:
Attachment
Hide Comment
Security code:
Enter text as you see on image
 
 
What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1904 guests and 9 members online


MightyTemplate - Professional Joomla Templates