Skip to main content
ADDONDIR Started by ahrasis · · Read 4326 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

ADDONDIR

I noticed that in 1.1b1, there is an addon directory (addons) which is on SSI / base level. I already restructure some of the addons to use that directory.

My first question, will this be made permanent in 1.1 and above?

My second question, in the future, will it be possible to add the templates, languages, scripts, css etc only in that one directory, (other than source files since currently I cannot figure out how to call them / make them work from that directory)?

Re: ADDONDIR

Reply #1

Yes, the idea is (one day not so far) to let the addons live completely in their own directory and not mess with the default installation.
At the moment is somehow easy for controllers and "subs", less for themes and languages and "assets" (js, css, images, etc) in general.
Bugs creator.
Features destroyer.
Template killer.

Re: ADDONDIR

Reply #2

Ok. Noted that. I'll keep all addons updates of sources in the future to that folder instead and will leave templates, languages and css at their regular places.
Last Edit: August 03, 2016, 09:15:17 pm by ahrasis

Re: ADDONDIR

Reply #3

Quote from: emanuele – Yes, the idea is (one day not so far) to let the addons live completely in their own directory and not mess with the default installation.
At the moment is somehow easy for controllers and "subs", less for themes and languages and "assets" (js, css, images, etc) in general.
Does that  include modules and integration files?
LiveGallery - Simple gallery addon for ElkArte

Re: ADDONDIR

Reply #4

For the moment, modules may not be able to reside in the ADDONS dir simply because their loading rely on a "look for this class here" kind of code, and I feel it's mostly hard-coded for the SOURCEDIR, but definitely they should be there as well.

But "integration" files yes, indeed. Furthermore, if you follow the "correct" scheme (that I feel I described somewhere but I have no idea where and if my feeling is right or not, so I guess I have to publish it again), the "core features" page is able to "discover" the addons via integration files and let you enable/disable them without having to set the hooks in the install script (with the advantages of 1) execute the code only when the addon is actually used, 2) no more need to code "enable this addon" kind of buttons, 3) easier to post some code on the forum and tell other admins "put it there and it will just work", instead now you have to pack the code anyway, and probably more advantages).
Bugs creator.
Features destroyer.
Template killer.

Re: ADDONDIR

Reply #5

Quote the "core features" page is able to "discover" the addons via integration files and let you enable/disable them without having to set the hooks in the install script
Yep, I already use that,  but it bugs out if the file not in sources.

http://www.elkarte.net/community/index.php?topic=831.msg16689#msg16689
LiveGallery - Simple gallery addon for ElkArte

Re: ADDONDIR

Reply #6

 emanuele missed the bug report... O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: ADDONDIR

Reply #7

There wasn't any.  I'm holding off on all future code contributions until beta 2 gets released.
LiveGallery - Simple gallery addon for ElkArte

Re: ADDONDIR

Reply #8

Oh, okay.
Bugs creator.
Features destroyer.
Template killer.