[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 »

I like naderman's new suggestion.

I'll also rename RUNHOOKS to EVENT now to get it done with.

Also if everyone agrees with naderman's implementation I'll change all existing events to use it.
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 »

I liked the extract() on a new line more, as you saw $event at the line beginning which helps finding it, but aslong as its called something with events (nadermans latest suggestion) i'm also fine with it.
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 »

(11:20:10) nn-: naderman: my only issue with that is people accidentally screwing up the magic bits
(11:20:31) nn-: but i guess all of *that* code will be reviewed by us making it potentially a non-issue
(11:21:17) nn-: oh just noticed method rename
(11:22:14) nn-: yes i wanted a different function name for the version that filters
(11:22:21) nn-: and potentially has a different api
(11:22:36) nn-: trigger_event seems to be a good choice

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

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

Post by igorw »

I personally prefer the initial more explicit version, but renaming the special method to something other than `dispatch` addresses my main concern of changing the semantics.

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 »

RUNHOOKS is now EVENT

All php events have been updated to naderman's suggestion and all template hooks to EVENT
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 »

On question that came up recently is, who we are going to deal with hooks while installing/updating(3.1.0 to 3.1.1) the board.
F.e. when we add a user it might be good to have the hooks running.
Member of the Development-TeamNo Support via PM

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:On question that came up recently is, who we are going to deal with hooks while installing/updating(3.1.0 to 3.1.1) the board.
F.e. when we add a user it might be good to have the hooks running.
Why would you add a user with updating? Personally I think its a bad idea allowing hooks to run while updating.
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 »

Well we added some bots latly and when we add a bot we call user_add ;)
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 »

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

Thoughts?
Was this done? If not I'm inclined to agree to add core_ for template events.

Post Reply