I made this:
***********************************************************************************************************
if ($option == "com_k2")
{
$url = JRoute::_('index.php?option=com_k2&view=item&id='.$Itemid.'item&id='.$row->id);
$title = stripslashes($row->title);
$fields = "[url=".$url."]".$title."[/url]";
}
$success = $message->post ( $catid, $fields, $options );
if ($success) {
$newMessageId = $message->save ();
}
***************************************************************************************************
It gives me this result without the K2 alias title
www.mysite.com/news/technology/item/863.html
What do I have to add to this line so it could give me as a result the alias title, something like this:
www.mysite.com/news/technology/item/863-new-iphone.html
***********************************************************************************************************
if ($option == "com_k2")
{
$url = JRoute::_('index.php?option=com_k2&view=item&id='.$Itemid.'item&id='.$row->id);
$title = stripslashes($row->title);
$fields = "[url=".$url."]".$title."[/url]";
}
$success = $message->post ( $catid, $fields, $options );
if ($success) {
$newMessageId = $message->save ();
}
***************************************************************************************************
It gives me this result without the K2 alias title
www.mysite.com/news/technology/item/863.html
What do I have to add to this line so it could give me as a result the alias title, something like this:
www.mysite.com/news/technology/item/863-new-iphone.html