I'm trying to insert a auto stream item from a custom component into easysocial stream. Everything is working perfect, just one issue i'm having. The href links are getting rendered as text and not as hyperlink.
my code is as below:
$message = 'I like '.$value->company_name.' and i think its price should be " '.$value->target_price.' "
<a href="/ '.$viewlink.' ">View this</a> | <a href="/ '.$userlink.' ">View All</a>' ;
require_once(JPATH_ROOT . '/administrator/components/com_easysocial/includes/easysocial.php');
ES::initialize();
$stream = ES::stream();
$template = $stream->getTemplate();
$template->setActor( $value->user_id , 'user' );
$template->setContext( $value->user_id , 'article' ); //story
$template->setContent( $message );
$template->setTitle( $title );
$template->setVerb( 'create' );
//$template->setSideWide( true );
$stream->add( $template );
In the above content is getting rendered as:
I like Premier toys and i think its price should be 15
<a href="/myurl/index.php/category/view/16-premier-toys">View this</a> | <a href="/myurl/index.php/display/971-demo-user">View All</a>
$message is not getting rendered as html, and raw text is being shown.
Can you please guide me on how to get href activated in stream.
Secondly i wanted to also ask how can i have #tag included in the $message? Basically i want the message to include #premiertoys hastag
regards
Sunny