Changing template content berfore parsing on the fly

Discussion forum for MOD Writers regarding MOD Development.
User avatar
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany

Changing template content berfore parsing on the fly

Post by th23 »

Hi together,

I am currently struggeling with a change that was made in the original phpBB code a while ago...changing the way of template for mails being handled.

Before that change I was passing a custom message (admins have been able to modify the standard mail sent to users before being sent out via the ACP) to the messenger instance by using the following code:

Code: Select all

					$messenger->msg = $data['message'];
After that it was parsed by the template engine replacing variables like the board URL, activation link, etc. and sent out to the user.

How can I achieve that with the new way mail templates are handled as an object?

Code: Select all

		$this->tpl_obj = &$this->tpl_msg[$template_lang . $template_file];
Is there any way of defining the template content without doing changes in the includes/template.php file itself and therefore changing the way templates are handled?

Thanks for your help :)

Life is what happens...while you're busy making other plans!

Return to “[3.0.x] MOD Writers Discussion”