Hey Hey guys,
Just wanted to give you all a snippet of code we have added to our forums so that people can reply via email to the notifications they receive, Instant notifications.
$post2 = JRequest::getVar( 'cid' , array(0) , 'POST' );
$db =DiscussHelper::getDBO();
$db->setQuery( 'SELECT params FROM #__discuss_category WHERE id = ' . $post->category_id );
$custom_data = $db->loadAssocList();
if(count($custom_data)){$tmp=json_decode($custom_data[0]['params']);$custom_data=array('parent'=>$post->id,'post_id'=>$post2[0],"cat_id"=> $post->category_id,"cat_email_parser"=>$tmp->cat_email_parser);}
else{$custom_data=0;}
That was added to the file: in file root\components\com_easydiscuss\helpers\helper.php in
function sendNotification(-----) at line 2626
we also updated: root\components\com_easydiscuss\themes\simplistic\emails all .html.php files
with:
<br/>
<a style="background-color:#ffcc00;border:1px solid #caa200;padding-left:15px;padding-right:15px;border-radius:2px;color:#534200;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:30px;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;" href="mailto:<?php echo $custom_data['cat_email_parser']; ?>?subject=%5B%23<?php echo $custom_data['parent']; ?>%5D%20 <?php echo $postTitle; ?>" target="_blank">Reply by email</a>
At the end of the page
Hope it helps some one
All the best
Alex