Without me having trawling through the source code, could someone explain what the difference (if any) there is between addons and modules? I see both referred to, but I can't understand a difference between them. As far as I understand, they both add features, they both auto-load from the addons/ directory and they are both toggle-able through the core features page. What am I missing?
I wrote something a while ago:
http://www.elkarte.net/community/index.php?topic=831.msg16689#msg16689
It's not yet complete tough.
Addons are packages that extend ElkArte.
Modules are a way to extend ElkArte (similar to hooks).
I don't understand why we need both? Don't they do exactly the same thing?
Addons are really the zip files.
"Module" is a name I made up for something that is not exactly an hook. At least in my mind, it's something that works alongside a controller attaching events instead of hooks.
Yes, both (hooks and "modules") are the same in the sense they aim at extending, but are somehow different in the way they work.
Yes, it is confusing, everything can be renamed as "hooks", not a big problem (apart some typing). ;D
Haha, okay I understand now. I think the naming scheme is a little confusing, but it's not important.
@ant59, I agree. I still don't understand what
@emanuele said and I've read it 100x and I am pretty familiar with the code.
hmm... put it another way: modules are pieces of code that only work with controllers and that attach to events (even listeners?).
Why are there in a separated directory? Because Elk can find them by mane pattern and autoload what is necessary.
Why are they different from hooks? Because they work differently (e.g. on the passing of arguments, persistence of the instances, etc.).
Why I cannot explain it any better? Because I'm not good at explanations. :(