[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
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Extensions

Post by naderman »

nickvergessen wrote:Well I would just not load them,
let it be loaded by the user with a hook into page_header()
Yeah I'd do this through hooks, too. That way each extension can decide by itself if a language file needs to be loaded and where.
nickvergessen wrote: another questions:
Where to put template-files for the ACP?
I added ext/<ext>/adm/style to my RFC.

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

Re: [RFC] Extensions

Post by nickvergessen »

I took a file list of my Gallery MOD and tried to find the matching location for all of them:

Code: Select all

adm/mods/phpbb_gallery_version.php => 
adm/style/*.html => phpBB/ext/<ext>/adm/style/<name>.html
gallery/.htaccess => 
gallery/*.php => 
gallery/images/* => 
gallery/plugins/highslide/*.js => phpBB/ext/<ext>/assets/<name>.js
gallery/plugins/highslide/*.css => 
gallery/plugins/highslide/images/*.* => 
includes/xcp/xcp_*.php => phpBB/ext/<ext>/xcp/xcp_<name>.php
includes/xcp/info/xcp_*.php => phpBB/ext/<ext>/xcp/xcp_<name>_info.php
includes/gallery/*.php => phpBB/ext/<ext>/<name>.php
language/<language>/email/*.txt => 
language/<language>/mods/*.php => phpBB/ext/<ext>/language/<language>/<name>.php
styles/<style>/imageset/<language>/button_*.gif => 
styles/<style>/imageset/icon_*.gif => 
styles/<style>/template/*.html => phpBB/ext/<ext>/styles/<style>/template/<name>.html
styles/<style>/theme/*.css => phpBB/ext/<ext>/styles/<style>/theme/<name>.css
styles/<style>/theme/images/icon_*.gif => 
Most files got a new place, but the images for styles and "assets" (aswell as css for assets, which might be style independent) are a questionmark to me, aswell as email templates.

I'd suggest to add:
  • language email templates:
    language/<language>/email/*.txt =>
    • phpBB/ext/<ext>/language/<language>/email/<name>.txt
  • Assets: Maybe it would be better to use <name>-folders
    gallery/plugins/highslide/*.js =>
    • phpBB/ext/<ext>/assets/<name>/<name>.js
    gallery/plugins/highslide/*.css =>
    • phpBB/ext/<ext>/assets/<name>/<name>.css
    gallery/plugins/highslide/images/*.* =>
    • phpBB/ext/<ext>/assets/<name>/images/*.*
  • styles/<style>/imageset/<language>/button_*.gif =>
    • phpBB/ext/<ext>/styles/<style>/imageset/<language>/button_<name>.gif
    styles/<style>/imageset/icon_*.gif =>
    • phpBB/ext/<ext>/styles/<style>/imageset/icon_<name>.gif
    styles/<style>/theme/images/icon_*.gif =>
    • phpBB/ext/<ext>/styles/<style>/theme/images/icon_<name>.gif
Member of the Development-TeamNo Support via PM

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Extensions

Post by naderman »

You can find an example extension containing an ACP module, a search backend and a CAPTCHA plugin here: https://github.com/naderman/phpbb3-example-ext Take a look at how it works :) The plugins are all just renamed copies of core phpBB code.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Extensions

Post by naderman »

I just commited more changes into the pull request at https://github.com/phpbb/phpbb3/pull/329 - It now includes support for templates in extensions:
Admin templates can now be created in ext/<ext>/adm/style/ and regular
templates go into ext/<ext>/styles/<style>/template/. Extension templates
override regular templates. So if an extension supplies a file with a name
used in phpBB, the extension's file will be used.

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

Re: [RFC] Extensions

Post by Oleg »

Is the work here complete? Pull request is still marked wip.

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

Re: [RFC] Extensions

Post by nickvergessen »

No its not, you still can not add CP modules which are provided by extensions through the ACP.
Member of the Development-TeamNo Support via PM

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Extensions

Post by naderman »

Yeah I've been focusing on a few other things the last days. This still needs a few changes to XCP modules and language handling, then it'll be complete.

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

Re: [RFC] Extensions

Post by igorw »

The PR has been merged, we are still missing following (so not sure if RFC and ticket can be marked as merged):

- Authentication plugins
- Frontend (acp module?) for managing them
- CSS / Assets
- Hooks (has own RFC)
- Migrations (has own RFC)

Especially the first two are kind of important, the others belong to other RFCs I suppose.

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

Re: [RFC|Merged] Extensions

Post by Oleg »

For anything not changing the code in the extensions diff I would say create a new RFC.

I marked this one merged.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Extensions

Post by naderman »

igorw wrote:The PR has been merged, we are still missing following (so not sure if RFC and ticket can be marked as merged):

- Authentication plugins
That's implemented and works.
igorw wrote:- Frontend (acp module?) for managing them
Should wait for Hooks & Migrations to build a properly integrated ACP module for all of these. New RFC is probably appropriate.
igorw wrote: - CSS / Assets
I'd suggest a new RFC for this.

Post Reply