Hello
I am developing a new PMS system for J!1.5.
I would like to create a plugin so CB can use my component. Please note that the plugin is created with J1.5 libraries.
I have 1 question and one problem which hold me from publishing this plugin.
The question:
Which values are required and to which url should be used in the 'Quick message' form?
The problem:
I have written a getLink() function, but somehow the link is not showed in the 'message' menu.
[code:1]function getPMSlink($toid, $fromid, $subject, $message, $kind)
{
$menu =& JSite::getMenu();
$params = $this->params;
// Find the url if used by the website to JAM
$item = $menu->getItems( 'link', 'index.php?option=com_jam&view=inbox', true);
// If we have an item, we use the used url, otherwise we use a standard one
if ($item) {
$url = 'index.php?Itemid='.$item->id;
} else {
$url = 'index.php?option=com_jam';
}
if ($kind == '1')
{
require_once( JPATH_COMPONENT_SITE.DS.'classes'.DS.'users.php');
$caption = $params->get('pmsMenuText', _UE_PM_USER);
$url = $url.'&to='.JAMUsers::getUsername( $toid, ',');
$tooltip = $params->get('pmsMenuDesc', _UE_MENU_PM_USER_DESC);
}
else
{
$caption = _UE_PM_INBOX;
$tooltip = _UE_MENU_PM_INBOX_DESC;
}
return array( 'caption' => $caption, 'url' => $url, 'tooltip' => $tooltip );
}[/code:1]
Thank you in advance
Nicholai