[RFC|Merged] General Hook Architecture of phpBB3.1

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by MichaelC »

(10:26:25 AM) unknownbliss: What should I call the column? Array keys?
(10:26:47 AM) nn-: i don't think we settled on terminology there
(10:26:51 AM) unknownbliss: ok
(10:27:26 AM) nn-: is "data variables" confusing?
(10:27:37 AM) nn-: data keys?
(10:27:49 AM) nn-: arguments?
(10:27:59 AM) unknownbliss: Data Arguments?
(10:28:00 AM) nn-: i guess you can call them arguments as arguments can be both in and out
(10:28:04 AM) unknownbliss: ok
(10:28:11 AM) nn-: or parameters
(10:28:14 AM) nn-: i don't know
(10:28:21 AM) nn-: maybe solicit some other opinions
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.

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by brunoais »

^
parameters

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by MichaelC »

Oleg wrote:
igorw wrote:The template hooks (which are really quite different to the PHP hooks) is loosely described in [RFC] hook_template_snippet.
I read that again and I think I will rename RUNHOOKS to REGION.
I think run hooks is more descriptive.
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.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by nickvergessen »

It would be very handy for the MOD authors, if the files for template hooks are not in template/ but in some kind of sub-directory. I'd suggest to add template/hooks/

For the record, I'd also prefer RUNHOOK over REGION
Member of the Development-TeamNo Support via PM

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by Oleg »

What about using LEDGE instead of RUNHOOKS/REGION?

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by MichaelC »

nickvergessen wrote:It would be very handy for the MOD authors, if the files for template hooks are not in template/ but in some kind of sub-directory. I'd suggest to add template/hooks/
+1
Oleg wrote:What about using LEDGE instead of RUNHOOKS/REGION?
+1
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.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by Oleg »

I implemented template-specific template hooks:

https://github.com/p/phpbb3/compare/cdf5f7...64ab21

This works in the absence of template inheritance.

(00:39:10) nn-: now, the question is how that should interact with inheritance
(00:39:18) nn-: say i have bluesilver based on prosilver
(00:39:48) nn-: if my extension hooks prosilver and user has bluesilver as their style should my extension be run?
(00:40:11) nn-: what if bluesilver requires a different edition of my extension, how do i run bluesilver version while not running prosilver version?
(00:40:50) nn-: what if bluesilver version was written by a third party and the board uses both prosilver and bluesilver, in which case both my extension exists (having no bluesilver templates) and a separate extension exists with bluesilver templates only, which templates should be rendered?

I added template-specific template hooks to https://github.com/p/phpbb3-ext-overall-header-addition, along with usage instructions.

For some reason my all hook does not appear to be rendered in acp, need to investigate that.

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by MichaelC »

Docs are all done except for how to create a hook which I'm waiting for an example hook from oleg/igorw first.

Ledges are currently being worked on by Joas and I and currently we have added plenty.

At the moment some work is being done on the ledges request forum to rename and utilise it.

A topic should probably be posted over on phpBB.com in MOD Writers about ledge requests?
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.

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

Re: [RFC|Accepted] General Hook Architecture of phpBB3.1

Post by MichaelC »

We have a core. prefix for php ledges but not for template ledges. I propose we have a core_ prefix for template ledges.

Thoughts?
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.

Post Reply