[RFC|Rejected] database constants hook

These event requests have either been rejected by the community or have become redundant because of code changes or other events requests.
Post Reply
User avatar
tmbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

[RFC|Rejected] database constants hook

Post by tmbackoff » Fri Jun 15, 2012 4:06 pm

There are some MODs that add database constants to /includes/constants.php. Since we are trying to go "MODless" with 3.1, I believe we should add a hook that will allow MOD Authors to add their contants to be included with the other database constants. Placement should be at the end of the file (under the "Additional Tables" line).

Pros: Really? I have to spell it out? :P

Cons: I assume this would be a problem with the current MOD setup in 3.0.x, but it could be possible that an extension adds a database cnstant that is already in use (another extension). Not a big deal, and I don't see it happening that much.

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] database constants hook

Post by Erik Frèrejean » Fri Jun 15, 2012 4:21 pm

Why not simply define them in your extension file when it gets loaded? I honestly can't remember the last time I added a database constant to that file.
Available on .com
Support Toolkit developer

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

Re: [RFC] database constants hook

Post by MichaelC » Fri Jun 15, 2012 4:32 pm

1) You can't put an even in the constants file as its included before the extension manager and events dispatcher.
2) We already added an event for common.php which can be used for this.
3) Please use the template in this topic: viewtopic.php?f=111&t=42685
4) They should use their own constants file like https://github.com/phpBB-Blog/phpBB-Blo ... stants.php (as erik suggested)

As such I'll mark this as rejected for now on the basis an event that can do this already exists.
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