Sortable extension events

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
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Sortable extension events

Post by EXreaction »

This is an administrative decision and a developer decision. Developers must decide when there may be issues of dependencies. Administrators must decide when the question is about ordering. The following example should be possible if we choose to support ordering at all:

1. foobar must run after both foo and bar at location A, where new data structures are created by foo and bar and must be joined together.
2. foobar link can display in the header before foo and/or bar.

1. must be supported or creating extensions of extensions will be a rather awful experience.
2. should be supported if we want administrators to have the ability to do things like reorder navigation

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: Sortable extension events

Post by PayBas »

Interesting:
<Nicofuma> paybas: about https://area51.phpbb.com/phpBB/viewtopi ... 08&t=45227 the developper can set a priority to his php listeners
<Nicofuma> ('core.permissions' => array('add_permissions', -255) : -255 is the priority, set to 0 by default )
<PayBas> really? since when?
<Nicofuma> since symfony allow the priorities ^^
<PayBas> and negative is "earlier" and positive is "later"?
<Nicofuma> nagative means later

User avatar
Pico88
Registered User
Posts: 73
Joined: Tue Apr 12, 2011 2:32 pm

Re: Sortable extension events

Post by Pico88 »

That can solve core events, but the main aim of that topic is make a possibility to sort template events ;)

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Sortable extension events

Post by Senky »

In fact, ordering of php events is less relevant, than template ones. Template events sorting is visible to all users, and very personal to every board. But having system ordering template events, I would add php events to that system as well.
Anyway, since I have some experience with wordpress priority system, I must admit, that it is not of the best - it uses the same system as Nicofuma and PayBas discussed (plugin developer decides about priority number). Regularly happens, that site admins must change priority numbers in plugin code directly. In phpBB, I would love to see it in ACP, so that, as everything else, admins do not need to open their FTPs at all.

User avatar
martti
Registered User
Posts: 45
Joined: Wed Aug 20, 2014 4:50 pm
Location: Belgium

Re: Sortable extension events

Post by martti »

How about: developers set defaults (optionally, only when there's a reason for it) and admins can overrule?

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Sortable extension events

Post by MattF »

martti wrote:How about: developers set defaults (optionally, only when there's a reason for it) and admins can overrule?
What developers can do is set priorities which they should only do in cases where they find that their extension is conflicting with another one, causing one of the extensions in question to break/fail.

What should be up to admins, is like when they have an advertisement extension adding a banner ad above the forums... and they have an announcements extension adding announcements, also above the forums...and the announcements are above the ads, but the admin would prefer the ads be above the announcements instead.

Those sort of issues can only be resolved by the admin, because it's the admin who wants to personalize the order/appearance of their extensions. However there is not yet any mechanism for admins to control this order.

Extensions SHOULD NOT be trying to enforce their own priority ever (except in the rare cases of proven conflicts) otherwise an ugly "me-first" mentality will metastasize among some ext devs, and that could hurt the community as a whole and possibly spoil our new extensions system. :oops:
Has an irascible disposition.

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Sortable extension events

Post by Senky »

VSE is right. Only admins should manage the priority system and all new extensions should go to the very end of the priority list for particular events when enabled.

User avatar
P_I
Community Team
Community Team
Posts: 134
Joined: Fri Oct 31, 2014 4:56 am

Re: Sortable extension events

Post by P_I »

Agree that VSE is right. I don't think the developer should control the order, the site appearance is the administrator's responsibility, so they should have some level of control/customization.

Was anything ever implemented to give the administrator control over the order/appearance of extensions? I'm running into this exact problem as both a developer and administrator.

I'm suspecting many forums will install the Board Rules extension. If so, I'm thinking they'd want the Rules link to end up beside the FAQ link. Moderators and/or admins would probably also expect the next links to be ACP then MCP. These are all official phpBB elements, so probably should group together. Then third-party supplied links should probably follow.

KillBill.
Registered User
Posts: 20
Joined: Wed Feb 11, 2015 6:07 am

Re: Sortable extension events

Post by KillBill. »

Sortable extension events
I think it's necessary +100

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Sortable extension events

Post by Senky »

Pico88 wrote: Sun May 25, 2014 7:59 pm That can solve core events, but the main aim of that topic is make a possibility to sort template events ;)
Did you create a PR for this case?

Post Reply