Using template event files in styles

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
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.
Post Reply
leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Using template event files in styles

Post by leschek »

As the phpBB Ideas page is still not available I'm writing here.

I think it would be nice to be able to use template event files in styles in the same way as they are used in extensions. I can imagine that users would create folder called "event" in template folder in style (or substyle) and in it they could create html event files with some custom code, so they wouldn't have to edit core files of style. Also, it would be easier for users to update changed styles to newer version as new custom code would be in separate files.

User avatar
javiexin
Registered User
Posts: 90
Joined: Thu Dec 22, 2011 10:04 am

Re: Using template event files in styles

Post by javiexin »

Wouldn't this be as simple as creating a new extension directory, a new composer.json file, enable it as an extension, and there you go: just put whatever template events you want to customize in the styles folder of that "empty" extension...

I might have left some minor detail (maybe create the ext.php file, but I am not positive it is required), but conceptually, this would be almost exactly what you are asking for, only in a different folder (under ext/ instead of under styles/).

-javiexin

leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: Using template event files in styles

Post by leschek »

Thank you for reply.
javiexin wrote: Sun Jul 12, 2015 11:44 pm Wouldn't this be as simple as creating a new extension directory, a new composer.json file, enable it as an extension, and there you go
No. I think it would be simpler (and for users easier) to create only one directory in template folder and (to me) it seems to be more logical to edit style in style directory than to create extension for it and edit files in extension. But you are right, it's possible to create extension for editing styles.

Khaos-Rage
Registered User
Posts: 35
Joined: Wed Aug 06, 2014 12:27 am

Re: Using template event files in styles

Post by Khaos-Rage »

This has been done already.

Extension Name: Custom Code

Extension Description: Allows to add custom template code on template event locations.

leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: Using template event files in styles

Post by leschek »

Khaos-Rage wrote: Mon Jul 13, 2015 6:08 pm This has been done already.

Extension Name: Custom Code

Extension Description: Allows to add custom template code on template event locations.
While I like that extension it is different thing. For example there is only limited number of events user can use.

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

Re: Using template event files in styles

Post by DavidIQ »

Doesn't sound like a bad idea. I imagine it would simply contain user created files that have the template event name just like extensions do it. Then those forum administrators that just want to add a simple menu item, for instance, without the complexities of an extension can just do so.

I would lay out the details in a tracker ticket if I were you.
Image

Post Reply