Template engine changes to allow for structure flexibility

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Template engine changes to allow for structure flexibility

Post by DavidIQ »

You do know that even if the structure is split into many files, as suggested in this topic, template files would take up less than 1% of a user's server quota right? Server space is not an issue anyone needs to be concerned with when it comes to what is covered in this topic. And how permissions are even remotely relevant to this topic is beyond me... :-|
Image

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Template engine changes to allow for structure flexibility

Post by MichaelC »

nickvergessen wrote:The question is, do we even want multi-inheritance, from my dev perspective I'd say no. If you inherit from a stlye that does something odd, just overwrite it again. There is no need for having 2 inheritance parents.
And as for custom structure, just make a good default one? You can structure your files like you want, if you just add a file with the original name and do a <!-- INCLUDE fancy/* -->

Both do not make up the negative impact from having the huge list, for me
Please can you summarise a list of these negative points as so far the only thing you've said is that it could cause merge conflicts when two new templates are added in the same place whereas we've listed numerous advantages to doing things this way.

Can we also please all keep open minds and have reasoned debate as I've seen in a couple of places you saying 'This must go' or 'This is not happening' with no reasoning - I'm open to being convinced this is not the best course of action however to be convinced there needs to be a valid alternative solution which solves the problems we've highlighted previously in this topic or a number of solid disadvantages which outweigh the advantages beyond 'it could cause merge conflicts very occasionally'.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

Marshalrusty
Project Manager
Project Manager
Posts: 273
Joined: Thu Oct 27, 2005 1:45 am

Re: Template engine changes to allow for structure flexibility

Post by Marshalrusty »

developer11, nobody is suggesting increasing the number of files in phpBB by orders of magnitude, which is the only way for disk quotas to apply anywhere in this discussion. All modern filesystems supporting storing billions or trillions of files. If your hosting requires you to worry about file counts on the order of thousands, then the problem is the hosting.

I also see that a good number of your posts are quite aggressive. You should reconsider how you're approaching informing us of your opinion, as it's coming off as hardly constructive.

developer11
I've been banned
Posts: 17
Joined: Tue Dec 09, 2014 10:25 am

Re: Template engine changes to allow for structure flexibility

Post by developer11 »

Marshalrusty wrote:developer11, nobody is suggesting increasing the number of files in phpBB by orders of magnitude, which is the only way for disk quotas to apply anywhere in this discussion. All modern filesystems supporting storing billions or trillions of files. If your hosting requires you to worry about file counts on the order of thousands, then the problem is the hosting.

I also see that a good number of your posts are quite aggressive. You should reconsider how you're approaching informing us of your opinion, as it's coming off as hardly constructive.
Im not aggressive (your statement) cause I do offend noone here (nor elsewhere). Im just explaining my point of view/how should things be.
I just do not like many aspects of phpbb development process and Im expressing it.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: Template engine changes to allow for structure flexibility

Post by Pony99CA »

developer11 wrote:Im not aggressive (your statement) cause I do offend noone here (nor elsewhere). Im just explaining my point of view/how should things be.
I don't want to get too far off-topic here, but there's a difference between "aggressive" and "offensive". You can be aggressive without being offensive, and vice versa.

For example, in this post of yours, you said that this was a "must-do ASAP" change, that the current way was "absurd" and that not fixing it was "scandalous". That's not only aggressive, it could be offensive (especially the "scandalous" part).
developer11 wrote:I just do not like many aspects of phpbb development process and Im expressing it.
Fine, but as far as we know, you're a newbie here (just registered yesterday). So to come and say to "do this ASAP" is pretty aggressive. It doesn't mean that you're wrong, just that you're not presenting your case in a way to win people over. ;)

And, of course, all of that is your opinion; others may have different ideas of how things should be.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

developer11
I've been banned
Posts: 17
Joined: Tue Dec 09, 2014 10:25 am

Re: Template engine changes to allow for structure flexibility

Post by developer11 »

@Pony99CA:

for me, if you are aggresive you are offending others, and vice versa.
Yes its my point of view how thins should be - Im just expressing it.....

User avatar
Sven2157
Registered User
Posts: 2
Joined: Thu Apr 02, 2015 9:30 pm

Re: Template engine changes to allow for structure flexibility

Post by Sven2157 »

PayBas wrote:To give some example of what I mean (this is just an early WIP, please don't look into it too much), just imagine having to refactor prosilver to something like this:
1.png
PayBas,

I use phpStorm, as it looks like you do too ( maybe WebStorm ). How did you associate HTML files with TWIG? Did you just redefine all HTML to use TWIG syntax?

I have never used phpBB before, and am working on a project that has this. I was pleasantly surprised to see that 3.1 silently integrated Twig. However I can't get code completion, nor syntax highlighting, to work, because the files are all .html and not .html.twig. If I change the overall_header.html to overall_header.html.twig, it breaks the site, but give the aforementioned result.

I for one am very pleased to see the switch to Twig. It is one of the reasons ( Symfony and Composer are two other ), that I have recommended the switch to phpBB >3.1+ to others in my development circle.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: Template engine changes to allow for structure flexibility

Post by brunoais »

@Sven2157
Use hardlinks.
Make hardlinks between the files. For example:
Make a hardlink between:
overall_header.html
and:
overall_header.html.twig

How you do hardlinks depends on your OS.

User avatar
Sven2157
Registered User
Posts: 2
Joined: Thu Apr 02, 2015 9:30 pm

Re: Template engine changes to allow for structure flexibility

Post by Sven2157 »

@brunoais

Thanks for the reply. I actually posted that on April 4, 2015. It was held for moderation, until the other day - Tuesday, April 13, 2015. That never actually occurred to me; pretty clever.

In my case, I found a solution a couple days after I posted. I just associated all HTML files as TWIG. This has no affect on regular HTML files, and since I also use Laravel, the BLADE template engine uses PHP extensions ( or with some quick changes, can use TWIG, as well ).

Not sure how it will play out with Angular JS though ... :? Guess I will have to see if I cross that bridge.

Thanks!

- Sven2157

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: Template engine changes to allow for structure flexibility

Post by brunoais »

I advice you not to use AngularJS with phpBB. AngularJS is meant for client-side applications. IIRC, it also forces breaking web pages' HTML (which I hate).

Post Reply