Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13448

\phpbb\messenger->template can't find email templates in extensions

    Details

      Description

      When an extension tries to use email templates (ext/vendor/ext/language/en/email/template.txt) and that template is called via

      $messenger->template('template', 'en');

      you get an error (file not found) because the messenger only looks in phpBB's language folder, and not within extensions.

      It needs a way to know to look at ext/vendor/ext/*
      Something perhaps like with languages,

      $messenger->ext_template('vendor/ext', 'template', 'en');

      ?

        Activity

        Hide
        nickvergessen Joas Schilling added a comment -

        Already possible as per Elsensee:
        https://github.com/phpbb/phpbb/pull/3256#issuecomment-68646616

        $messenger->template('@vendorname_extname/templatefile', $lang);

        Show
        nickvergessen Joas Schilling added a comment - Already possible as per Elsensee: https://github.com/phpbb/phpbb/pull/3256#issuecomment-68646616 $messenger->template('@vendorname_extname/templatefile', $lang);
        Hide
        Elsensee Oliver Schramm added a comment -

        The question is: why is this necessary in messenger class but not in controller_helper class?

        Show
        Elsensee Oliver Schramm added a comment - The question is: why is this necessary in messenger class but not in controller_helper class?
        Hide
        nickvergessen Joas Schilling added a comment - - edited

        Because in the controller_helper class we the extensions paths are registered to the template engine...

        Show
        nickvergessen Joas Schilling added a comment - - edited Because in the controller_helper class we the extensions paths are registered to the template engine...

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            VSE Matt Friedman
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development