By Steve Kraft on Friday, 08 August 2014
Posted in General Issues
Replies 5
Likes 0
Views 0.9K
Votes 0
Hi there,

There is a field inside email configuration where given email-addresses can get a notification on every post that is created inside ED.

Can you tell me which email template it is to change some information? I need the name of the category where the post is written in inside this email. As an addition to the subject it would be great.

Thx in front of all efforts,
Steve
Hello Steve,

Sorry for late reply to this,
I have a little bit lost here, do you mean that you would like to know which email template generate the html when the user get the new discussion post email notification?
If yes, the file is located at JoomlaFolder\components\com_easydiscuss\themes\simplistic\emails\email.subscription.site.new.php
You can add this code for display category of the post
<?php echo $post->category; ?>

If not, can you elaborate more details regarding with your requirement? Please advise.
·
Friday, 08 August 2014 22:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

thx for your reply. This is not the right file. I put this line:

<b><?php echo $postAuthor; ?></b> <?php echo JText::_( 'COM_EASYDISCUSS_EMAILTEMPLATE_CREATED_NEW_DISCUSSION' );?> <b><?php echo $postTitle; ?></b> in <b><?php echo $post->category; ?></b>


into email.subscription.site.new.html.php and tried in the file under "simplistic" and also inside my own theme but the only thing that's visible is the "in" between title and category.


Best Regards,
Steve

(Edit - I changed the filename)
·
Monday, 11 August 2014 17:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Steve,

Sorry for late reply to this,
Can you try this following code and see how it goes?
Open this file -> JoomlaFolder\components\com_easydiscuss\controllers\posts.php

//Look for this code first LINE 1249
// For use within the emails.
$emailData = array();
$emailData['postTitle'] = $post->title;
$emailData['postAuthor'] = $profile->id ? $profile->getName() : $post->poster_name;

// ADD this code in LINE 1251
$emailData['postCategory'] = $category->title;

Then open this file JoomlaFolder\components\com_easydiscuss\themes\simplistic\emails\email.subscription.site.new.html.php

// put this code in
<b><?php echo $postCategory; ?></b>

// example
<b><?php echo $postAuthor; ?></b> <?php echo JText::_( 'COM_EASYDISCUSS_EMAILTEMPLATE_CREATED_NEW_DISCUSSION' );?> <b><?php echo $postTitle; ?></b> in <b><?php echo $postCategory; ?></b>


Hope this help.
·
Monday, 11 August 2014 18:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Arlex,

"Sorry for late reply to this," - no problem, I know how stressful support is for you and your colleagues sometimes.

Another big thank you. This does the trick. Do you eventually take this on the roadmap for implementation on one of the next updates?

Best Regards,
Steve
·
Monday, 11 August 2014 19:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Steve Kraft,

You're welcome, thanks for understand, we will consider to add this in the future.
·
Tuesday, 12 August 2014 01:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post