- Код: Выделить всё
<?php namespace webliberty\credit\event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class listener implements EventSubscriberInterface { protected $template; public function __construct(\phpbb\template\template $template) { $this->template = $template; } static public function getSubscribedEvents() { return array( 'core.page_footer' => 'page_footer' ); } public function page_footer($event) { $this->template->assign_vars(array( 'CREDIT_LINE' => '<a rel="nofollow" target="_blank" href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited' )); } } ?>
Почему строка не меняется? По аналогии делал с каноникал и все получилось, а здесь никак. В самом файле functions.php есть строки:
- Код: Выделить всё
// A listener can set this variable to `true` when it overrides this function $page_footer_override = false;
Добавление в listener.php строки:
- Код: Выделить всё
$page_footer_override = true;
не спасает и даже замена в самом файле functions.php все равно не производит замену строки.
Конечно, все это легко и просто вручную переделывается в шаблоне, но хочется реализовать расширением, чтобы меньше проблем при обновлении было. Подскажите, как реализовать
