Subscribe: Module: Customize Mail Messages
http://www.phorum.org/phorum5/feed.php?62,123951,type=rss
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
customize mail  customize  file  language file  language  mail messages  mail  messages  module customize  module  phorum 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Module: Customize Mail Messages

Module: Customize Mail Messages



This module can be used to customize the mail messages that are sent out by Phorum. You can also do this by editing the language files, but using this module, you won't have to be afraid of overwriting the modified language file(s) on upgrades. Ch



Last Build Date: Sat, 24 Feb 2018 10:08:17 +0100

 



Re: Module: Customize Mail Messages

Tue, 15 Jun 2010 13:46:23 +0200

Hi Maurice,

your module is not listened in the List of Modules.

Regards
Oliver



Re: Module: Customize Mail Messages

Mon, 31 May 2010 18:23:54 +0200

Hi Maurice,

I've just installed this mod on phorum version 5.2.14 and it doesn't seem to be working quite right. When I reply in a thread I created I get the standard notification message, not my customised version.

The core Phorum is unmodified, but there are a few mods installed, I only have English American installed. Can you give any suggestions as to why this mod isn't working and what I can check ??

EDIT: The PM functionality of the mod is working perfectly so it's just the new post notification.

Thanks, Jon.



Re: Module: Customize Mail Messages

Fri, 23 Oct 2009 18:07:00 +0200

Thanks for your suggestion, Maurice!



Re: Module: Customize Mail Messages

Fri, 23 Oct 2009 17:25:20 +0200

The concept is good, but the way to handle it is wrong. Too much data copying going on. Something like the option to create a file include/lang/-local.php that is loaded in addition to include/lang/.php would make much more sense. Overrides for the main language file could go in the local variety.

But since there's already a language modification module available that allows for tweaking specific messages, I don't see a big need to handle this from core. If there's a big need for a local-style language file, then we could create a module for it. Something like:

Language: PHP
  /* phorum module info hook: common|mod_local_language_file title: Local Language File desc: Loads include/lang/-local.php to override language strings. */     function mod_local_language_file() { global $PHORUM; $language = $PHORUM[';language';]; $custom_file = "./include/lang/$language-local.php"; if (file_exists($custom_file)) { require_once $custom_file; } }   ?>

Save that one in mods/mod_local_language_file.php and activate the module. After that you could copy for example include/lang/english.php to include/lang/english-local.php and do your modifications. A better way would be to override specific language strings. Your local file could for example contain the following:

Language: PHP
$PHORUM["DATA"]["LANG"]["Forums"] = "Phorums"; ?>

See, there's not much to it really. And this is just one of the many ways in which one can tweak language strings.



Re: Module: Customize Mail Messages

Fri, 23 Oct 2009 04:17:00 +0200

Thanks Maurice, I thought a template-related language file to be a good idea for a future Phorum version avoiding possible overwriting.

Thanks for the work-around, Joe!



Re: Module: Customize Mail Messages

Fri, 23 Oct 2009 00:57:04 +0200

I also ran across the need for custom language in my Simple Rounded template. Here is the discussion on how that was accomplished: [www.phorum.org]. Hope that helps you a bit.



Re: Module: Customize Mail Messages

Fri, 23 Oct 2009 00:36:03 +0200

I don't get your question... Do you want the language file to be part of the template data, is that what you're saying? So you are going to copy over all required language files to each and every template that you use? That will be fun to maintain :-/

I guess your question is: "Why isn't it easier to tweak language file entries?", correct? Well, look in the module list. You'll fine a module that, likewise the mail message editor, allows you to change individual language strings that are stored in the database.

If you want language strings to be bound to certain forums, then you need to write a module for that. Really, it's not a hard one at all. Especially if you hard code some entries in the module. All language data is nothing more than a simple array in $PHORUM['DATA']['LANG']. You can tweak that as much as you like from a module. Or even from some code that you put in - for exmple - header.tpl.



Re: Module: Customize Mail Messages

Thu, 22 Oct 2009 20:21:14 +0200

I guess I am sad to be right! Btw, why don't we have the language file connected to the individual template? Thank you!



Re: Module: Customize Mail Messages

Thu, 22 Oct 2009 20:04:18 +0200

Good assumption.



Re: Module: Customize Mail Messages

Thu, 22 Oct 2009 16:25:36 +0200

I assume I cannot include HTML in the Message body...?



Re: Module: Customize Mail Messages

Sun, 04 May 2008 21:18:03 +0200

Great, it was the only explanation I could think of, so I'm happy I was spot on here ; -) I'm working on a script for correctly upgrading the serialized array data to UTF-8. Once I get it rock solid, I'll release that. Without that upgrading script, better stick with iso-8859-1.

BTW: Adding the charset variable to your config.php should work if you use "latin1" as the character set for MySQL.



Re: Module: Customize Mail Messages

Sun, 04 May 2008 20:50:44 +0200

Many Thank's Guru .....

You're so right!
I've used a new config.php file coming from the new realease where a xharset variable is set to utf8 and as in my old one there was nothing for the charset, It was surely the reason of the problem

As previously I was also using iso8859-1 and after the ugrade I saw that some label were not readable I've modified to utf-8, but all was not good!


So Now, I've gone back to a config file without charset variable set and in my language file an iso-8859-1 charset and all is well running (except the editor tool that I can't see - but I will post a question in another thread)

Again many thank's Maurice



Re: Module: Customize Mail Messages

Sun, 04 May 2008 16:15:15 +0200

Old values should be used if the filename (english.php) is the same. The path doesn't matter. Did you by any chance use iso-8859-1 before and UTF-8 now (do you have "utf8" as the charset in config.php or did you reuse your old config?). If that is the case, then it might be that PHP cannot turn the config field value into an array. But only if special characters are in use in the mail message data.



Re: Module: Customize Mail Messages

Sun, 04 May 2008 13:00:48 +0200

Hello,

I've done an upgrade from the 51.6a release to the 5.2.7 release and all my customization that is keeped into the database table "settings", row "mod_customize_mail_messages" is not taken in account when a mail is sent.

Moreover, when I go to see which is the current values for the fileds through the module screen, all remains empty.

So I cannot understand why none of my old values that remain in the database are not viewable after a migration?

I've 2 language files, english and french and for both of them nothing works properly

Is there a link between the values and the absolute name of the language files. Even if they the name of the language files still remains the same, their full name have cahnge because of the directory path containing the release of Phorum.

Previously the full name was www/blabla~/Phorum-5.1.6a/include/lang/english.php
and now it is www/blabla~/Phorum-5.1.7/include/lang/english.php


How can I force the module to take the old values without doing a "new" customization of these variables?


Thank's



Re: Module: Customize Mail Messages

Mon, 03 Mar 2008 08:29:54 +0100

All right, thank you Maurice for having a look at it.



Re: Module: Customize Mail Messages

Mon, 03 Mar 2008 04:04:14 +0100

I looked into this and the problem is that the registration and restore password emails are put in the language file in a different way than the other email messages. Unfortunately, this makes them unfit for customization through this module.



Re: Module: Customize Mail Messages

Thu, 21 Feb 2008 19:14:28 +0100

I know ts77 ;)

But the options by now are:
-User: new pm recieved
-User: new message in a followed thread
-Mod: news messages to approve
-Mod: news messages not to approve
-Mod: reported message

no other mailoptions included... therefore my question / suggestion.

greetings,

Sun



Re: Module: Customize Mail Messages

Thu, 21 Feb 2008 17:18:19 +0100

"customize the mail messages that are sent out by Phorum" - so what is the activation message? ;)



Re: Module: Customize Mail Messages

Thu, 21 Feb 2008 16:48:46 +0100

Nice Mod, thanks Maurice!

A little suggestion: what about system-messages linke the welcome-message?

greetings,

Sun



Re: Module: Customize Mail Messages

Thu, 21 Feb 2008 15:46:19 +0100

Nice ritual and you're welcome ;-)



Re: Module: Customize Mail Messages

Thu, 21 Feb 2008 14:16:24 +0100

Maurice,

It's becoming a ritual, a user asks me if Phorum can do something, I come on this forum and surprisingly find a module.

This last request was to change the wording of the Follow Topic email and this module worked like a charm.

Thanks again, I'll be back ;)



Module: Customize Mail Messages

Mon, 20 Aug 2007 20:32:37 +0200

This module can be used to customize the mail messages that are sent out by Phorum. You can also do this by editing the language files, but using this module, you won't have to be afraid of overwriting the modified language file(s) on upgrades.

Changelog:
----------

2007-06-26 v1.0.0

    - Initial release.