Adding code to head part of HTML tree

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
mpaw
Registered User
Posts: 141
Joined: Mon Sep 16, 2019 1:09 pm

Adding code to head part of HTML tree

Post by mpaw »

Hi.

I'd like to create extension which will need to add few lines to head tag in HTML tree of forum. There will be need to insert includes of CSS and js files.

How can I achieve it?

Thanks
Mike
User avatar
AlfredoRamos
Recognised Extension Developer
Posts: 1302
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Adding code to head part of HTML tree

Post by AlfredoRamos »

Hi :wave:

To include a style sheet file, you could use the overall_header_head_append event and call the INCLUDECSS function.

To include JS files, you could use the overall_footer_body_after event and call the INCLUDEJS function.

- Extension development documentation: https://area51.phpbb.com/docs/dev/3.3.x ... index.html
- Event list: https://area51.phpbb.com/docs/dev/maste ... ate-events
- Including CSS and JS in template files: https://area51.phpbb.com/docs/dev/3.3.x ... -css-files
Some of my phpBB extensions:
:chart_with_upwards_trend: SEO Metadata | Image Markdown | :shield: hCaptcha
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user | Linux Boards :penguin:
Post Reply

Return to “[3.2.x] Styles Support & Discussion”