By Alex Lee on Tuesday, 17 November 2015
Replies 3
Likes 0
Views 1.3K
Votes 0
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
Hi Alex,

Thank you for sharing this with us Nice work
Sam
·
Wednesday, 18 November 2015 10:45
·
0 Likes
·
0 Votes
·
0 Comments
·
No prob mate got loads of other tweaks we're working on will post them once all are finished

best
·
Saturday, 21 November 2015 02:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Alex

Thanks for heads up on this one
·
Saturday, 21 November 2015 16:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post