qubeshub / hubzero-cms

HubZero CMS code base for QUBESHub.
https://qubeshub.org
GNU General Public License v2.0
0 stars 1 forks source link

Refactor forum digest #356

Open mdlama opened 3 weeks ago

mdlama commented 3 weeks ago

NOTE: App overrides do not exist for mail views!!

Example:

This gets called in core/plugins/cron/forum/forum.php::sendEmail:

$eview = new Hubzero\Mail\View(array(
            'base_path' => Component::path('com_forum') . DS . 'site',
            'name'      => 'emails',
            'layout'    => 'digest_plain'
        ));

Unfortunately, template overrides don't work here (i.e. app/templates/bmc/html/emails/digest_plain.php won't get called).

Solution:

Override Hubzero\Mail\View in a similar fashion to Hubzero\View\View.

mdlama commented 3 weeks ago

Actually, I think app overrides still work. Group announcements plugin calls Hubzero\Mail\View, with base_path = __DIR__, i.e. once we override cron forum plugin and it is in the app directory, the base_path will point to the correct place.