Child themes and child extensions

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.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.
Post Reply
samwisesk8r
Registered User
Posts: 11
Joined: Sat Aug 23, 2014 7:24 pm

Child themes and child extensions

Post by samwisesk8r » Sun Mar 06, 2016 10:11 pm

Can we override templates in a child theme or just the CSS?

Also, is there some kind of extension inheritance?

For example, can I create a new extension from an existing extension (that will be normally updated) and then override some of its template files?

I would like to modify template files of extensions without the danger of affecting my modifications upon an update.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1828
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Child themes and child extensions

Post by DavidIQ » Mon Mar 07, 2016 5:17 am

If you create a style that inherits from another then each template file that you create overrides the parent's template file (because for style inheritance you don't have to copy all of the files).

As far as extensions go there isn't really a way to do that. You could maybe keep a separate file with whatever changes you're doing and then call those from the listener but that would obviously require edits to the extension files. If they're the style events you could just create a folder for your specific style with the changes to the events.
Image

samwisesk8r
Registered User
Posts: 11
Joined: Sat Aug 23, 2014 7:24 pm

Re: Child themes and child extensions

Post by samwisesk8r » Thu Mar 10, 2016 10:06 am


User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1828
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Child themes and child extensions

Post by DavidIQ » Thu Mar 10, 2016 1:07 pm

I don't think we'd do anything about it. It would be up to the extension author to add events and such to their extension. Otherwise there'd be no way to do what you're asking for, other than duplicate most of it separately, which is already possible.
Image

samwisesk8r
Registered User
Posts: 11
Joined: Sat Aug 23, 2014 7:24 pm

Re: Child themes and child extensions

Post by samwisesk8r » Thu Mar 10, 2016 1:41 pm

Then is there some guide for creating extension addons? (And if there isn't one, how about making one?)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1828
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Child themes and child extensions

Post by DavidIQ » Thu Mar 10, 2016 4:09 pm

The principles behind making extensions of extensions is the same as making a normal extension, for which guides already exist. You would just need to name the events accordingly. And, again, if there are no events in the extension then you wouldn't be able to modify or override functionality. For that you would need to speak to the extension author.
Image

Post Reply