How do I add a “chat with me” link in the profile page?

Manually edit the file module/profile/template/default/
block/header.html.php
or using your phpFox Admin Panel, go to:

Extensions -> Theme -> Manage Theme -> YOURTHEME -> Edit Templates -> Profile -> header.html.php

Find the following code:

{if isset($aUser.is_online) && $aUser.is_online && Phpfox::isModule('im') && Phpfox::getParam('im.enable_im_in_footer_bar') && $aUser.is_friend == 1}
            <li><a href="#" onclick="$.ajaxCall('im.chat', 'user_id={$aUser.user_id}'); return false;">{img theme='module/chat.png' class='v_middle'} {phrase var='profile.instant_chat'}</a></li> 
            {/if}

And replace it with:

{if isset($aUser.is_online) && $aUser.is_online && Phpfox::isModule('im') && Phpfox::getParam('im.enable_im_in_footer_bar') && $aUser.is_friend == 1}
            <li> 
            <a href="javascript:void(0);" onclick="jqcc.cometchat.chatWith('{$aUser.user_id}');">{img theme='module/chat.png' class='v_middle'} {phrase var='profile.instant_chat'}</a></li>    {/if} 

Not finding what you need?

The CometChat team is here to help!