Changing text in email notification

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Changing text in email notification

Post by chrajsiel »

Hi,

Is it possible to change the content of the email notification received by the admin? Is it possible to add the title of the FAQ when a comment is posted?

Thanks!

chrajsiel
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Changing text in email notification

Post by Thorsten »

Hi,

currently only by hacking the sources

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

Thanks Thorsten.

Can you tell me which file I should look at to change the email text?

Regards,

chrajsiel
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Changing text in email notification

Post by Thorsten »

Hi,

sure, please tell me which version do you use.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

Hi Thorsten,

Version 2.7.9

Thanks!

chrajsiel
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

Hi Thorsten,

Can you kindly tell me which files I need to "hack" to change the texts in the email notification especially for Comments and Add FAQ?

We are using version 2.7.9.

Thanks and regards,

chrajsiel
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Changing text in email notification

Post by Thorsten »

phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

Thanks Thorsten.

Is this where we should look for the comment email notification as well? I've been searching this file but can't find it.

This is what we get when someone comment on an article. This is all in one line and I would like to have a user-friendly format. Also, the link does not work when clicked.

User: xxxx@test.com, mailto:xxxx@test.com New comment posted on: http://localhost/test/faqsitename?actio ... artlang=en

Thanks again!

chrajsiel
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

This one too Thorsten. Can you please tell me if which file I can modify to change the email text when someone comments on an article? language_en does not contain that.

Thanks again.

chrajsiel
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Changing text in email notification

Post by Thorsten »

Hi,

sorry, this is also in ajaxservice.php

If you have a better idea how to text these mails, just tell me :)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

thanks Thorsten.

For everything, if it is possible to add the title of the FAQ, that would be great.

For comments, at least the link should work. Currently, it doesn't.

Thanks and regards,

chrajsiel
chrajsiel
Posts: 44
Joined: Tue Nov 06, 2012 1:53 pm

Re: Changing text in email notification

Post by chrajsiel »

Found it!

Reason why the link does not work is because of "amp;" (?action=artikel&cat=%d&id=%d&artlang=%s'). I removed them ('?action=artikel&cat=%d&id=%d&artlang=%s') and the link works. I've also added the $oLink->itemTitle in the $commentMail to include the faq title.

Just want to share if anyone is asking the same question.

Now, I'll look on how to also include the FAQ title and category at the Add FAQ email notification.

Thanks Thorsten!

chrajsiel
daemontux
Posts: 4
Joined: Tue Mar 19, 2013 10:58 pm

Re: Changing text in email notification

Post by daemontux »

I would like to have article title and category in the emails as well. Did you find a way of accomplishing this?
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Changing text in email notification

Post by Thorsten »

Hi,

the question is in

Code: Select all

$faq->faqRecord['title']
, the category name is a little bit tricky, because the FAQ can be in various categories. Just check the content of the $categories array (line 188 in ajaxservice.php)

Cheers
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply