SMF Development > Next SMF Discussion

[2.1] Hooks in 2.1

<< < (6/9) > >>

Labradoodle-360:
Well right, that's how it works now. I just think that it should be moved from a row, to a table.
--- Quote from: feline on October 24, 2011, 04:18:25 PM ---caching of the hooks itself is no problem, but the hook code must run on each page load, else dynamic hooks don't work ...

--- End quote ---

Joshua Dickerson:
I just wanted to make a note that the next version will feature a LOT more hooks. Along with that, there is a function loadFile() which has a hook in it before loading of the file and after loading of the file. You can set your plugin to make use of that to completely change any file (as in not include it). Hopefully that doesn't get too much use, but it gives you an idea of how hooks will be used.

Along with that, CSS and JS are loaded through a function as well. So, you can do the same thing.

SlammedDime also gave us a ton of hooks which I implemented a while back.

live627:
Nifty! So are plugins or mods  still going  to be installed like now, where package-info dictates where files get copied to, or will they be run from a dedicated folder?

Joshua Dickerson:
hmm... hadn't thought much about it. It is an interesting idea - only allow plugins to be placed in a certain directory. Although that is very prone to abuse, it would keep things clean. I like it. Need to add that as a bug report.

Joshua Dickerson:
Tracked Bug #4909: Only allow plugins in a plugins directory

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version