eZ Community » Forums » Suggestions » Multiple extension directory
expandshrink

Multiple extension directory

Multiple extension directory

Tuesday 20 July 2010 6:44:49 pm - 7 replies

We can define in the site.ini file the name of the extension directory.

[ExtensionSettings]
ExtensionDirectory=extension

This value can only be a string. This means we can only use one folder for our extensions.

Using few folders instead of a single one could help maintaining the system, don't you think ?

Tuesday 20 July 2010 7:35:09 pm

mmm, really dunno. everybody usign ez publish knows that design stuff is on design folder, images and so on in var... and extensions use to be in extension folder.

for me, if i see different folders to the usual ones i would say... 'wtf?... now i have to check settings to know if this is an extension folder or something that someone has put there accidentally...' happy.gif Emoticon

on the other hand, maybe it could be an idea to have a separate folder for custom extensions and for 'contrib' extensions, being contrib those you get from projects.ez.no for example...

so you will have something like:

  • extension
  • contrib
  • ezgmaplocation
  • ezoe
  • custom
  • mycustomextension

thats my two pounds

Modified on Tuesday 20 July 2010 7:38:59 pm by Carlos Revillo

Tuesday 20 July 2010 10:04:48 pm

Might be something to think about for future versions, but added to current kernel will just add overhead to figure out location of modules / settings / design, basically everything that is not handled by autoloader.

Wednesday 21 July 2010 12:14:11 am

what would help in system maintenance is really renaming the default folder from 'extension' to 'extensions' as

- it's the only dir with a singular noun

- you always have more than one anyway

blunk.gif Emoticon

ps: while at it, another dir that can be switched via an ini setting is the one where kernel modules reside. Moving it from $ezp/kernel to $ezp/modules would also be a good idea...

Sunday 25 July 2010 11:38:15 pm

Might be something to think about for future versions, but added to current kernel will just add overhead to figure out location of modules / settings / design, basically everything that is not handled by autoloader.

It would also crash a lot of extensions, because some extensions, like ezfind, needs to be in the extension folder, if you check extension/ezfind/modules/ezfind/function_definition.php the include parameter makes references for files in "extension/ezfind/classes/"*

ie:

...
 
$FunctionList['search'] = array( 'name' => 'search',
                                  'operation_types' => 'read',
                                  'call_method' => array( 'class'  => 'ezfModuleFunctionCollection',
                                                          'include_file'  => 'extension/ezfind/classes/ezfmodulefunctioncollection.php',
                                                          'method' =>  'search' ),...

So do many extensions, this feature would create a need for some updates in all eZ publish extension that uses function_definition.php

Modified on Sunday 25 July 2010 11:39:47 pm by Thiago Campos Viana

Monday 26 July 2010 12:40:34 am

As long as autoload is always used for loading classes, the 'include_file' spec used in definition of tpl operators or fetch functions is moot. So if ezp code does not use it, extensions will still work without having to be patched...

Monday 26 July 2010 2:27:06 am

Hi

Does autoload works for all folders of an extension? Like lib, classes, autoloads, datatypes?

If yes I think you are right, it would be nice to have multiple extension directory. But could you please tell me if it really loads all php files?

Modified on Tuesday 27 July 2010 2:14:34 pm by Thiago Campos Viana

Monday 26 July 2010 9:07:19 am

I vote for multiple extension directory.

The advantage would be:

You could have a 'global' extension repository where you have all your prefered extensions inside for example from projects.ez.no ... This could be a git checkout or svn checkout. If you have several ez instalallation it is easy to have keep all major extension up to date ( if you use only 1 git, svn repository ).

The custom extension with design, siteaccessdefinitions ... you could have in a seperate folder. And this custom extension could be in a seperate svn / git ( project svn ).

I agree to Andre's post, that the current kernel implementation of finding files .ini, .tpl files is not so good if we have more than one extension repositories. What is about the idea of having an index of all files in the ez extension dirs. An index of tpl files, ini files for every extension. So we reduce file_exists calls on the filesystem to find all related files because only the index is use to find the files.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from