Hey Guys,
So I've been looking at changes made into 3.1 branch and I'm impressed. One thing bothers me:
https://wiki.phpbb.com/New_Template_Commands_in_3.1
I have been checking this code and trying to inject some code into my extension template admin interface.
Is it possible for example to inject some external css into admin template without modifying core template ?
That would be a huge advantage. It would allow to create custom admin interfaces within the current template. Is it possible ?
Inject code into admin template
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: Inject code into admin template
You can use template events to inject code, including INCLUDECSS and INCLUDEJS calls. Check this page and scroll to "Added ACP Template Events". Note that the list may be out of date, so check in the template file where you need an event and do a search for
<!-- EVENT
to see which events are available in that file. If there is not an event where you need one, you can request it in the [3.x] Event Requests forum (read the sticky). And, if you'd like, you're welcome to create a PR yourself to add the event so that it doesn't just get added to the backlog.- nickvergessen
- Former Team Member
- Posts: 733
- Joined: Sun Oct 07, 2007 11:54 am
- Location: Stuttgart, Germany
- Contact:
Re: Inject code into admin template
https://github.com/phpbb/phpbb/blob/dev ... /events.md should always be up to date
Member of the Development-Team — No Support via PM