Re: [Coding style] Use hooks
Reply #3 –
You asked for opinions. If you ask for opinions, you're likely to get them.
Re: [Coding style] Use hooks
Reply #4 –
Agree it sounds painful. But post does need refactoring. I've mentioned before what a pain it was to alter permissions as it's checked in so many places in so many different ways.
Breaking it into consistent functions would be nice, but I'm not sure those need to be called through hooks. It's more they just need hooks in them.
Re: [Coding style] Use hooks
Reply #6 –
Sounds great. Do it. But, I would first implement a better event system.
Re: [Coding style] Use hooks
Reply #7 –
Sorry, by the time I got to writing my reply my brain had turned "implement the draft system through hooks" to "redo the entire post function through hooks" meaning that you'd have to clean up all the what are they doing and what permissions do they have etc. etc. etc.
Re: [Coding style] Use hooks
Reply #9 –
Hey question: if you're going to refactor lotsa stuff to use hooks, is this going to happen between 1.0 RC1 and Final?
Re: [Coding style] Use hooks
Reply #14 –
Just a couple of days ago I was thinking that one good candidate for this stuff is menus.
At the moment we have rather big arrays holding lots of stuff in few places (admin, profile, subs, moderation), splitting up these arrays into manageable chunks would probably help readability.
One doubt I have about that is: should we do it the "hard way" or the "soft way"?
The "hard way" means split the menus up in terms of functionality and the spread each piece into its own file, then grab the file and load the menu. That would mean create a specific type of files, otherwise each time someone access the profile, Elk would have to include all the profile-related files (that means quite a bit of code).
The "soft way", instead, would be to just split the menu in functions and keep the functions into the same controller (e.g. Profile.controller.php).
As first step I would use the "soft way", so that everything is still more or less in the same place.