[RFC|Merged] Extensions

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|Merged] Extensions

Post by MichaelC »

DavidIQ wrote:
Unknown Bliss wrote:
DavidIQ wrote:You mean the name of the extension? How are you going to ensure it's unique? Maybe an additional identifier should be used like the permalink.
Yes, the clean name of the extension that is in the directory and manifest (Human Name is also in the Manifest).
The unique constraint and the primary key would make it so it has to be unique too.
Permalink to what? Why would it need a permalink as the link is always the extension directory followed by the extension name...
I'm talking about where the extension repo will be at. You need to think about the correlation between what's installed and what is available for installation in the repo, wherever it may be.
I did briefly think about that, but how likely is it you will have two MODs with the same name that you would want to have installed at the same time?

And names have to be unique as the name is the directory, there isn't really any way around that.
callumacrae wrote: Hash!
That would be pointless. It doesn't need to be private, it isn't fail-safe and all the SQL DBs the phpBB supports have the UNIQUE Constraint and Primary Keys.
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
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC|Merged] Extensions

Post by DavidIQ »

Consider the following:
I have my current MOD, ReIMG Image Resizer, and decide to rename it "ReIMG Image Resizing". Now the names don't match. That means I'll be able to install it twice? Of course the differences are minimal so any sane admin should be able to tell the difference but other things might be affected by this change in the name. For instance the version checking of the extension might no longer work so I'll have version 4.0 released and admins won't know because I slightly changed the name.

That is the sort of scenario I'm talking about. This gets way more complicated when you think about the fact that admins are supposed to be able to switch which repo they're looking at. Now the names are either shared, different due to language changes, or don't match at all.
Image

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

Re: [RFC|Merged] Extensions

Post by MichaelC »

DavidIQ wrote:Consider the following:
I have my current MOD, ReIMG Image Resizer, and decide to rename it "ReIMG Image Resizing". Now the names don't match. That means I'll be able to install it twice? Of course the differences are minimal so any sane admin should be able to tell the difference but other things might be affected by this change in the name. For instance the version checking of the extension might no longer work so I'll have version 4.0 released and admins won't know because I slightly changed the name.

That is the sort of scenario I'm talking about. This gets way more complicated when you think about the fact that admins are supposed to be able to switch which repo they're looking at. Now the names are either shared, different due to language changes, or don't match at all.
Titania doesn't support end-users changing their contribution names?
Also I doubt that titania and phpBB integration will get into 3.1 because of the fact the MOD Installer (due to it being a blocker but its blocked by all the other blockers) will probably be one of the last things made and it will be made as quickly and barebones as possible.
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|Merged] Extensions

Post by Oleg »

DavidIQ wrote:Consider the following:
I have my current MOD, ReIMG Image Resizer, and decide to rename it "ReIMG Image Resizing". Now the names don't match. That means I'll be able to install it twice?
Probably yes, but if the author changed permalink at the same time you could still install it twice.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC|Merged] Extensions

Post by DavidIQ »

Oleg wrote:
DavidIQ wrote:Consider the following:
I have my current MOD, ReIMG Image Resizer, and decide to rename it "ReIMG Image Resizing". Now the names don't match. That means I'll be able to install it twice?
Probably yes, but if the author changed permalink at the same time you could still install it twice.
True. However it would be less likely that an autor would change the permalink or hash than if they changed the name of their contribution. The permalink assignment can be handled by Titania as well so they wouldn't need to add it at upload time.
Unknown Bliss wrote:Titania doesn't support end-users changing their contribution names?
Also I doubt that titania and phpBB integration will get into 3.1 because of the fact the MOD Installer (due to it being a blocker but its blocked by all the other blockers) will probably be one of the last things made and it will be made as quickly and barebones as possible.
Titania supports those having permissions to do so to change the contribution names. Even if that wasn't possible there are other repos in other languages in which the owners of those repos usually change the names of the contributions to conform to their language. I've seen this on some IST sites.

If you guys want to make the primary key the extension name that's fine but I can almost guarantee that it will come back to haunt us...
Image

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

Re: [RFC|Merged] Extensions

Post by MichaelC »

The name would have to be unique anyway. This isn't just an issue of oh lets use this as the identifier. It has to be unique anyway as it gets the contribution name from the directory, not the manifest, it just exists in the manifest for reading purposes (I'll make sure to mention this in the spec).

So the user could just re-name the directory and they can install both extensions.
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
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Merged] Extensions

Post by imkingdavid »

Unknown Bliss wrote:So the user could just re-name the directory and they can install both extensions.
Not exactly. The class names are tied directly to the file structure (for autoloading purposes, for one, but also for the front controller).

For instance, a class at: ./ext/foobar/i_am_a_class.php would be phpbb_ext_foobar_i_am_a_class. The controller looks in, for instance, ./ext/foo/controller.php, so it requires a class called phpbb_ext_foo_controller. If you change the directory to "bar", it would look for phpbb_ext_bar_controller. Which would not exist. Which would cause problems.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

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

Re: [RFC|Merged] Extensions

Post by MichaelC »

imkingdavid wrote:
Unknown Bliss wrote:So the user could just re-name the directory and they can install both extensions.
Not exactly. The class names are tied directly to the file structure (for autoloading purposes, for one, but also for the front controller).

For instance, a class at: ./ext/foobar/i_am_a_class.php would be phpbb_ext_foobar_i_am_a_class. The controller looks in, for instance, ./ext/foo/controller.php, so it requires a class called phpbb_ext_foo_controller. If you change the directory to "bar", it would look for phpbb_ext_bar_controller. Which would not exist. Which would cause problems.
Ah yes, I forgot about that, sorry. The user would have to rename it in a few instances but this could be done easily by adding an FAQ or to the MOD Description or as a sticky support topic on where to rename it as the MOD author would probably realise/notice.
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
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Merged] Extensions

Post by imkingdavid »

Ultimately, the Customisations Database should keep track of what folder name is used by each extension and disallow the submission of another extension that wants to use the same one.

Perhaps a new little tool to check to see if a name is available? (I.e. "Enter a name: ______", "Sorry, that name is taken, please try another one." or "YAY! That name is currently available. Hurry up and take it before someone else does!")

Of course that would have to be built after the CDB starts recognizing extension names.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC|Merged] Extensions

Post by DavidIQ »

There would not be duplication within the same repo. Titania already handles that far as I know. Trouble will be when user changes to a different repo to install from. In such a case the names for the same contribution might not match.
Image

Post Reply