How to change text in a default forum notification?

How to change text in a default forum notification?

Nataliya Bukhanova -
回帖数:10

Hi all,

I wonder if it is possible to change the text of a default forum notifications about posts and in digests. So far, I found only how to change the topic line but not the text itself.

Thank you!

Nataliya.

回复Nataliya Bukhanova

Re: How to change text in a default forum notification?

Helen Foster -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 Translators的头像

Hello,

What is the exact text that you would like to change?

回复Helen Foster

Re: How to change text in a default forum notification?

Nataliya Bukhanova -

Hi Helen,

I want to add some text in addition to the links to make it more friendly.

Nataliya.

回复Nataliya Bukhanova

Re: How to change text in a default forum notification?

Jon Bolton -
Testers的头像
The forum email templates are in /mod/forum/templates on your server, but editing the core code files is not a good idea unless you really know what you’re doing. You’ll also need to replicate any changes each time you upgrade.
回复Jon Bolton

Re: How to change text in a default forum notification?

John Provasnik -
Particularly helpful Moodlers的头像 Testers的头像

Jon, is this something we can raise a tracker for? Meaning, to add a administration menu link to edit some basic content of the forum emails? My concern is I can't style the emails - the font size changes from post to post depending on if anyone added images into the text editor versus the file upload spot making it challenging to read on the phone (have to keep expanding to zoom in to be able read some posts, then have to pinch to zoom out to read others. 

wondering if anyone else would find it useful to be able to made some minor changes, such as even have the school logo at the top of the email. 

If this is far to complex for a simple tracker then I'd understand, just wondering if it's possible before I put one in. 

回复John Provasnik

Re: How to change text in a default forum notification?

Helen Foster -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 Translators的头像

Hi John,

You're welcome to create a tracker issue suggesting a new feature (after searching to make sure nobody has suggested it already). Please see the guide New feature ideas for suggestions of how to maximize the chance of your idea being implemented.

回复John Provasnik

Re: How to change text in a default forum notification?

Jon Bolton -
Testers的头像
Yes, it probably would be a useful feature - but is suspect it’s fairly low on the list of priorities for the forum as there is a bit of an overhaul of forum activity thanks to the work commissioned by the MUA (changes introduced in 3.7 and there are more planned for 3.8).

I had to change the templates on my sites because of legal notices, GDPR statements and opt out links that had to go out on all emails 🤯
回复John Provasnik

Re: How to change text in a default forum notification?

Daniel Thies -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Templates are actually made to be overridden so that you can safely edit them and not have them overwritten by an upgrade by placing them in your theme.
To override the forum templates, create a subdirectory in your theme's templates directory named mod_forum, copy the template files you want to change in mod/forum/templates to this new directory, and edit the new files. The new files will be used instead of the core ones. If you use git for upgrades or unzip over the top of the old version when upgrading these files will not be affected. Otherwise just make sure to copy the new directory files when you upgrade.
回复Nataliya Bukhanova

Re: How to change text in a default forum notification?

Ralf Hilgenstock -
Core developers的头像 Particularly helpful Moodlers的头像 Translators的头像

Nataliya

There are several types of notifications.

  • Single post mail. Each mail will have the same text.
  • Daily digest via mail. Each post in the digest will have the same text even if there a dozen of post  a day in the digest.
  • Notification via messages instead of mail.
  • Notification in moodle app.
  • Rss feed from forum.

What makes sense if a student is getting three posts per week? What makes sense if there are three post per hour